akyrtzi added inline comments.
================ Comment at: clang/lib/Lex/PPDirectives.cpp:514 + BeginPtr = PP.CurLexer->getBufferLocation(); + SkipRangePtr = &PP.RecordedSkippedRanges[BeginPtr]; + if (*SkipRangePtr) { ---------------- benlangmuir wrote: > 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. Good point! I can add a `bool` to assert that `SkipExcludedConditionalBlock` is not recursively called. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127379/new/ https://reviews.llvm.org/D127379 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits