Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8195,7 +8195,7 @@ void Tokenizer::reportUnknownMacros() const
if (Token::Match(inner, "[[({]"))
inner = inner->link();
else if (inner->str() == ";")
unknownMacroError(inner);
unknownMacroError(tok);
}
}

Expand Down
4 changes: 4 additions & 0 deletions test/testtokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7039,6 +7039,10 @@ class TestTokenizer : public TestFixture {
"typedef int UStringCaseMapper(icu::BreakIterator* iter);\n"),
InternalError,
"There is an unknown macro here somewhere. Configuration is required. If U_ICU_ENTRY_POINT_RENAME is a macro then please configure it.");

ASSERT_THROW_EQUALS(tokenizeAndStringify("void f() { MACRO(x(), y(), \"abc\", z(); ok = true); }\n"), // #12006
InternalError,
"There is an unknown macro here somewhere. Configuration is required. If MACRO is a macro then please configure it.");
}


Expand Down