benlangmuir added inline comments.
================
Comment at: clang/lib/Lex/PPDirectives.cpp:514
+ BeginPtr = PP.CurLexer->getBufferLocation();
+ SkipRangePtr = &PP.RecordedSkippedRanges[BeginPtr];
+ if (*SkipRangePtr) {
----------------
Storing this pointer is only safe as long as `SkipExcludedConditionalBlock` can
never be called recursively, since any modification to the `DenseMap` can
invalidate this pointer. Is there some cheap way to assert that? If not,
maybe we should do the lookup again in `endLexPass`, which would always be
correct.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127379/new/
https://reviews.llvm.org/D127379
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits