[include-fixer] Add a test for the full round trip through libclang and the plugin.

llvm-svn: 287230
This commit is contained in:
Benjamin Kramer 2016-11-17 15:23:06 +00:00
parent 9eba7354bb
commit 99eaf84589
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
// 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;
// CHECK: yamldb_plugin.cpp:3:1: error: unknown type name 'foo'; did you mean 'foo'?
// CHECK: Number FIX-ITs = 1
// CHECK: FIX-IT: Replace [3:1 - 3:4] with "foo"
// CHECK: yamldb_plugin.cpp:3:1: note: Add '#include "foo.h"' to provide the missing declaration [clang-include-fixer]
// CHECK: Number FIX-ITs = 1
// CHECK: FIX-IT: Replace [3:1 - 3:4] with "#include "foo.h"