[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)
NAKAMURA Takumi via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 24 00:49:28 PDT 2024
================
@@ -298,6 +298,22 @@ class CoverageMappingBuilder {
: SM.getIncludeLoc(SM.getFileID(Loc));
}
+ /// Find out where the current file is included or macro is expanded. If the
+ /// found expansion is a <scratch space>, keep looking.
+ SourceLocation getIncludeOrNonScratchExpansionLoc(SourceLocation Loc) {
----------------
chapuni wrote:
This may be integrated to `getIncludeOrExpansionLoc(FoldScratch=true)` as an optional behavior.
https://github.com/llvm/llvm-project/pull/89869
More information about the cfe-commits
mailing list