diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-10-18 22:01:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-10-18 22:01:46 +0000 |
commit | c769d6e00733dbb261fc4ca835a18948e19db4c5 (patch) | |
tree | 3feecef54be92b636ff6daccc60a5f4236e55c7c /clang/test | |
parent | d4cc3d420acc787cf5d0c6d5c076de5012a3c24d (diff) | |
download | bcm5719-llvm-c769d6e00733dbb261fc4ca835a18948e19db4c5.tar.gz bcm5719-llvm-c769d6e00733dbb261fc4ca835a18948e19db4c5.zip |
Fix the translation of the PCC_ForInit code-completion context for
C++/C99/Objective-C, so that we properly include types. This fix
affects global caching of code-completion results; without caching,
the behavior was already correct.
llvm-svn: 116757
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Index/complete-exprs.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Index/complete-exprs.m b/clang/test/Index/complete-exprs.m index a1933567f7e..9d11010ca4c 100644 --- a/clang/test/Index/complete-exprs.m +++ b/clang/test/Index/complete-exprs.m @@ -11,6 +11,7 @@ typedef signed char BOOL; @implementation A - (int)method:(id)param1 { + for(BOOL B = YES; ; ) { } } @end @@ -21,3 +22,8 @@ typedef signed char BOOL; // CHECK-CC1: macro definition:{TypedText NO} (65) // CHECK-CC1: NotImplemented:{ResultType A *}{TypedText self} (8) // CHECK-CC1: macro definition:{TypedText YES} (65) +// RUN: c-index-test -code-completion-at=%s:14:7 %s | FileCheck -check-prefix=CHECK-CC2 %s +// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:14:7 %s | FileCheck -check-prefix=CHECK-CC2 %s +// CHECK-CC2: TypedefDecl:{TypedText BOOL} (50) +// CHECK-CC2: NotImplemented:{TypedText char} (50) +// CHECK-CC2: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (30) |