summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-18 23:09:16 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-18 23:09:16 +0000
commitec29d712d449beb6b16210c6683b01814082ca75 (patch)
tree20366d6ca6969a85924ac414e7606ca92478cead /clang/tools/c-index-test
parentf0708dee83b5055fd738d14b06820f093df09162 (diff)
downloadbcm5719-llvm-ec29d712d449beb6b16210c6683b01814082ca75.tar.gz
bcm5719-llvm-ec29d712d449beb6b16210c6683b01814082ca75.zip
c-index-test: Change -test-load-source-repase to only use remapped files for the
reparse, to allow testing distinct inputs. llvm-svn: 111448
Diffstat (limited to 'clang/tools/c-index-test')
-rw-r--r--clang/tools/c-index-test/c-index-test.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index 1b2f036fa41..c822a135c21 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -627,12 +627,12 @@ int perform_test_reparse_source(int argc, const char **argv, int trials,
return -1;
}
+ /* Load the initial translation unit -- we do this without honoring remapped
+ * files, so that we have a way to test results after changing the source. */
TU = clang_parseTranslationUnit(Idx, 0,
argv + num_unsaved_files,
argc - num_unsaved_files,
- unsaved_files,
- num_unsaved_files,
- getDefaultParsingOptions());
+ 0, 0, getDefaultParsingOptions());
if (!TU) {
fprintf(stderr, "Unable to load translation unit!\n");
free_remapped_files(unsaved_files, num_unsaved_files);
@@ -643,6 +643,7 @@ int perform_test_reparse_source(int argc, const char **argv, int trials,
for (trial = 0; trial < trials; ++trial) {
if (clang_reparseTranslationUnit(TU, num_unsaved_files, unsaved_files,
clang_defaultReparseOptions(TU))) {
+ fprintf(stderr, "Unable to reparse translation unit!\n");
clang_disposeTranslationUnit(TU);
free_remapped_files(unsaved_files, num_unsaved_files);
clang_disposeIndex(Idx);
OpenPOWER on IntegriCloud