None of these tests are really intended to test the file offset as much as to test the structure. Making the regex allows this test to work even if the file is checked out with CRLF line endings. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D119362
37 lines
1.0 KiB
Objective-C
37 lines
1.0 KiB
Objective-C
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -x objective-c -fobjc-arc -ast-dump=json -ast-dump-filter Test %s | FileCheck %s
|
|
|
|
typedef struct {
|
|
id f;
|
|
} S;
|
|
|
|
id TestCompoundLiteral(id a) {
|
|
return ((S){ .f = a }).f;
|
|
}
|
|
|
|
// CHECK: "kind": "ExprWithCleanups",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 10,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 26,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "desugaredQualType": "id",
|
|
// CHECK-NEXT: "qualType": "id",
|
|
// CHECK-NEXT: "typeAliasDeclId": "0x{{.*}}"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "valueCategory": "prvalue",
|
|
// CHECK-NEXT: "cleanupsHaveSideEffects": true,
|
|
// CHECK-NEXT: "cleanups": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "CompoundLiteralExpr"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ],
|