parent
33777c5b72
commit
7d4a80fbd2
|
@ -252,12 +252,12 @@ public:
|
|||
_tokType = t;
|
||||
|
||||
const bool memoizedIsName = (_tokType == eName || _tokType == eType || _tokType == eVariable ||
|
||||
_tokType == eFunction || _tokType == eKeyword || _tokType == eBoolean ||
|
||||
_tokType == eEnumerator); // TODO: "true"/"false" aren't really a name...
|
||||
_tokType == eFunction || _tokType == eKeyword || _tokType == eBoolean ||
|
||||
_tokType == eEnumerator); // TODO: "true"/"false" aren't really a name...
|
||||
setFlag(fIsName, memoizedIsName);
|
||||
|
||||
const bool memoizedIsLiteral = (_tokType == eNumber || _tokType == eString || _tokType == eChar ||
|
||||
_tokType == eBoolean || _tokType == eLiteral || _tokType == eEnumerator);
|
||||
_tokType == eBoolean || _tokType == eLiteral || _tokType == eEnumerator);
|
||||
setFlag(fIsLiteral, memoizedIsLiteral);
|
||||
}
|
||||
void isKeyword(const bool kwd) {
|
||||
|
|
|
@ -517,18 +517,18 @@ private:
|
|||
s.symbolName = "array*";
|
||||
|
||||
Suppressions::ErrorMessage errorMsg;
|
||||
errorMsg.errorId = "foo";
|
||||
errorMsg.setFileName("test.cpp");
|
||||
errorMsg.lineNumber = 123;
|
||||
errorMsg.symbolNames = "";
|
||||
errorMsg.errorId = "foo";
|
||||
errorMsg.setFileName("test.cpp");
|
||||
errorMsg.lineNumber = 123;
|
||||
errorMsg.symbolNames = "";
|
||||
ASSERT_EQUALS(false, s.isSuppressed(errorMsg));
|
||||
errorMsg.symbolNames = "x\n";
|
||||
errorMsg.symbolNames = "x\n";
|
||||
ASSERT_EQUALS(false, s.isSuppressed(errorMsg));
|
||||
errorMsg.symbolNames = "array1\n";
|
||||
errorMsg.symbolNames = "array1\n";
|
||||
ASSERT_EQUALS(true, s.isSuppressed(errorMsg));
|
||||
errorMsg.symbolNames = "x\narray2\n";
|
||||
errorMsg.symbolNames = "x\narray2\n";
|
||||
ASSERT_EQUALS(true, s.isSuppressed(errorMsg));
|
||||
errorMsg.symbolNames = "array3\nx\n";
|
||||
errorMsg.symbolNames = "array3\nx\n";
|
||||
ASSERT_EQUALS(true, s.isSuppressed(errorMsg));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue