[cfe-commits] r38710 - /cfe/cfe/trunk/Lex/MacroExpander.cpp
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:24:00 PDT 2007
Author: sabre
Date: Wed Jul 11 11:24:00 2007
New Revision: 38710
URL: http://llvm.org/viewvc/llvm-project?rev=38710&view=rev
Log:
Add a comment giving an example of the error
Modified:
cfe/cfe/trunk/Lex/MacroExpander.cpp
Modified: cfe/cfe/trunk/Lex/MacroExpander.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Lex/MacroExpander.cpp?rev=38710&r1=38709&r2=38710&view=diff
==============================================================================
--- cfe/cfe/trunk/Lex/MacroExpander.cpp (original)
+++ cfe/cfe/trunk/Lex/MacroExpander.cpp Wed Jul 11 11:24:00 2007
@@ -73,6 +73,7 @@
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.
}
More information about the cfe-commits
mailing list