We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf4d59a commit 793d6aeCopy full SHA for 793d6ae
2 files changed
lib/tokenize.cpp
@@ -8006,6 +8006,8 @@ static bool isNonMacro(const Token* tok)
8006
return true;
8007
if (tok->str().compare(0, 2, "__") == 0) // attribute/annotation
8008
8009
+ if (Token::simpleMatch(tok, "alignas ("))
8010
+ return true;
8011
return false;
8012
}
8013
test/testtokenize.cpp
@@ -6770,6 +6770,8 @@ class TestTokenizer : public TestFixture {
6770
6771
const char code11[] = "struct B { B(B&&) noexcept {} ~B() noexcept {} };";
6772
ASSERT_NO_THROW(tokenizeAndStringify(code11));
6773
+
6774
+ ASSERT_NO_THROW(tokenizeAndStringify("alignas(8) alignas(16) int x;")); // alignas is not unknown macro
6775
6776
6777
void findGarbageCode() { // Test Tokenizer::findGarbageCode()
0 commit comments