Author: Fangrui Song Date: 2021-03-09T23:11:54-08:00 New Revision: cd6d1799adfc589626917bce968f33cca821a129
URL: https://github.com/llvm/llvm-project/commit/cd6d1799adfc589626917bce968f33cca821a129 DIFF: https://github.com/llvm/llvm-project/commit/cd6d1799adfc589626917bce968f33cca821a129.diff LOG: [clangd] Treat __GCC_HAVE_DWARF2_CFI_ASM the same as isWrittenInBuiltinFile macros Added: Modified: clang-tools-extra/clangd/index/SymbolCollector.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/index/SymbolCollector.cpp b/clang-tools-extra/clangd/index/SymbolCollector.cpp index b1363c1f9cef..e330c9fe402d 100644 --- a/clang-tools-extra/clangd/index/SymbolCollector.cpp +++ b/clang-tools-extra/clangd/index/SymbolCollector.cpp @@ -432,7 +432,8 @@ bool SymbolCollector::handleMacroOccurrence(const IdentifierInfo *Name, const auto &SM = PP->getSourceManager(); auto DefLoc = MI->getDefinitionLoc(); // Also avoid storing predefined macros like __DBL_MIN__. - if (SM.isWrittenInBuiltinFile(DefLoc)) + if (SM.isWrittenInBuiltinFile(DefLoc) || + Name->getName() == "__GCC_HAVE_DWARF2_CFI_ASM") return true; auto ID = getSymbolID(Name->getName(), MI, SM); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits