balazske added a comment. Is it a better fix to change getMacroInfoForLocation?
static const MacroInfo *getMacroInfoForLocation(const Preprocessor &PP, const SourceManager &SM, const IdentifierInfo *II, SourceLocation Loc) { // Can not get macro information for locations not in main TU. std::pair<FileID, unsigned> DecMainLoc = std::make_pair(SM.getMainFileID(), 0); std::pair<FileID, unsigned> DecLoc = SM.getDecomposedLoc(Loc); if (!SM.isInTheSameTranslationUnit(DecMainLoc, DecLoc).first) return nullptr; ... Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59934/new/ https://reviews.llvm.org/D59934 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits