Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed May 25, 2024
1 parent eb634e8 commit 4ee82b0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions cfg/qt.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5363,6 +5363,7 @@
<define name="QT_TRANSLATE_NOOP3_UTF8(scope, x, comment)" value="{x, comment}"/>
<define name="QT_WARNING_PUSH" value=""/>
<define name="QT_WARNING_POP" value=""/>
<define name="QT_WARNING_DISABLE_GCC(x)" value=""/>
<define name="QT_STRINGIFY(x)" value="#x"/>
<define name="QCOMPARE(actual, expected)" value="(void)((actual)==(expected))"/>
<define name="QVERIFY(condition)" value="(void)(condition)"/>
Expand Down
2 changes: 1 addition & 1 deletion lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8749,7 +8749,7 @@ void Tokenizer::findGarbageCode() const
}
if (isCPP() && tok->str() == "namespace" && tok->tokAt(-1)) {
if (!Token::Match(tok->tokAt(-1), ";|{|}|using|inline")) {
if (tok->linkAt(-1) && tok->linkAt(-1) && tok->linkAt(-1)->tokAt(-1) && tok->linkAt(-1)->tokAt(-1)->isUpperCaseName())
if (tok->linkAt(-1) && tok->linkAt(-1)->tokAt(-1) && tok->linkAt(-1)->tokAt(-1)->isUpperCaseName())
unknownMacroError(tok->linkAt(-1)->tokAt(-1));
else
syntaxError(tok);
Expand Down
2 changes: 0 additions & 2 deletions test/testsimplifytokens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,6 @@ class TestSimplifyTokens : public TestFixture {
{
const char code[] = "void f(int namespace) { }";

const char expected[] = "void f ( int namespace ) { }";

ASSERT_THROW_INTERNAL(tok(code), SYNTAX);
}
}
Expand Down

0 comments on commit 4ee82b0

Please sign in to comment.