sammccall created this revision.
sammccall added a reviewer: kadircet.
Herald added a subscriber: arphaman.
Herald added a project: All.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D133968
Files:
clang-tools-extra/clangd/Config.h
clang-tools-extra/clangd/tool/ClangdMain.cpp
Index: clang-tools-extra/clangd/tool/ClangdMain.cpp
===================================================================
--- clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -360,6 +360,7 @@
cat(Misc),
desc("Abbreviation for -input-style=delimited -pretty -sync "
"-enable-test-scheme -enable-config=0 -log=verbose -crash-pragmas. "
+ "Also sets config options: Index.StandardLibrary=false. "
"Intended to simplify lit tests"),
init(false),
Hidden,
@@ -697,6 +698,9 @@
C.Index.Background = *BGPolicy;
if (AllScopesCompletion.getNumOccurrences())
C.Completion.AllScopes = AllScopesCompletion;
+
+ if (Test)
+ C.Index.StandardLibrary = false;
return true;
};
}
Index: clang-tools-extra/clangd/Config.h
===================================================================
--- clang-tools-extra/clangd/Config.h
+++ clang-tools-extra/clangd/Config.h
@@ -85,7 +85,7 @@
/// Whether this TU should be background-indexed.
BackgroundPolicy Background = BackgroundPolicy::Build;
ExternalIndexSpec External;
- bool StandardLibrary = false;
+ bool StandardLibrary = true;
} Index;
enum UnusedIncludesPolicy { Strict, None };
Index: clang-tools-extra/clangd/tool/ClangdMain.cpp
===================================================================
--- clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -360,6 +360,7 @@
cat(Misc),
desc("Abbreviation for -input-style=delimited -pretty -sync "
"-enable-test-scheme -enable-config=0 -log=verbose -crash-pragmas. "
+ "Also sets config options: Index.StandardLibrary=false. "
"Intended to simplify lit tests"),
init(false),
Hidden,
@@ -697,6 +698,9 @@
C.Index.Background = *BGPolicy;
if (AllScopesCompletion.getNumOccurrences())
C.Completion.AllScopes = AllScopesCompletion;
+
+ if (Test)
+ C.Index.StandardLibrary = false;
return true;
};
}
Index: clang-tools-extra/clangd/Config.h
===================================================================
--- clang-tools-extra/clangd/Config.h
+++ clang-tools-extra/clangd/Config.h
@@ -85,7 +85,7 @@
/// Whether this TU should be background-indexed.
BackgroundPolicy Background = BackgroundPolicy::Build;
ExternalIndexSpec External;
- bool StandardLibrary = false;
+ bool StandardLibrary = true;
} Index;
enum UnusedIncludesPolicy { Strict, None };
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits