Revert the removal of PPCallbacks::PragmaComment() in r201821
The pp-trace clang tool was using it successfully. We can still delete
the callbacks in Frontend/PrintPreprocessedOutput.cpp because they were
effectively dead.
llvm-svn: 201825
diff --git a/clang/lib/Parse/ParsePragma.cpp b/clang/lib/Parse/ParsePragma.cpp
index f5491ff..6a1b5ff 100644
--- a/clang/lib/Parse/ParsePragma.cpp
+++ b/clang/lib/Parse/ParsePragma.cpp
@@ -1253,6 +1253,11 @@
return;
}
+ // If the pragma is lexically sound, notify any interested PPCallbacks.
+ if (PP.getPPCallbacks())
+ PP.getPPCallbacks()->PragmaDetectMismatch(CommentLoc, NameString,
+ ValueString);
+
Actions.ActOnPragmaDetectMismatch(NameString, ValueString);
}
@@ -1323,5 +1328,9 @@
return;
}
+ // If the pragma is lexically sound, notify any interested PPCallbacks.
+ if (PP.getPPCallbacks())
+ PP.getPPCallbacks()->PragmaComment(CommentLoc, II, ArgumentString);
+
Actions.ActOnPragmaMSComment(Kind, ArgumentString);
}