Dropped the parentheses for #pragma message and its kin in the -E output generator.
This was a suggestion by Jordan Rose since the documented format for these pragmas is without the parentheses. At the same time, I've increased test coverage too for the preprocessed output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179771 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp
index 61f2b9e..6d7a1db 100644
--- a/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -419,13 +419,13 @@
OS << Namespace << ' ';
switch (Kind) {
case PMK_Message:
- OS << "message(\"";
+ OS << "message \"";
break;
case PMK_Warning:
- OS << "warning(\"";
+ OS << "warning \"";
break;
case PMK_Error:
- OS << "error(\"";
+ OS << "error \"";
break;
}
@@ -440,8 +440,6 @@
<< (char)('0'+ ((Char >> 0) & 7));
}
OS << '"';
-
- OS << ')';
setEmittedDirectiveOnThisLine();
}