================
@@ -74,8 +74,12 @@ Parser::Parser(Preprocessor &pp, Sema &actions, bool
skipFunctionBodies)
// destructor.
initializePragmaHandlers();
- CommentSemaHandler.reset(new ActionCommentHandler(actions));
- PP.addCommentHandler(CommentSemaHandler.get());
+ // Only install the comment handler when some consumer may read documentation
+ // comments back.
+ if (actions.shouldRetainCommentsFromLexer(SourceLocation())) {
----------------
AnonMiraj wrote:
Yeah
reverted all changes to Pasrer.cpp
https://github.com/llvm/llvm-project/pull/206363
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits