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
diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp
index 8178168..1935914 100644
--- a/lib/Lex/TokenLexer.cpp
+++ b/lib/Lex/TokenLexer.cpp
@@ -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;
       }