diff options
Diffstat (limited to 'clang/test/Index/get-cursor.cpp')
-rw-r--r-- | clang/test/Index/get-cursor.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/clang/test/Index/get-cursor.cpp b/clang/test/Index/get-cursor.cpp index e997fc493d8..7acacf22089 100644 --- a/clang/test/Index/get-cursor.cpp +++ b/clang/test/Index/get-cursor.cpp @@ -157,71 +157,71 @@ struct Z { EnumType e = Enumerator; }; -// RUN: c-index-test -cursor-at=%s:6:4 %s | FileCheck -check-prefix=CHECK-COMPLETION-1 %s +// RUN: c-index-test -cursor-at=%s:6:4 -ffreestanding %s | FileCheck -check-prefix=CHECK-COMPLETION-1 %s // CHECK-COMPLETION-1: CXXConstructor=X:6:3 // CHECK-COMPLETION-1-NEXT: Completion string: {TypedText X}{LeftParen (}{Placeholder int}{Comma , }{Placeholder int}{RightParen )} -// RUN: c-index-test -cursor-at=%s:31:16 %s | FileCheck -check-prefix=CHECK-COMPLETION-2 %s +// RUN: c-index-test -cursor-at=%s:31:16 -ffreestanding %s | FileCheck -check-prefix=CHECK-COMPLETION-2 %s // CHECK-COMPLETION-2: CXXMethod=getAnotherX:31:5 (Definition) // CHECK-COMPLETION-2-NEXT: Completion string: {ResultType X}{TypedText getAnotherX}{LeftParen (}{RightParen )} -// RUN: c-index-test -cursor-at=%s:12:20 %s | FileCheck -check-prefix=CHECK-VALUE-REF %s -// RUN: c-index-test -cursor-at=%s:13:21 %s | FileCheck -check-prefix=CHECK-VALUE-REF %s -// RUN: c-index-test -cursor-at=%s:13:28 %s | FileCheck -check-prefix=CHECK-VALUE-REF %s -// RUN: c-index-test -cursor-at=%s:14:23 %s | FileCheck -check-prefix=CHECK-VALUE-REF %s +// RUN: c-index-test -cursor-at=%s:12:20 -ffreestanding %s | FileCheck -check-prefix=CHECK-VALUE-REF %s +// RUN: c-index-test -cursor-at=%s:13:21 -ffreestanding %s | FileCheck -check-prefix=CHECK-VALUE-REF %s +// RUN: c-index-test -cursor-at=%s:13:28 -ffreestanding %s | FileCheck -check-prefix=CHECK-VALUE-REF %s +// RUN: c-index-test -cursor-at=%s:14:23 -ffreestanding %s | FileCheck -check-prefix=CHECK-VALUE-REF %s // CHECK-VALUE-REF: DeclRefExpr=value:10:12 -// RUN: c-index-test -cursor-at=%s:12:18 %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR1 %s -// RUN: c-index-test -cursor-at=%s:13:18 %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR2 %s -// RUN: c-index-test -cursor-at=%s:14:19 %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR1 %s -// RUN: c-index-test -cursor-at=%s:17:10 %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR3 %s +// RUN: c-index-test -cursor-at=%s:12:18 -ffreestanding %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR1 %s +// RUN: c-index-test -cursor-at=%s:13:18 -ffreestanding %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR2 %s +// RUN: c-index-test -cursor-at=%s:14:19 -ffreestanding %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR1 %s +// RUN: c-index-test -cursor-at=%s:17:10 -ffreestanding %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR3 %s // CHECK-TYPE-REF: TypeRef=struct X:3:8 // CHECK-CONSTRUCTOR1: CallExpr=X:5:3 // CHECK-CONSTRUCTOR2: CallExpr=X:6:3 // CHECK-CONSTRUCTOR3: CallExpr=X:4:3 -// RUN: c-index-test -cursor-at=%s:23:3 %s | FileCheck -check-prefix=CHECK-RETTYPE %s -// RUN: c-index-test -cursor-at=%s:26:1 %s | FileCheck -check-prefix=CHECK-RETTYPE %s +// RUN: c-index-test -cursor-at=%s:23:3 -ffreestanding %s | FileCheck -check-prefix=CHECK-RETTYPE %s +// RUN: c-index-test -cursor-at=%s:26:1 -ffreestanding %s | FileCheck -check-prefix=CHECK-RETTYPE %s // CHECK-RETTYPE: TypeRef=struct X:3:8 -// RUN: c-index-test -cursor-at=%s:23:7 %s | FileCheck -check-prefix=CHECK-MEMFUNC-DECL %s +// RUN: c-index-test -cursor-at=%s:23:7 -ffreestanding %s | FileCheck -check-prefix=CHECK-MEMFUNC-DECL %s // CHECK-MEMFUNC-DECL: CXXMethod=getX:23:5 -// RUN: c-index-test -cursor-at=%s:26:7 %s | FileCheck -check-prefix=CHECK-MEMFUNC-DEF %s +// RUN: c-index-test -cursor-at=%s:26:7 -ffreestanding %s | FileCheck -check-prefix=CHECK-MEMFUNC-DEF %s // CHECK-MEMFUNC-DEF: CXXMethod=getX:26:6 -// RUN: c-index-test -cursor-at=%s:26:3 %s | FileCheck -check-prefix=CHECK-TYPEREF-Y %s +// RUN: c-index-test -cursor-at=%s:26:3 -ffreestanding %s | FileCheck -check-prefix=CHECK-TYPEREF-Y %s // CHECK-TYPEREF-Y: TypeRef=struct Y:20:8 -// RUN: c-index-test -cursor-at=%s:27:10 %s | FileCheck -check-prefix=CHECK-IMPLICIT-MEMREF %s -// RUN: c-index-test -cursor-at=%s:31:28 %s | FileCheck -check-prefix=CHECK-IMPLICIT-MEMREF %s +// RUN: c-index-test -cursor-at=%s:27:10 -ffreestanding %s | FileCheck -check-prefix=CHECK-IMPLICIT-MEMREF %s +// RUN: c-index-test -cursor-at=%s:31:28 -ffreestanding %s | FileCheck -check-prefix=CHECK-IMPLICIT-MEMREF %s // CHECK-IMPLICIT-MEMREF: MemberRefExpr=member:21:7 -// RUN: c-index-test -cursor-at=%s:35:5 %s | FileCheck -check-prefix=CHECK-DECL %s +// RUN: c-index-test -cursor-at=%s:35:5 -ffreestanding %s | FileCheck -check-prefix=CHECK-DECL %s // CHECK-DECL: VarDecl=foo:35:5 -// RUN: c-index-test -cursor-at=%s:21:3 %s | FileCheck -check-prefix=CHECK-MEMBER %s +// RUN: c-index-test -cursor-at=%s:21:3 -ffreestanding %s | FileCheck -check-prefix=CHECK-MEMBER %s // CHECK-MEMBER: FieldDecl=member:21:7 (Definition) // CHECK-MEMBER-NEXT: Completion string: {ResultType int}{TypedText member} -// RUN: c-index-test -cursor-at=%s:38:12 -cursor-at=%s:39:5 %s | FileCheck -check-prefix=CHECK-CXXCATCH %s +// RUN: c-index-test -cursor-at=%s:38:12 -cursor-at=%s:39:5 -ffreestanding %s | FileCheck -check-prefix=CHECK-CXXCATCH %s // CHECK-CXXCATCH: TypeRef=struct X:3:8 // CHECK-CXXCATCH-NEXT: TypeRef=struct X:3:8 -// RUN: c-index-test -test-load-source-usrs local %s | FileCheck -check-prefix=CHECK-USR %s +// RUN: c-index-test -test-load-source-usrs local -ffreestanding %s | FileCheck -check-prefix=CHECK-USR %s // CHECK-USR: get-cursor.cpp c:get-cursor.cpp@472@F@test#@e Extent=[38:12 - 38:15] // CHECK-USR: get-cursor.cpp c:get-cursor.cpp@483@F@test#@x Extent=[39:5 - 39:8] -// RUN: c-index-test -cursor-at=%s:45:9 %s | FileCheck -check-prefix=CHECK-LOCALCLASS %s +// RUN: c-index-test -cursor-at=%s:45:9 -ffreestanding %s | FileCheck -check-prefix=CHECK-LOCALCLASS %s // CHECK-LOCALCLASS: 45:9 DeclRefExpr=x:44:11 Extent=[45:9 - 45:10] Spelling=x ([45:9 - 45:10]) -// RUN: c-index-test -cursor-at=%s:50:23 -cursor-at=%s:55:23 %s | FileCheck -check-prefix=CHECK-TEMPLPARAM %s +// RUN: c-index-test -cursor-at=%s:50:23 -cursor-at=%s:55:23 -ffreestanding %s | FileCheck -check-prefix=CHECK-TEMPLPARAM %s // CHECK-TEMPLPARAM: 50:23 TypeRef=struct X:3:8 Extent=[50:23 - 50:24] Spelling=struct X ([50:23 - 50:24]) // CHECK-TEMPLPARAM: 55:23 TypeRef=struct X:3:8 Extent=[55:23 - 55:24] Spelling=struct X ([55:23 - 55:24]) -// RUN: c-index-test -cursor-at=%s:66:23 %s | FileCheck -check-prefix=CHECK-TEMPLSPEC %s +// RUN: c-index-test -cursor-at=%s:66:23 -ffreestanding %s | FileCheck -check-prefix=CHECK-TEMPLSPEC %s // CHECK-TEMPLSPEC: 66:23 ClassDecl=TC:66:23 (Definition) [Specialization of TC:59:7] Extent=[66:1 - 66:31] Spelling=TC ([66:23 - 66:25]) -// RUN: c-index-test -cursor-at=%s:69:3 -cursor-at=%s:70:11 -cursor-at=%s:73:6 -cursor-at=%s:74:6 -cursor-at=%s:77:8 -cursor-at=%s:78:8 -cursor-at=%s:79:8 -cursor-at=%s:80:8 -cursor-at=%s:81:8 -cursor-at=%s:82:8 -cursor-at=%s:85:6 -cursor-at=%s:86:6 -cursor-at=%s:87:6 -cursor-at=%s:88:6 -cursor-at=%s:91:5 -cursor-at=%s:92:5 -cursor-at=%s:93:5 -cursor-at=%s:94:5 -cursor-at=%s:95:5 -cursor-at=%s:96:5 -cursor-at=%s:97:5 -cursor-at=%s:98:5 -cursor-at=%s:100:5 -cursor-at=%s:101:5 -cursor-at=%s:104:6 -cursor-at=%s:105:6 -cursor-at=%s:106:6 -cursor-at=%s:107:6 -cursor-at=%s:108:6 -cursor-at=%s:109:6 -cursor-at=%s:110:6 -cursor-at=%s:111:6 -cursor-at=%s:113:6 -cursor-at=%s:114:6 -cursor-at=%s:117:8 -cursor-at=%s:118:8 -cursor-at=%s:120:8 -cursor-at=%s:121:8 -cursor-at=%s:122:8 -cursor-at=%s:123:8 -cursor-at=%s:124:8 -cursor-at=%s:125:8 -cursor-at=%s:128:6 -cursor-at=%s:129:6 -cursor-at=%s:130:6 -cursor-at=%s:132:3 -cursor-at=%s:146:15 -cursor-at=%s:149:6 -cursor-at=%s:150:25 -cursor-at=%s:151:6 -cursor-at=%s:152:6 -cursor-at=%s:153:6 -std=c++11 %s | FileCheck -check-prefix=CHECK-SPELLING %s +// RUN: c-index-test -cursor-at=%s:69:3 -cursor-at=%s:70:11 -cursor-at=%s:73:6 -cursor-at=%s:74:6 -cursor-at=%s:77:8 -cursor-at=%s:78:8 -cursor-at=%s:79:8 -cursor-at=%s:80:8 -cursor-at=%s:81:8 -cursor-at=%s:82:8 -cursor-at=%s:85:6 -cursor-at=%s:86:6 -cursor-at=%s:87:6 -cursor-at=%s:88:6 -cursor-at=%s:91:5 -cursor-at=%s:92:5 -cursor-at=%s:93:5 -cursor-at=%s:94:5 -cursor-at=%s:95:5 -cursor-at=%s:96:5 -cursor-at=%s:97:5 -cursor-at=%s:98:5 -cursor-at=%s:100:5 -cursor-at=%s:101:5 -cursor-at=%s:104:6 -cursor-at=%s:105:6 -cursor-at=%s:106:6 -cursor-at=%s:107:6 -cursor-at=%s:108:6 -cursor-at=%s:109:6 -cursor-at=%s:110:6 -cursor-at=%s:111:6 -cursor-at=%s:113:6 -cursor-at=%s:114:6 -cursor-at=%s:117:8 -cursor-at=%s:118:8 -cursor-at=%s:120:8 -cursor-at=%s:121:8 -cursor-at=%s:122:8 -cursor-at=%s:123:8 -cursor-at=%s:124:8 -cursor-at=%s:125:8 -cursor-at=%s:128:6 -cursor-at=%s:129:6 -cursor-at=%s:130:6 -cursor-at=%s:132:3 -cursor-at=%s:146:15 -cursor-at=%s:149:6 -cursor-at=%s:150:25 -cursor-at=%s:151:6 -cursor-at=%s:152:6 -cursor-at=%s:153:6 -std=c++11 -ffreestanding %s | FileCheck -check-prefix=CHECK-SPELLING %s // CHECK-SPELLING: 69:3 CXXConstructor=A:69:3 (default constructor) Extent=[69:3 - 69:6] Spelling=A ([69:3 - 69:4]) // CHECK-SPELLING: 70:11 CXXDestructor=~A:70:11 (virtual) Extent=[70:3 - 70:15] Spelling=~A ([70:11 - 70:13]) // CHECK-SPELLING: 73:6 CXXMethod=operator=:73:6 Extent=[73:3 - 73:25] Spelling=operator= ([73:6 - 73:15]) @@ -275,11 +275,11 @@ struct Z { // CHECK-SPELLING: 152:6 FunctionDecl=f_dynamic_noexcept:152:6 (noexcept dynamic) Extent=[152:1 - 152:37] Spelling=f_dynamic_noexcept ([152:6 - 152:24]) // CHECK-SPELLING: 153:6 FunctionDecl=f_dynamic_noexcept_any:153:6 (noexcept dynamic any) Extent=[153:1 - 153:41] Spelling=f_dynamic_noexcept_any ([153:6 - 153:28]) -// RUN: c-index-test -cursor-at=%s:141:13 -cursor-at=%s:141:18 -cursor-at=%s:142:11 -std=c++11 %s | FileCheck -check-prefix=CHECK-FORRANGE %s +// RUN: c-index-test -cursor-at=%s:141:13 -cursor-at=%s:141:18 -cursor-at=%s:142:11 -std=c++11 -ffreestanding %s | FileCheck -check-prefix=CHECK-FORRANGE %s // CHECK-FORRANGE: 141:13 VarDecl=lv:141:13 (Definition) Extent=[141:8 - 141:17] Spelling=lv ([141:13 - 141:15]) // CHECK-FORRANGE: 141:18 DeclRefExpr=coll:140:20 Extent=[141:18 - 141:22] Spelling=coll ([141:18 - 141:22]) // CHECK-FORRANGE: 142:11 DeclRefExpr=lv:141:13 Extent=[142:11 - 142:13] Spelling=lv ([142:11 - 142:13]) -// RUN: c-index-test -cursor-at=%s:157:18 -std=c++11 %s | FileCheck -check-prefix=CHECK-INCLASSINITIALIZER %s +// RUN: c-index-test -cursor-at=%s:157:18 -std=c++11 -ffreestanding %s | FileCheck -check-prefix=CHECK-INCLASSINITIALIZER %s // CHECK-INCLASSINITIALIZER: 157:18 DeclRefExpr=Enumerator:155:17 Extent=[157:18 - 157:28] Spelling=Enumerator ([157:18 - 157:28]) |