Author: d0k Date: Thu Nov 17 09:23:06 2016 New Revision: 287230 URL: http://llvm.org/viewvc/llvm-project?rev=287230&view=rev Log: [include-fixer] Add a test for the full round trip through libclang and the plugin.
Added: clang-tools-extra/trunk/test/include-fixer/yamldb_plugin.cpp Added: clang-tools-extra/trunk/test/include-fixer/yamldb_plugin.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/include-fixer/yamldb_plugin.cpp?rev=287230&view=auto ============================================================================== --- clang-tools-extra/trunk/test/include-fixer/yamldb_plugin.cpp (added) +++ clang-tools-extra/trunk/test/include-fixer/yamldb_plugin.cpp Thu Nov 17 09:23:06 2016 @@ -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" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits