[cfe-commits] r67231 - /cfe/trunk/lib/Lex/TokenLexer.cpp
Chris Lattner
sabre at nondot.org
Wed Mar 18 13:31:57 PDT 2009
Author: lattner
Date: Wed Mar 18 15:31:57 2009
New Revision: 67231
URL: http://llvm.org/viewvc/llvm-project?rev=67231&view=rev
Log:
constructs like:
#define Y X ## .
Y
are ok in .S files.
Modified:
cfe/trunk/lib/Lex/TokenLexer.cpp
Modified: cfe/trunk/lib/Lex/TokenLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/TokenLexer.cpp?rev=67231&r1=67230&r2=67231&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/TokenLexer.cpp (original)
+++ cfe/trunk/lib/Lex/TokenLexer.cpp Wed Mar 18 15:31:57 2009
@@ -444,9 +444,10 @@
return true;
}
- // TODO: If not in assembler language mode.
- PP.Diag(PasteOpLoc, diag::err_pp_bad_paste)
- << std::string(Buffer.begin(), Buffer.end()-1);
+ // Do not emit the warning when preprocessing assembler code.
+ if (!PP.getLangOptions().AsmPreprocessor)
+ PP.Diag(PasteOpLoc, diag::err_pp_bad_paste)
+ << std::string(Buffer.begin(), Buffer.end()-1);
return false;
}
More information about the cfe-commits
mailing list