forked from qt-creator/qt-creator
C++: remove warning about stray comma after last enumerator
Although it's a C++11 feature, all sane compilers support it as an extension to C++03/C++98. Change-Id: I3c7b0db345d0b175554534e879717f4d14f48b0f Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
e349fb48b4
commit
6a179c0467
8
src/libs/3rdparty/cplusplus/Bind.cpp
vendored
8
src/libs/3rdparty/cplusplus/Bind.cpp
vendored
@@ -3017,18 +3017,10 @@ bool Bind::visit(EnumSpecifierAST *ast)
|
|||||||
this->enumerator(it->value, e);
|
this->enumerator(it->value, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ast->stray_comma_token /* && ! translationUnit()->cxx0xEnabled()*/) {
|
|
||||||
const Token &tk = tokenAt(ast->stray_comma_token);
|
|
||||||
if (! tk.generated())
|
|
||||||
translationUnit()->warning(ast->stray_comma_token,
|
|
||||||
"commas at the end of enumerator lists are a C++0x-specific feature");
|
|
||||||
}
|
|
||||||
|
|
||||||
(void) switchScope(previousScope);
|
(void) switchScope(previousScope);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PtrOperatorAST
|
// PtrOperatorAST
|
||||||
bool Bind::visit(PointerToMemberAST *ast)
|
bool Bind::visit(PointerToMemberAST *ast)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user