diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-18 18:08:43 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-18 18:08:43 +0000 |
commit | a88084b78fd4ca5d3d858c14b02414f8cc399f02 (patch) | |
tree | 8d45285d7831d594f76f9a0a1edaa4436b090ac5 /test/Index/cindex-on-invalid.m | |
parent | 8b6765fb563a5b03d128d8f53b9b3986128a3405 (diff) |
Rework how CIndex handles diagnostics. Rather than using a callback,
we attach diagnostics to translation units and code-completion
results, so they can be queried at any time.
To facilitate this, the new StoredDiagnostic class stores a diagnostic
in a serializable/deserializable form, and ASTUnit knows how to
capture diagnostics in this stored form. CIndex's CXDiagnostic is a
thin wrapper around StoredDiagnostic, providing a C interface to
stored or de-serialized diagnostics.
I've XFAIL'd one test case temporarily, because currently we end up
storing diagnostics in an ASTUnit that's never returned to the user
(because it contains errors). I'll introduce a temporary fix for this
soon; the real fix will be to allow us to return and query invalid ASTs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/cindex-on-invalid.m')
-rw-r--r-- | test/Index/cindex-on-invalid.m | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/Index/cindex-on-invalid.m b/test/Index/cindex-on-invalid.m index 651c40a335..0f6bdffe91 100644 --- a/test/Index/cindex-on-invalid.m +++ b/test/Index/cindex-on-invalid.m @@ -1,5 +1,6 @@ // RUN: not c-index-test -test-load-source local %s > %t 2> %t.err // RUN: FileCheck %s < %t.err +// XFAIL: * // CHECK: error: expected identifier or '(' // CHECK: Unable to load translation unit! |