rsmith added inline comments.
================ Comment at: include/clang/Basic/SourceManager.h:1458-1460 + // This happens when the macro is the result of a paste, in that case + // its spelling is the scratch memory, so we take the parent context. + isInSystemHeader(getSpellingLoc(getImmediateMacroCallerLoc(loc)))); ---------------- I think this also matches things like: ``` // system header #define BAR FOO // user code #define FOO x BAR ``` ... where the location of `x` token produced by the `BAR` macro will now be considered to be in a system macro. Can you make this more targeted? (Maybe we could change the `SLocEntry` for the token-paste scratch buffer to be considered a system header if the `##` token is in a system macro -- that'll need the preprocessor to store two `ScratchBuffer`s, one for system headers and one for user code, but that seems acceptable.) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55782/new/ https://reviews.llvm.org/D55782 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits