Support running the extra clang tool tests when the static analyzer is disabled. Disable the relevant clang-tidy tests and one include-fixer test that require it to work. Previously, the tests were disabled entirely with CLANG_ENABLE_STATIC_ANALYZER being false. Now, the tests are being enabled and the relevant tests are excluded and marked unsupported appropriately. In order to disable clang-tidy tests, the whole test directory is added to the exclude lists, to avoid having to explicitly add 'REQUIRES' line to every single test. If the other solution is preferable, I can update the patch. The yamldb_plugin include-fixer test is also updated to be disabled without static analyzer. It fails in that case because clang is not outputting a replacement suggestion -- but I don't know the exact reason why it does not do that. Differential Revision: https://reviews.llvm.org/D37188 llvm-svn: 311983
26 lines
1.1 KiB
C++
26 lines
1.1 KiB
C++
// REQUIRES: static-analyzer
|
|
// RUN: c-index-test -test-load-source-reparse 2 all %s -Xclang -add-plugin -Xclang clang-include-fixer -fspell-checking -Xclang -plugin-arg-clang-include-fixer -Xclang -input=%p/Inputs/fake_yaml_db.yaml 2>&1 | FileCheck %s
|
|
|
|
foo f;
|
|
foo g;
|
|
unknown u;
|
|
|
|
// CHECK: yamldb_plugin.cpp:4:1: error: unknown type name 'foo'; did you mean 'foo'?
|
|
// CHECK: Number FIX-ITs = 1
|
|
// CHECK: FIX-IT: Replace [4:1 - 4:4] with "foo"
|
|
// CHECK: yamldb_plugin.cpp:4:1: note: Add '#include "foo.h"' to provide the missing declaration [clang-include-fixer]
|
|
// CHECK: Number FIX-ITs = 1
|
|
// CHECK: FIX-IT: Insert "#include "foo.h"
|
|
// CHECK: yamldb_plugin.cpp:5:1: error: unknown type name 'foo'; did you mean 'foo'?
|
|
// CHECK: Number FIX-ITs = 1
|
|
// CHECK: FIX-IT: Replace [5:1 - 5:4] with "foo"
|
|
// CHECK: yamldb_plugin.cpp:5:1: note: Add '#include "foo.h"' to provide the missing declaration [clang-include-fixer]
|
|
// CHECK: Number FIX-ITs = 1
|
|
// CHECK: FIX-IT: Insert "#include "foo.h"
|
|
// CHECK: " at 4:1
|
|
// CHECK: yamldb_plugin.cpp:6:1:
|
|
// CHECK: error: unknown type name 'unknown'
|
|
// CHECK: Number FIX-ITs = 0
|
|
// CHECK-NOT: error
|
|
// CHECK-NOT: FIX-IT
|