diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /test/CodeCompletion | |
parent | bb67ca86b31f67faee50bd10c3b036d65751745a (diff) | |
download | FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz |
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/CodeCompletion')
-rw-r--r-- | test/CodeCompletion/auto.cpp | 2 | ||||
-rw-r--r-- | test/CodeCompletion/documentation.cpp | 33 | ||||
-rw-r--r-- | test/CodeCompletion/objc-expr.m | 17 |
3 files changed, 52 insertions, 0 deletions
diff --git a/test/CodeCompletion/auto.cpp b/test/CodeCompletion/auto.cpp new file mode 100644 index 0000000..1fc9fb0 --- /dev/null +++ b/test/CodeCompletion/auto.cpp @@ -0,0 +1,2 @@ +// RUN: %clang_cc1 -std=c++11 -code-completion-at=%s:2:9 %s +auto i = diff --git a/test/CodeCompletion/documentation.cpp b/test/CodeCompletion/documentation.cpp new file mode 100644 index 0000000..c049ae3 --- /dev/null +++ b/test/CodeCompletion/documentation.cpp @@ -0,0 +1,33 @@ +// Note: the run lines follow their respective tests, since line/column +// matter in this test. + +/// Aaa. +void T1(float x, float y); + +/// Bbb. +class T2 { +public: + /// Ccc. + void T3(); + + int T4; ///< Ddd. +}; + +/// Eee. +namespace T5 { +} + +void test() { + + T2 t2; + t2. +} + +// RUN: %clang_cc1 -fsyntax-only -code-completion-brief-comments -code-completion-at=%s:21:1 %s -o - | FileCheck -check-prefix=CC1 %s +// CHECK-CC1: COMPLETION: T1 : [#void#]T1(<#float x#>, <#float y#>) : Aaa. +// CHECK-CC1: COMPLETION: T2 : T2 : Bbb. +// CHECK-CC1: COMPLETION: T5 : T5:: : Eee. + +// RUN: %clang_cc1 -fsyntax-only -code-completion-brief-comments -code-completion-at=%s:23:6 %s -o - | FileCheck -check-prefix=CC2 %s +// CHECK-CC2: COMPLETION: T3 : [#void#]T3() : Ccc. +// CHECK-CC2: COMPLETION: T4 : [#int#]T4 : Ddd. diff --git a/test/CodeCompletion/objc-expr.m b/test/CodeCompletion/objc-expr.m new file mode 100644 index 0000000..b59586a --- /dev/null +++ b/test/CodeCompletion/objc-expr.m @@ -0,0 +1,17 @@ +// Note: the run lines follow all tests, since line/column matter here + +id testCompleteAfterAtSign() { + return @""; +} + +// RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:4:11 %s -fno-const-strings -o - | FileCheck -check-prefix=AT %s +// CHECK-AT: COMPLETION: Pattern : [#NSString *#]"<#string#>" +// CHECK-AT: COMPLETION: Pattern : [#id#](<#expression#>) +// CHECK-AT: COMPLETION: Pattern : [#NSArray *#][<#objects, ...#>] +// CHECK-AT: COMPLETION: Pattern : [#char[]#]encode(<#type-name#>) +// CHECK-AT: COMPLETION: Pattern : [#Protocol *#]protocol(<#protocol-name#>) +// CHECK-AT: COMPLETION: Pattern : [#SEL#]selector(<#selector#>) +// CHECK-AT: COMPLETION: Pattern : [#NSDictionary *#]{<#key#> : <#object, ...#>} + +// RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:4:11 %s -fconst-strings -o - | FileCheck -check-prefix=CONST-STRINGS %s +// CHECK-CONST-STRINGS: COMPLETION: Pattern : [#const char[]#]encode(<#type-name#>) |