diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-06-04 12:31:43 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-06-04 11:24:56 +0000 |
commit | 2262af087a3d676d54358825af556497af5a38c3 (patch) | |
tree | 09447624cfb4a578dd3a32fd2042872874f86200 /src/libs/3rdparty/cplusplus/Bind.cpp | |
parent | 93d5ed40736dddd905503c7ae9806c00a63892c4 (diff) |
CplusPlus: Fix type information for anonymous enums
Variables declared like this:
enum { E1, E2 } e;
would not get assigned a proper type.
Task-number: QTCREATORBUG-7487
Change-Id: I4362f22feb0f2e4e1e754e9c623e5576fa31f4bc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Bind.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/Bind.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/3rdparty/cplusplus/Bind.cpp b/src/libs/3rdparty/cplusplus/Bind.cpp index 801349c872..605bd768b4 100644 --- a/src/libs/3rdparty/cplusplus/Bind.cpp +++ b/src/libs/3rdparty/cplusplus/Bind.cpp @@ -3176,7 +3176,10 @@ bool Bind::visit(EnumSpecifierAST *ast) } (void) switchScope(previousScope); - _type.setType(control()->namedType(this->name(ast->name))); + if (ast->name) + _type.setType(control()->namedType(this->name(ast->name))); + else + _type.setType(ast->symbol); return false; } |