Handle static_assert if standard is at least C++11 (#2842)
Previously it was being handled only if the standard was *exactly* C++11.
This commit is contained in:
parent
bd7e915c20
commit
d7473cab8c
|
@ -2136,7 +2136,7 @@ void CheckOther::checkDuplicateExpression()
|
||||||
if (assignment && warningEnabled)
|
if (assignment && warningEnabled)
|
||||||
selfAssignmentError(tok, tok->astOperand1()->expressionString());
|
selfAssignmentError(tok, tok->astOperand1()->expressionString());
|
||||||
else if (styleEnabled) {
|
else if (styleEnabled) {
|
||||||
if (mTokenizer->isCPP() && mSettings->standards.cpp==Standards::CPP11 && tok->str() == "==") {
|
if (mTokenizer->isCPP() && mSettings->standards.cpp >= Standards::CPP11 && tok->str() == "==") {
|
||||||
const Token* parent = tok->astParent();
|
const Token* parent = tok->astParent();
|
||||||
while (parent && parent->astParent()) {
|
while (parent && parent->astParent()) {
|
||||||
parent = parent->astParent();
|
parent = parent->astParent();
|
||||||
|
|
Loading…
Reference in New Issue