Skip to content

Commit 1d237ad

Browse files
committed
improve error message
1 parent 344e62a commit 1d237ad

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

simplecpp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2837,7 +2837,7 @@ static bool simplifyName(simplecpp::TokenList &expr, simplecpp::OutputList *outp
28372837
simplecpp::Output err(tok->location.files);
28382838
err.type = simplecpp::Output::SYNTAX_ERROR;
28392839
err.location = tok->location;
2840-
err.msg = "Undefined function-like macro in directive";
2840+
err.msg = "Undefined function-like macro in directive: " + tok->str() + "( ... )";
28412841
outputList->push_back(err);
28422842
}
28432843
return false;

test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1831,7 +1831,7 @@ static void ifUndefFuncStyleMacro()
18311831
"#endif\n";
18321832
simplecpp::OutputList outputList;
18331833
ASSERT_EQUALS("", preprocess(code, &outputList));
1834-
ASSERT_EQUALS("file0,1,syntax_error,Undefined function-like macro in directive\n", toString(outputList));
1834+
ASSERT_EQUALS("file0,1,syntax_error,Undefined function-like macro in directive: A( ... )\n", toString(outputList));
18351835
}
18361836

18371837
static void location1()

0 commit comments

Comments
 (0)