[PATCH] D83592: [Parser] Add comment to skipped regions
Zequan Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 13 11:52:34 PDT 2020
zequanwu added inline comments.
Herald added a subscriber: wuzish.
================
Comment at: clang/lib/Parse/Parser.cpp:37
bool HandleComment(Preprocessor &PP, SourceRange Comment) override {
+ PP.getPPCallbacks()->SourceRangeSkipped(Comment, Comment.getEnd());
S.ActOnComment(Comment);
----------------
hans wrote:
> I don't think this is the right way to do it. It seems this callback is intended for #if macros that exclude part of the file from preprocessing.
I believe we want to classify comments as `SkippedRegion`, https://github.com/llvm/llvm-project/blob/master/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h#L217.
Added a new method `CommentSkipped` to add comment range to skipped ranges.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83592/new/
https://reviews.llvm.org/D83592
More information about the cfe-commits
mailing list