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:
Erik Verbruggen
2013-07-12 16:07:22 +02:00
committed by Nikolai Kosjar
parent e349fb48b4
commit 6a179c0467

View File

@@ -3017,18 +3017,10 @@ bool Bind::visit(EnumSpecifierAST *ast)
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);
return false;
}
// PtrOperatorAST
bool Bind::visit(PointerToMemberAST *ast)
{