Add a comment giving an example of the error

llvm-svn: 38710
This commit is contained in:
Chris Lattner 2006-07-15 05:27:44 +00:00
parent 0707bd3042
commit f2781509f9
1 changed files with 1 additions and 0 deletions

View File

@ -73,6 +73,7 @@ static LexerToken StringifyArgument(const std::vector<LexerToken> &Toks,
while (Result[FirstNonSlash] == '\\')
--FirstNonSlash;
if ((Result.size()-1-FirstNonSlash) & 1) {
// Diagnose errors for things like: #define F(X) #X / F(\)
PP.Diag(Toks.back(), diag::pp_invalid_string_literal);
Result.erase(Result.end()-1); // remove one of the \'s.
}