forked from qt-creator/qt-creator
CPlusPlus: Do not mis-classify bitfield declarations as initializations
Fixes: QTCREATORBUG-25390 Change-Id: I1976b7db2996f5a09db73adbd127aac9ab92d57d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -229,7 +229,8 @@ public:
|
||||
}
|
||||
if (const auto declarator = (*it)->asDeclarator()) {
|
||||
if (containsToken(declarator->core_declarator)) {
|
||||
if (declarator->initializer && (!declarator->postfix_declarator_list
|
||||
if (declarator->initializer && declarator->equal_token
|
||||
&& (!declarator->postfix_declarator_list
|
||||
|| !declarator->postfix_declarator_list->value
|
||||
|| !declarator->postfix_declarator_list->value->asFunctionDeclarator())) {
|
||||
return Usage::Type::Initialization;
|
||||
|
||||
@@ -2021,7 +2021,7 @@ void tst_FindUsages::writableRefs()
|
||||
struct S {
|
||||
S() : value2(value) {}
|
||||
static int value;
|
||||
int value2;
|
||||
int value2 : 2;
|
||||
static void *p;
|
||||
static const void *p2;
|
||||
struct Nested {
|
||||
|
||||
Reference in New Issue
Block a user