[clang-tools-extra] cd6d179 - [clangd] Treat __GCC_HAVE_DWARF2_CFI_ASM the same as isWrittenInBuiltinFile macros
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 9 23:12:01 PST 2021
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);
More information about the cfe-commits
mailing list