summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2018-05-16 15:08:41 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2018-05-17 07:08:52 +0000
commit0e790628055f8e1edbc4a1176e3cc064cf544a2b (patch)
tree05b34da43ec87e0449c6087516e3bcc4421bdd22 /test
parent7f349701d3ea0c47be3a43e265699dddd3fd55cf (diff)
[backported/clang-7][Frontend] Avoid running plugins during code completion parse
-------------------------------------------------------------------------- * https://reviews.llvm.org/D46050 * Fixes slow completion if tidy/clazy checks are activated. -------------------------------------------------------------------------- The parsing that is done for code completion is a special case that will discard any generated diagnostics, so avoid running plugins for this case in the first place to avoid performance penalties due to the plugins. A scenario for this is for example libclang with extra plugins like tidy. Change-Id: Ibd325f234823e4650553d2a9a3c20d993d57c87d Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Diffstat (limited to 'test')
-rw-r--r--test/Index/complete-and-plugins.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Index/complete-and-plugins.c b/test/Index/complete-and-plugins.c
new file mode 100644
index 0000000000..91dbf458e9
--- /dev/null
+++ b/test/Index/complete-and-plugins.c
@@ -0,0 +1,7 @@
+// RUN: c-index-test -code-completion-at=%s:7:1 -load %llvmshlibdir/PrintFunctionNames%pluginext -add-plugin print-fns %s | FileCheck %s
+// REQUIRES: plugins, examples
+// CHECK: macro definition:{{.*}}
+// CHECK-NOT: top-level-decl: "x"
+
+void x();
+