From ecbf2f5f3d2e2868c6059320c185897f8f23de41 Mon Sep 17 00:00:00 2001 From: Bruno Ricci Date: Sun, 21 Jun 2020 13:35:15 +0100 Subject: [PATCH] [clang][test][NFC] Also test for serialization in AST dump tests, part 2/n. The outputs between the direct ast-dump test and the ast-dump test after deserialization should match modulo a few differences. For hand-written tests, strip the ""s and the "imported"s with sed. For tests generated with "make-ast-dump-check.sh", regenerate the output. Part 2/n. --- clang/test/AST/address_space_attribute.cpp | 7 +++++++ clang/test/AST/alignas_maybe_odr_cleanup.cpp | 7 +++++++ clang/test/AST/ast-dump-aarch64-sve-types.c | 8 ++++++++ clang/test/AST/ast-dump-arm-attr.c | 19 +++++++++++++++++-- clang/test/AST/ast-dump-array.cpp | 10 +++++++++- clang/test/AST/ast-dump-attr.cpp | 11 ++++++++++- clang/test/AST/ast-dump-attr.m | 13 ++++++++++++- clang/test/AST/ast-dump-c-attr.c | 13 ++++++++++++- clang/test/AST/ast-dump-decl-stmts.cpp | 10 +++++++++- clang/test/AST/ast-dump-decl.c | 21 ++++++++++++++++++--- clang/test/AST/ast-dump-decl.cpp | 22 ++++++++++++++++------ clang/test/AST/ast-dump-decl.m | 11 ++++++++++- clang/test/AST/ast-dump-decl.mm | 11 ++++++++++- clang/test/AST/ast-dump-expr.c | 11 ++++++++++- clang/test/AST/ast-dump-expr.cpp | 11 ++++++++++- clang/test/AST/ast-dump-funcs.cpp | 10 +++++++++- clang/test/AST/ast-dump-msp430-attr.c | 10 +++++++++- 17 files changed, 183 insertions(+), 22 deletions(-) diff --git a/clang/test/AST/address_space_attribute.cpp b/clang/test/AST/address_space_attribute.cpp index 554c9ba0a11..50777ddc750 100644 --- a/clang/test/AST/address_space_attribute.cpp +++ b/clang/test/AST/address_space_attribute.cpp @@ -1,4 +1,11 @@ +// Test without serialization: // RUN: %clang_cc1 %s -ast-dump | FileCheck %s +// +// Test with serialization: +// RUN: %clang_cc1 -emit-pch -o %t %s +// RUN: %clang_cc1 -x c++ -include-pch %t -ast-dump-all /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck %s // Veryify the ordering of the address_space attribute still comes before the // type whereas other attributes are still printed after. diff --git a/clang/test/AST/alignas_maybe_odr_cleanup.cpp b/clang/test/AST/alignas_maybe_odr_cleanup.cpp index ebc09084528..cdff1bfe8b8 100644 --- a/clang/test/AST/alignas_maybe_odr_cleanup.cpp +++ b/clang/test/AST/alignas_maybe_odr_cleanup.cpp @@ -1,4 +1,11 @@ +// Test without serialization: // RUN: %clang_cc1 -fsyntax-only %s -ast-dump | FileCheck %s +// +// Test with serialization: +// RUN: %clang_cc1 -emit-pch -o %t %s +// RUN: %clang_cc1 -x c++ -include-pch %t -ast-dump-all /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck %s struct FOO { static const int vec_align_bytes = 32; diff --git a/clang/test/AST/ast-dump-aarch64-sve-types.c b/clang/test/AST/ast-dump-aarch64-sve-types.c index a522164124a..bfb8bc220e8 100644 --- a/clang/test/AST/ast-dump-aarch64-sve-types.c +++ b/clang/test/AST/ast-dump-aarch64-sve-types.c @@ -1,5 +1,13 @@ +// Test without serialization: // RUN: %clang_cc1 -triple aarch64-linux-gnu -ast-dump \ // RUN: -ast-dump-filter __SV %s | FileCheck %s +// +// Test with serialization: +// RUN: %clang_cc1 -triple aarch64-linux-gnu -emit-pch -o %t %s +// RUN: %clang_cc1 -x c -triple aarch64-linux-gnu -include-pch %t \ +// RUN: -ast-dump-all -ast-dump-filter __SV /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck %s // CHECK: TypedefDecl {{.*}} implicit __SVInt8_t '__SVInt8_t' // CHECK-NEXT: -BuiltinType {{.*}} '__SVInt8_t' diff --git a/clang/test/AST/ast-dump-arm-attr.c b/clang/test/AST/ast-dump-arm-attr.c index 82a79761500..78f557d4eb0 100644 --- a/clang/test/AST/ast-dump-arm-attr.c +++ b/clang/test/AST/ast-dump-arm-attr.c @@ -1,5 +1,20 @@ -// RUN: %clang_cc1 -triple arm-apple-darwin -ast-dump -ast-dump-filter Test %s | FileCheck --strict-whitespace %s -// RUN: %clang_cc1 -triple armv8m.base-none-eabi -mcmse -ast-dump -ast-dump-filter Test %s | FileCheck --strict-whitespace %s --check-prefix=CHECK-CMSE +// Tests without serialization: +// RUN: %clang_cc1 -triple arm-apple-darwin -ast-dump -ast-dump-filter Test %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// RUN: %clang_cc1 -triple armv8m.base-none-eabi -mcmse -ast-dump -ast-dump-filter Test %s \ +// RUN: | FileCheck --strict-whitespace %s --check-prefix=CHECK-CMSE +// +// Tests with serialization: +// RUN: %clang_cc1 -triple arm-apple-darwin -emit-pch -o %t %s +// RUN: %clang_cc1 -x c -triple arm-apple-darwin -include-pch %t -ast-dump-all -ast-dump-filter Test /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s +// +// RUN: %clang_cc1 -triple armv8m.base-none-eabi -mcmse -emit-pch -o %t %s +// RUN: %clang_cc1 -x c -triple armv8m.base-none-eabi -mcmse -include-pch %t -ast-dump-all -ast-dump-filter Test /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s __attribute__((interrupt)) void Test(void); // CHECK: FunctionDecl{{.*}}Test diff --git a/clang/test/AST/ast-dump-array.cpp b/clang/test/AST/ast-dump-array.cpp index bfea13534a5..fe7875ec95c 100644 --- a/clang/test/AST/ast-dump-array.cpp +++ b/clang/test/AST/ast-dump-array.cpp @@ -1,4 +1,12 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s | FileCheck -strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -include-pch %t -ast-dump-all /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s void testArrayInitExpr() { diff --git a/clang/test/AST/ast-dump-attr.cpp b/clang/test/AST/ast-dump-attr.cpp index 83c4a6342db..50eef3e0d97 100644 --- a/clang/test/AST/ast-dump-attr.cpp +++ b/clang/test/AST/ast-dump-attr.cpp @@ -1,4 +1,13 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux -std=c++11 -Wno-deprecated-declarations -ast-dump -ast-dump-filter Test %s | FileCheck --strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -triple x86_64-pc-linux -std=c++11 -Wno-deprecated-declarations -ast-dump -ast-dump-filter Test %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -triple x86_64-pc-linux -std=c++11 -Wno-deprecated-declarations -emit-pch -o %t %s +// RUN: %clang_cc1 -x c++ -triple x86_64-pc-linux -std=c++11 -Wno-deprecated-declarations \ +// RUN: -include-pch %t -ast-dump-all -ast-dump-filter Test /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s int TestLocation __attribute__((unused)); diff --git a/clang/test/AST/ast-dump-attr.m b/clang/test/AST/ast-dump-attr.m index 8775d40d998..c7b133df332 100644 --- a/clang/test/AST/ast-dump-attr.m +++ b/clang/test/AST/ast-dump-attr.m @@ -1,4 +1,15 @@ -// RUN: %clang_cc1 -fdouble-square-bracket-attributes -triple x86_64-apple-macosx10.10.0 -ast-dump -ast-dump-filter Test %s | FileCheck --strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -fdouble-square-bracket-attributes -triple x86_64-apple-macosx10.10.0 \ +// RUN: -ast-dump -ast-dump-filter Test %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -fdouble-square-bracket-attributes -triple x86_64-apple-macosx10.10.0 \ +// RUN: -emit-pch -o %t %s +// RUN: %clang_cc1 -x objective-c -fdouble-square-bracket-attributes -triple x86_64-apple-macosx10.10.0 \ +// RUN: -include-pch %t -ast-dump-all -ast-dump-filter Test /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s @interface NSObject @end diff --git a/clang/test/AST/ast-dump-c-attr.c b/clang/test/AST/ast-dump-c-attr.c index 8452b797e2b..c40a2332090 100644 --- a/clang/test/AST/ast-dump-c-attr.c +++ b/clang/test/AST/ast-dump-c-attr.c @@ -1,4 +1,15 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux -fdouble-square-bracket-attributes -Wno-deprecated-declarations -ast-dump -ast-dump-filter Test %s | FileCheck --strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -triple x86_64-pc-linux -fdouble-square-bracket-attributes \ +// RUN: -Wno-deprecated-declarations -ast-dump -ast-dump-filter Test %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -triple x86_64-pc-linux -fdouble-square-bracket-attributes \ +// RUN: -Wno-deprecated-declarations -emit-pch -o %t %s +// RUN: %clang_cc1 -x c -triple x86_64-pc-linux -fdouble-square-bracket-attributes \ +// RUN: -Wno-deprecated-declarations -include-pch %t -ast-dump-all -ast-dump-filter Test /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s int Test1 [[deprecated]]; // CHECK: VarDecl{{.*}}Test1 diff --git a/clang/test/AST/ast-dump-decl-stmts.cpp b/clang/test/AST/ast-dump-decl-stmts.cpp index 3705bc5785c..613a3f9ee2b 100644 --- a/clang/test/AST/ast-dump-decl-stmts.cpp +++ b/clang/test/AST/ast-dump-decl-stmts.cpp @@ -1,4 +1,12 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s | FileCheck -strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -include-pch %t -ast-dump-all /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s void test_func() { int a, b, c; diff --git a/clang/test/AST/ast-dump-decl.c b/clang/test/AST/ast-dump-decl.c index b58f9bce2b9..0d6ef76c523 100644 --- a/clang/test/AST/ast-dump-decl.c +++ b/clang/test/AST/ast-dump-decl.c @@ -1,6 +1,21 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s | FileCheck -check-prefix CHECK-TU -strict-whitespace %s -// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -fmodule-name=X -triple x86_64-unknown-unknown -fmodule-map-file=%S/Inputs/module.modulemap -ast-dump -ast-dump-filter Test %s -DMODULES | FileCheck -check-prefix CHECK -check-prefix CHECK-MODULES -strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump -ast-dump-filter Test %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -x c -triple x86_64-unknown-unknown -include-pch %t \ +// RUN: -ast-dump-all -ast-dump-filter Test /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s +// +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s \ +// RUN: | FileCheck -check-prefix CHECK-TU --strict-whitespace %s +// +// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -fmodule-name=X \ +// RUN: -triple x86_64-unknown-unknown -fmodule-map-file=%S/Inputs/module.modulemap \ +// RUN: -ast-dump -ast-dump-filter Test %s -DMODULES \ +// RUN: | FileCheck -check-prefix CHECK -check-prefix CHECK-MODULES --strict-whitespace %s int TestLocation; // CHECK: VarDecl 0x{{[^ ]*}} <{{.*}}:[[@LINE-1]]:1, col:5> col:5 TestLocation diff --git a/clang/test/AST/ast-dump-decl.cpp b/clang/test/AST/ast-dump-decl.cpp index 1199ad7d14d..3809683bd9d 100644 --- a/clang/test/AST/ast-dump-decl.cpp +++ b/clang/test/AST/ast-dump-decl.cpp @@ -1,4 +1,14 @@ -// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -fms-extensions -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -fms-extensions \ +// RUN: -ast-dump -ast-dump-filter Test %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: FIXME: Find why the outputs differs and fix it! +// : %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -fms-extensions -emit-pch -o %t %s +// : %clang_cc1 -x c++ -std=c++11 -triple x86_64-linux-gnu -fms-extensions -include-pch %t \ +// : -ast-dump-all -ast-dump-filter Test /dev/null \ +// : | sed -e "s/ //" -e "s/ imported//" \ +// : | FileCheck --strict-whitespace %s class testEnumDecl { enum class TestEnumDeclScoped; @@ -325,7 +335,7 @@ namespace testClassTemplateDecl { // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} col:20 implicit class TestClassTemplate // CHECK-NEXT: `-FieldDecl 0x{{.+}} col:9 j 'int' -// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:256:3, col:44> col:25 class TestClassTemplate definition +// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:{{.*}}:3, col:44> col:25 class TestClassTemplate definition // CHECK-NEXT: |-DefinitionData standard_layout has_user_declared_ctor can_const_default_init // CHECK-NEXT: | |-DefaultConstructor exists non_trivial user_provided // CHECK-NEXT: | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param @@ -411,18 +421,18 @@ namespace testClassTemplateDecl { // CHECK-NEXT: | `-IntegerLiteral 0x{{.+}} 'int' 42 // CHECK-NEXT: `-CXXRecordDecl 0x{{.+}} col:31 struct TestTemplateDefaultNonType -// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:275:3, col:68> col:68 TestTemplateTemplateDefaultType +// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:{{.*}}:3, col:68> col:68 TestTemplateTemplateDefaultType // CHECK-NEXT: |-TemplateTemplateParmDecl 0x{{.+}} col:37 depth 0 index 0 TT // CHECK-NEXT: | |-TemplateTypeParmDecl 0x{{.+}} col:29 typename depth 1 index 0 // CHECK-NEXT: | `-TemplateArgument template TestClassTemplate // CHECK-NEXT: `-CXXRecordDecl 0x{{.+}} col:68 struct TestTemplateTemplateDefaultType -// CHECK: ClassTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:276:3, col:82> col:48 TestTemplateTemplateDefaultType +// CHECK: ClassTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:{{.*}}:3, col:82> col:48 TestTemplateTemplateDefaultType // CHECK-NEXT: |-TemplateTemplateParmDecl 0x{{.+}} col:37 depth 0 index 0 TT // CHECK-NEXT: | |-TemplateTypeParmDecl 0x{{.+}} col:29 typename depth 1 index 0 -// CHECK-NEXT: | `-TemplateArgument template TestClassTemplate +// CHECK-NEXT: | `-TemplateArgument template TestClassTemplate // CHECK-NEXT: | `-inherited from TemplateTemplateParm 0x{{.+}} 'TT' -// CHECK-NEXT: `-CXXRecordDecl 0x{{.+}} prev 0x{{.+}} col:48 struct TestTemplateTemplateDefaultType definition +// CHECK-NEXT: `-CXXRecordDecl 0x{{.+}} prev 0x{{.+}} col:48 struct TestTemplateTemplateDefaultType definition // CHECK-NEXT: |-DefinitionData empty aggregate standard_layout trivially_copyable pod trivial literal has_constexpr_non_copy_move_ctor can_const_default_init // CHECK-NEXT: | |-DefaultConstructor exists trivial constexpr needs_implicit defaulted_is_constexpr // CHECK-NEXT: | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param diff --git a/clang/test/AST/ast-dump-decl.m b/clang/test/AST/ast-dump-decl.m index 6cef98925f0..1e9332b21c7 100644 --- a/clang/test/AST/ast-dump-decl.m +++ b/clang/test/AST/ast-dump-decl.m @@ -1,4 +1,13 @@ -// RUN: %clang_cc1 -Wno-unused -fblocks -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -Wno-unused -fblocks -ast-dump -ast-dump-filter Test %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -Wno-unused -fblocks -emit-pch -o %t %s +// RUN: %clang_cc1 -x objective-c -Wno-unused -fblocks -include-pch %t \ +// RUN: -ast-dump-all -ast-dump-filter Test /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s @protocol P @end diff --git a/clang/test/AST/ast-dump-decl.mm b/clang/test/AST/ast-dump-decl.mm index efe356886a9..7dc60e198aa 100644 --- a/clang/test/AST/ast-dump-decl.mm +++ b/clang/test/AST/ast-dump-decl.mm @@ -1,4 +1,13 @@ -// RUN: %clang_cc1 -Wno-unused -fblocks -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -Wno-unused -fblocks -ast-dump -ast-dump-filter Test %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -Wno-unused -fblocks -emit-pch -o %t %s +// RUN: %clang_cc1 -x objective-c++ -Wno-unused -fblocks -include-pch %t \ +// RUN: -ast-dump-all -ast-dump-filter Test /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s @interface A @end diff --git a/clang/test/AST/ast-dump-expr.c b/clang/test/AST/ast-dump-expr.c index 6011ab7975b..1cb8ceaafbd 100644 --- a/clang/test/AST/ast-dump-expr.c +++ b/clang/test/AST/ast-dump-expr.c @@ -1,4 +1,13 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -std=gnu11 -ast-dump %s | FileCheck -strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -std=gnu11 -ast-dump %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -std=gnu11 -emit-pch -o %t %s +// RUN: %clang_cc1 -x c -triple x86_64-unknown-unknown -Wno-unused-value -std=gnu11 \ +// RUN: -include-pch %t -ast-dump-all /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s void Comma(void) { 1, 2, 3; diff --git a/clang/test/AST/ast-dump-expr.cpp b/clang/test/AST/ast-dump-expr.cpp index d52caf329f9..33b00f6d6e6 100644 --- a/clang/test/AST/ast-dump-expr.cpp +++ b/clang/test/AST/ast-dump-expr.cpp @@ -1,4 +1,13 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -fcxx-exceptions -std=gnu++17 -ast-dump %s | FileCheck -strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -fcxx-exceptions -std=gnu++17 -ast-dump %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -fcxx-exceptions -std=gnu++17 -emit-pch -o %t %s +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -Wno-unused-value -fcxx-exceptions -std=gnu++17 \ +// RUN: -include-pch %t -ast-dump-all /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s namespace std { using size_t = decltype(sizeof(0)); diff --git a/clang/test/AST/ast-dump-funcs.cpp b/clang/test/AST/ast-dump-funcs.cpp index 62afcc61fc5..61fb5d4eb65 100644 --- a/clang/test/AST/ast-dump-funcs.cpp +++ b/clang/test/AST/ast-dump-funcs.cpp @@ -1,4 +1,12 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s | FileCheck -strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -include-pch %t -ast-dump-all /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s struct R { R() = default; diff --git a/clang/test/AST/ast-dump-msp430-attr.c b/clang/test/AST/ast-dump-msp430-attr.c index 3ccb3bdb705..f228cd8dbdb 100644 --- a/clang/test/AST/ast-dump-msp430-attr.c +++ b/clang/test/AST/ast-dump-msp430-attr.c @@ -1,4 +1,12 @@ -// RUN: %clang_cc1 -triple msp430-unknown-unknown -ast-dump -ast-dump-filter Test %s | FileCheck --strict-whitespace %s +// Test without serialization: +// RUN: %clang_cc1 -triple msp430-unknown-unknown -ast-dump -ast-dump-filter Test %s \ +// RUN: | FileCheck --strict-whitespace %s +// +// Test with serialization: +// RUN: %clang_cc1 -triple msp430-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -x c -triple msp430-unknown-unknown -include-pch %t -ast-dump-all -ast-dump-filter Test /dev/null \ +// RUN: | sed -e "s/ //" -e "s/ imported//" \ +// RUN: | FileCheck --strict-whitespace %s __attribute__((interrupt(12))) void Test(void); // CHECK: FunctionDecl{{.*}}Test -- 2.11.0