[cfe-commits] r111580 - /cfe/trunk/tools/c-index-test/c-index-test.c
Daniel Dunbar
daniel at zuster.org
Thu Aug 19 16:44:06 PDT 2010
Author: ddunbar
Date: Thu Aug 19 18:44:06 2010
New Revision: 111580
URL: http://llvm.org/viewvc/llvm-project?rev=111580&view=rev
Log:
c-index-test: Diagnose parse / completion failures in -code-completion-at=.
Modified:
cfe/trunk/tools/c-index-test/c-index-test.c
Modified: cfe/trunk/tools/c-index-test/c-index-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/c-index-test.c?rev=111580&r1=111579&r2=111580&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/c-index-test.c (original)
+++ cfe/trunk/tools/c-index-test/c-index-test.c Thu Aug 19 18:44:06 2010
@@ -900,10 +900,18 @@
argv + num_unsaved_files + 2,
argc - num_unsaved_files - 2,
0, 0, getDefaultParsingOptions());
+ if (!TU) {
+ fprintf(stderr, "Unable to load translation unit!\n");
+ return 1;
+ }
for (I = 0; I != Repeats; ++I) {
results = clang_codeCompleteAt(TU, filename, line, column,
unsaved_files, num_unsaved_files,
clang_defaultCodeCompleteOptions());
+ if (!results) {
+ fprintf(stderr, "Unable to perform code completion!\n");
+ return 1;
+ }
if (I != Repeats-1)
clang_disposeCodeCompleteResults(results);
}
More information about the cfe-commits
mailing list