aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangcodemodel/clangcodemodelplugin.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <[email protected]>2021-09-03 17:14:54 +0200
committerChristian Kandeler <[email protected]>2021-09-07 10:05:28 +0000
commitd583dde17bb114395580609ee97a3032ec8ff727 (patch)
treecac8278745ad852e41cd9068ba9a64d6929b346c /src/plugins/clangcodemodel/clangcodemodelplugin.cpp
parent847a03786c8ffb236e47b3597c03b7f55f55512f (diff)
ClangCodeModel: Force clangd restart on external changes
Neither we nor clangd can afford to watch all source files, which means that after e.g. a branch switch we can easily end up in an inconsistent state. We alleviate this problem by restarting clangd if at least one open file was changed externally. Change-Id: I7e0d14835e3afbd7a64c3233614f2161282dddc0 Reviewed-by: David Schulz <[email protected]>
Diffstat (limited to 'src/plugins/clangcodemodel/clangcodemodelplugin.cpp')
-rw-r--r--src/plugins/clangcodemodel/clangcodemodelplugin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/clangcodemodel/clangcodemodelplugin.cpp b/src/plugins/clangcodemodel/clangcodemodelplugin.cpp
index ced0fa8e35a..a6ead8c3fe2 100644
--- a/src/plugins/clangcodemodel/clangcodemodelplugin.cpp
+++ b/src/plugins/clangcodemodel/clangcodemodelplugin.cpp
@@ -211,6 +211,7 @@ QVector<QObject *> ClangCodeModelPlugin::createTestObjects() const
return {
new Tests::ClangCodeCompletionTest,
new Tests::ClangdTestCompletion,
+ new Tests::ClangdTestExternalChanges,
new Tests::ClangdTestFindReferences,
new Tests::ClangdTestFollowSymbol,
new Tests::ClangdTestHighlighting,