aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/TokenLexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-18 20:31:57 +0000
committerChris Lattner <sabre@nondot.org>2009-03-18 20:31:57 +0000
commit48be3801ca729cf2afea060fdb08a479b49ab440 (patch)
tree33769ad8233b7dc453cdd9b66366732477c57d50 /lib/Lex/TokenLexer.cpp
parenta88620c0d15d380975eb2c4c9251cd6ff8d2aa64 (diff)
constructs like:
#define Y X ## . Y are ok in .S files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/TokenLexer.cpp')
-rw-r--r--lib/Lex/TokenLexer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp
index 8178168ef5..1935914e0e 100644
--- a/lib/Lex/TokenLexer.cpp
+++ b/lib/Lex/TokenLexer.cpp
@@ -444,9 +444,10 @@ bool TokenLexer::PasteTokens(Token &Tok) {
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;
}