[clang] d3b7528 - [clang][test][NFC] Also test for serialization in AST dump tests, part 1/n.

Bruno Ricci via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 19 05:42:05 PDT 2020


Author: Bruno Ricci
Date: 2020-06-19T13:40:20+01:00
New Revision: d3b752845df0331348dad48000fc8b82afb3de5b

URL: https://github.com/llvm/llvm-project/commit/d3b752845df0331348dad48000fc8b82afb3de5b
DIFF: https://github.com/llvm/llvm-project/commit/d3b752845df0331348dad48000fc8b82afb3de5b.diff

LOG: [clang][test][NFC] Also test for serialization in AST dump tests, part 1/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 "<undeserialized declarations>"s and
the "imported"s with sed.

For tests generated with "make-ast-dump-check.sh", regenerate the
output.

Part 1/n.

Added: 
    

Modified: 
    clang/test/AST/ast-dump-overloaded-operators.cpp
    clang/test/AST/ast-dump-pipe.cl
    clang/test/AST/ast-dump-record-definition-data.cpp
    clang/test/AST/ast-dump-records.c
    clang/test/AST/ast-dump-records.cpp
    clang/test/AST/ast-dump-special-member-functions.cpp
    clang/test/AST/ast-dump-stmt.c
    clang/test/AST/ast-dump-stmt.cpp
    clang/test/AST/ast-dump-stmt.m
    clang/test/AST/ast-dump-template-decls.cpp
    clang/test/AST/ast-dump-traits.cpp
    clang/test/AST/ast-dump-wasm-attr-export.c
    clang/test/AST/ast-dump-wasm-attr-import.c
    clang/test/AST/ast-dump-wchar.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/AST/ast-dump-overloaded-operators.cpp b/clang/test/AST/ast-dump-overloaded-operators.cpp
index cd4e14be9f1a..639a0d9874eb 100644
--- a/clang/test/AST/ast-dump-overloaded-operators.cpp
+++ b/clang/test/AST/ast-dump-overloaded-operators.cpp
@@ -1,4 +1,11 @@
-// 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: | FileCheck -strict-whitespace %s
 
 enum E {};
 void operator+(E,E);
@@ -9,19 +16,26 @@ void test() {
   e + e;
   e , e;
 }
-// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
-// CHECK: `-FunctionDecl {{.*}} <line:7:1, line:11:1> line:7:6 test 'void ()'
-// CHECK-NEXT:   `-CompoundStmt {{.*}} <col:13, line:11:1>
-// CHECK-NEXT:     |-DeclStmt {{.*}} <line:8:3, col:6>
-// CHECK-NEXT:     | `-VarDecl {{.*}} <col:3, col:5> col:5 used e 'E'
-// CHECK-NEXT:     |-CXXOperatorCallExpr {{.*}} <line:9:3, col:7> 'void' '+'
+// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>{{( <undeserialized declarations>)?}}
+// CHECK: |-EnumDecl {{.*}} <{{.*}}ast-dump-overloaded-operators.cpp:10:1, col:9> col:6{{( imported)?}} referenced E
+// CHECK-NEXT: |-FunctionDecl {{.*}} <line:11:1, col:19> col:6{{( imported)?}} used operator+ 'void (E, E)'
+// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:16> col:17{{( imported)?}} 'E'
+// CHECK-NEXT: | `-ParmVarDecl {{.*}} <col:18> col:19{{( imported)?}} 'E'
+// CHECK-NEXT: |-FunctionDecl {{.*}} <line:12:1, col:19> col:6{{( imported)?}} used operator, 'void (E, E)'
+// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:16> col:17{{( imported)?}} 'E'
+// CHECK-NEXT: | `-ParmVarDecl {{.*}} <col:18> col:19{{( imported)?}} 'E'
+// CHECK-NEXT: `-FunctionDecl {{.*}} <line:14:1, line:18:1> line:14:6{{( imported)?}} test 'void ()'
+// CHECK-NEXT:   `-CompoundStmt {{.*}} <col:13, line:18:1>
+// CHECK-NEXT:     |-DeclStmt {{.*}} <line:15:3, col:6>
+// CHECK-NEXT:     | `-VarDecl {{.*}} <col:3, col:5> col:5{{( imported)?}} used e 'E'
+// CHECK-NEXT:     |-CXXOperatorCallExpr {{.*}} <line:16:3, col:7> 'void' '+'
 // CHECK-NEXT:     | |-ImplicitCastExpr {{.*}} <col:5> 'void (*)(E, E)' <FunctionToPointerDecay>
 // CHECK-NEXT:     | | `-DeclRefExpr {{.*}} <col:5> 'void (E, E)' lvalue Function {{.*}} 'operator+' 'void (E, E)'
 // CHECK-NEXT:     | |-ImplicitCastExpr {{.*}} <col:3> 'E' <LValueToRValue>
 // CHECK-NEXT:     | | `-DeclRefExpr {{.*}} <col:3> 'E' lvalue Var {{.*}} 'e' 'E'
 // CHECK-NEXT:     | `-ImplicitCastExpr {{.*}} <col:7> 'E' <LValueToRValue>
 // CHECK-NEXT:     |   `-DeclRefExpr {{.*}} <col:7> 'E' lvalue Var {{.*}} 'e' 'E'
-// CHECK-NEXT:     `-CXXOperatorCallExpr {{.*}} <line:10:3, col:7> 'void' ','
+// CHECK-NEXT:     `-CXXOperatorCallExpr {{.*}} <line:17:3, col:7> 'void' ','
 // CHECK-NEXT:       |-ImplicitCastExpr {{.*}} <col:5> 'void (*)(E, E)' <FunctionToPointerDecay>
 // CHECK-NEXT:       | `-DeclRefExpr {{.*}} <col:5> 'void (E, E)' lvalue Function {{.*}} 'operator,' 'void (E, E)'
 // CHECK-NEXT:       |-ImplicitCastExpr {{.*}} <col:3> 'E' <LValueToRValue>

diff  --git a/clang/test/AST/ast-dump-pipe.cl b/clang/test/AST/ast-dump-pipe.cl
index ceed2f6f8992..b4f78e1a7412 100644
--- a/clang/test/AST/ast-dump-pipe.cl
+++ b/clang/test/AST/ast-dump-pipe.cl
@@ -1,4 +1,13 @@
-// RUN: %clang_cc1 -triple spir64 -cl-std=CL2.0 -ast-dump -ast-dump-filter pipetype %s | FileCheck -strict-whitespace %s
+// Test without serialization:
+// RUN: %clang_cc1 -triple spir64 -cl-std=CL2.0 -ast-dump -ast-dump-filter pipetype %s \
+// RUN: | FileCheck -strict-whitespace %s
+//
+// Test with serialization:
+// RUN: %clang_cc1 -triple spir64 -cl-std=CL2.0 -emit-pch -o %t %s
+// RUN: %clang_cc1 -x cl -triple spir64 -cl-std=CL2.0 -include-pch %t -ast-dump-all -ast-dump-filter pipetype /dev/null \
+// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck -strict-whitespace %s
+
 typedef pipe int pipetype;
 // CHECK:      PipeType {{.*}} 'read_only pipe int'
 // CHECK-NEXT:   BuiltinType {{.*}} 'int'

diff  --git a/clang/test/AST/ast-dump-record-definition-data.cpp b/clang/test/AST/ast-dump-record-definition-data.cpp
index 37ed54b1dee1..9f9159768fad 100644
--- a/clang/test/AST/ast-dump-record-definition-data.cpp
+++ b/clang/test/AST/ast-dump-record-definition-data.cpp
@@ -1,4 +1,12 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++17 -ast-dump %s | FileCheck -strict-whitespace %s
+// Test without serialization:
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++17 -ast-dump %s \
+// RUN: | FileCheck -strict-whitespace %s
+//
+// Test with serialization:
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++17 -emit-pch -o %t %s
+// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++17 -include-pch %t -ast-dump-all /dev/null \
+// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck -strict-whitespace %s
 
 void f() {
   auto IsNotGenericLambda = [](){};

diff  --git a/clang/test/AST/ast-dump-records.c b/clang/test/AST/ast-dump-records.c
index e24c6047794d..2c22c5395e02 100644
--- a/clang/test/AST/ast-dump-records.c
+++ b/clang/test/AST/ast-dump-records.c
@@ -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/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck -strict-whitespace %s
 
 struct A;
 // CHECK: RecordDecl 0x{{[^ ]*}} <{{.*}}:1, col:8> col:8 struct A

diff  --git a/clang/test/AST/ast-dump-records.cpp b/clang/test/AST/ast-dump-records.cpp
index 28b9bb496917..f379b2dba529 100644
--- a/clang/test/AST/ast-dump-records.cpp
+++ b/clang/test/AST/ast-dump-records.cpp
@@ -1,4 +1,12 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++17 -ast-dump %s | FileCheck -strict-whitespace %s
+// Test without serialization:
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++17 -ast-dump %s \
+// RUN: | FileCheck -strict-whitespace %s
+//
+// Test with serialization:
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++17 -emit-pch -o %t %s
+// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++17 -include-pch %t -ast-dump-all /dev/null \
+// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck -strict-whitespace %s
 
 struct A;
 // CHECK: CXXRecordDecl 0x{{[^ ]*}} <{{.*}}:1, col:8> col:8 struct A

diff  --git a/clang/test/AST/ast-dump-special-member-functions.cpp b/clang/test/AST/ast-dump-special-member-functions.cpp
index dcfc71f74945..b98c90f67604 100644
--- a/clang/test/AST/ast-dump-special-member-functions.cpp
+++ b/clang/test/AST/ast-dump-special-member-functions.cpp
@@ -1,4 +1,12 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++17 -ast-dump %s | FileCheck -strict-whitespace %s
+// Test without serialization:
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++17 -ast-dump %s \
+// RUN: | FileCheck -strict-whitespace %s
+//
+// Test with serialization:
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++17 -emit-pch -o %t %s
+// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++17 -include-pch %t -ast-dump-all /dev/null \
+// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck -strict-whitespace %s
 
 // FIXME: exists
 

diff  --git a/clang/test/AST/ast-dump-stmt.c b/clang/test/AST/ast-dump-stmt.c
index 46fd0b68bfe3..dddd0e290d4e 100644
--- a/clang/test/AST/ast-dump-stmt.c
+++ b/clang/test/AST/ast-dump-stmt.c
@@ -1,4 +1,12 @@
-// RUN: %clang_cc1 -std=gnu11 -ast-dump %s | FileCheck -strict-whitespace %s
+// Test without serialization:
+// RUN: %clang_cc1 -std=gnu11 -ast-dump %s \
+// RUN: | FileCheck -strict-whitespace %s
+//
+// Test with serialization:
+// RUN: %clang_cc1 -std=gnu11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -x c -std=gnu11 -include-pch %t -ast-dump-all /dev/null \
+// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck -strict-whitespace %s
 
 int TestLocation = 0;
 // CHECK:      VarDecl{{.*}}TestLocation

diff  --git a/clang/test/AST/ast-dump-stmt.cpp b/clang/test/AST/ast-dump-stmt.cpp
index 9df4ee26cd9a..e4d8d8218b4e 100644
--- a/clang/test/AST/ast-dump-stmt.cpp
+++ b/clang/test/AST/ast-dump-stmt.cpp
@@ -1,4 +1,12 @@
-// RUN: %clang_cc1 -std=c++2a -triple x86_64-linux-gnu -fcxx-exceptions -ast-dump %s | FileCheck -strict-whitespace %s
+// Test without serialization:
+// RUN: %clang_cc1 -std=c++2a -triple x86_64-linux-gnu -fcxx-exceptions -ast-dump %s \
+// RUN: | FileCheck -strict-whitespace %s
+//
+// Test with serialization:
+// RUN: %clang_cc1 -std=c++2a -triple x86_64-linux-gnu -fcxx-exceptions -emit-pch -o %t %s
+// RUN: %clang_cc1 -x c++ -std=c++2a -triple x86_64-linux-gnu -fcxx-exceptions -include-pch %t -ast-dump-all /dev/null \
+// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck -strict-whitespace %s
 
 namespace n {
 void function() {}

diff  --git a/clang/test/AST/ast-dump-stmt.m b/clang/test/AST/ast-dump-stmt.m
index 9744e7a43c3e..0ce59286529c 100644
--- a/clang/test/AST/ast-dump-stmt.m
+++ b/clang/test/AST/ast-dump-stmt.m
@@ -1,4 +1,13 @@
-// RUN: %clang_cc1 -Wno-unused -fobjc-arc -fblocks -fobjc-exceptions -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s
+// Test without serialization:
+// RUN: %clang_cc1 -Wno-unused -fobjc-arc -fblocks -fobjc-exceptions -ast-dump -ast-dump-filter Test %s \
+// RUN: | FileCheck -strict-whitespace %s
+//
+// Test with serialization:
+// RUN: %clang_cc1 -Wno-unused -fobjc-arc -fblocks -fobjc-exceptions -emit-pch -o %t %s
+// RUN: %clang_cc1 -x objective-c -Wno-unused -fobjc-arc -fblocks -fobjc-exceptions -include-pch %t \
+// RUN: -ast-dump-all -ast-dump-filter Test /dev/null \
+// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck -strict-whitespace %s
 
 void TestBlockExpr(int x) {
   ^{ x; };

diff  --git a/clang/test/AST/ast-dump-template-decls.cpp b/clang/test/AST/ast-dump-template-decls.cpp
index 2fa50d8f549e..29d2335ce015 100644
--- a/clang/test/AST/ast-dump-template-decls.cpp
+++ b/clang/test/AST/ast-dump-template-decls.cpp
@@ -1,4 +1,12 @@
-// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -ast-dump %s | FileCheck -strict-whitespace %s
+// Test without serialization:
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -ast-dump %s \
+// RUN: | FileCheck -strict-whitespace %s
+//
+// Test with serialization:
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -emit-pch -o %t %s
+// RUN: %clang_cc1 -x c++ -std=c++17 -triple x86_64-unknown-unknown -include-pch %t -ast-dump-all /dev/null \
+// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck --strict-whitespace %s
 
 template <typename Ty>
 // CHECK: FunctionTemplateDecl 0x{{[^ ]*}} <{{.*}}:1, line:[[@LINE+2]]:10> col:6 a

diff  --git a/clang/test/AST/ast-dump-traits.cpp b/clang/test/AST/ast-dump-traits.cpp
index 92931e2ac67a..99ad50f528eb 100644
--- a/clang/test/AST/ast-dump-traits.cpp
+++ b/clang/test/AST/ast-dump-traits.cpp
@@ -1,4 +1,11 @@
-// 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 -triple x86_64-unknown-unknown -x c++ -include-pch %t -ast-dump-all /dev/null \
+// RUN: | FileCheck -strict-whitespace %s
 
 void test_type_trait() {
   // An unary type trait.
@@ -26,30 +33,30 @@ void test_unary_expr_or_type_trait() {
   (void) alignof(int);
   (void) __alignof(int);
 }
-// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
-// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-traits.cpp:3:1, line:11:1> line:3:6 test_type_trait 'void ()'
-// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:24, line:11:1>
-// CHECK-NEXT: |   |-DeclStmt {{.*}} <line:5:3, col:12>
-// CHECK-NEXT: |   | `-EnumDecl {{.*}} <col:3, col:11> col:8 referenced E
-// CHECK-NEXT: |   |-CStyleCastExpr {{.*}} <line:6:3, col:21> 'void' <ToVoid>
+// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>{{( <undeserialized declarations>)?}}
+// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-traits.cpp:10:1, line:18:1> line:10:6{{( imported)?}} test_type_trait 'void ()'
+// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:24, line:18:1>
+// CHECK-NEXT: |   |-DeclStmt {{.*}} <line:12:3, col:12>
+// CHECK-NEXT: |   | `-EnumDecl {{.*}} <col:3, col:11> col:8{{( imported)?}} referenced E
+// CHECK-NEXT: |   |-CStyleCastExpr {{.*}} <line:13:3, col:21> 'void' <ToVoid>
 // CHECK-NEXT: |   | `-TypeTraitExpr {{.*}} <col:10, col:21> 'bool' __is_enum
-// CHECK-NEXT: |   |-CStyleCastExpr {{.*}} <line:8:3, col:30> 'void' <ToVoid>
+// CHECK-NEXT: |   |-CStyleCastExpr {{.*}} <line:15:3, col:30> 'void' <ToVoid>
 // CHECK-NEXT: |   | `-TypeTraitExpr {{.*}} <col:10, col:30> 'bool' __is_same
-// CHECK-NEXT: |   `-CStyleCastExpr {{.*}} <line:10:3, col:47> 'void' <ToVoid>
+// CHECK-NEXT: |   `-CStyleCastExpr {{.*}} <line:17:3, col:47> 'void' <ToVoid>
 // CHECK-NEXT: |     `-TypeTraitExpr {{.*}} <col:10, col:47> 'bool' __is_constructible
-// CHECK-NEXT: |-FunctionDecl {{.*}} <line:13:1, line:16:1> line:13:6 test_array_type_trait 'void ()'
-// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:30, line:16:1>
-// CHECK-NEXT: |   `-CStyleCastExpr {{.*}} <line:15:3, col:34> 'void' <ToVoid>
+// CHECK-NEXT: |-FunctionDecl {{.*}} <line:20:1, line:23:1> line:20:6{{( imported)?}} test_array_type_trait 'void ()'
+// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:30, line:23:1>
+// CHECK-NEXT: |   `-CStyleCastExpr {{.*}} <line:22:3, col:34> 'void' <ToVoid>
 // CHECK-NEXT: |     `-ArrayTypeTraitExpr {{.*}} <col:10, col:34> 'unsigned long' __array_rank
-// CHECK-NEXT: |-FunctionDecl {{.*}} <line:18:1, line:21:1> line:18:6 test_expression_trait 'void ()'
-// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:30, line:21:1>
-// CHECK-NEXT: |   `-CStyleCastExpr {{.*}} <line:20:3, col:28> 'void' <ToVoid>
+// CHECK-NEXT: |-FunctionDecl {{.*}} <line:25:1, line:28:1> line:25:6{{( imported)?}} test_expression_trait 'void ()'
+// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:30, line:28:1>
+// CHECK-NEXT: |   `-CStyleCastExpr {{.*}} <line:27:3, col:28> 'void' <ToVoid>
 // CHECK-NEXT: |     `-ExpressionTraitExpr {{.*}} <col:10, col:28> 'bool' __is_lvalue_expr
-// CHECK-NEXT: `-FunctionDecl {{.*}} <line:23:1, line:28:1> line:23:6 test_unary_expr_or_type_trait 'void ()'
-// CHECK-NEXT:   `-CompoundStmt {{.*}} <col:38, line:28:1>
-// CHECK-NEXT:     |-CStyleCastExpr {{.*}} <line:25:3, col:20> 'void' <ToVoid>
+// CHECK-NEXT: `-FunctionDecl {{.*}} <line:30:1, line:35:1> line:30:6{{( imported)?}} test_unary_expr_or_type_trait 'void ()'
+// CHECK-NEXT:   `-CompoundStmt {{.*}} <col:38, line:35:1>
+// CHECK-NEXT:     |-CStyleCastExpr {{.*}} <line:32:3, col:20> 'void' <ToVoid>
 // CHECK-NEXT:     | `-UnaryExprOrTypeTraitExpr {{.*}} <col:10, col:20> 'unsigned long' sizeof 'int'
-// CHECK-NEXT:     |-CStyleCastExpr {{.*}} <line:26:3, col:21> 'void' <ToVoid>
+// CHECK-NEXT:     |-CStyleCastExpr {{.*}} <line:33:3, col:21> 'void' <ToVoid>
 // CHECK-NEXT:     | `-UnaryExprOrTypeTraitExpr {{.*}} <col:10, col:21> 'unsigned long' alignof 'int'
-// CHECK-NEXT:     `-CStyleCastExpr {{.*}} <line:27:3, col:23> 'void' <ToVoid>
+// CHECK-NEXT:     `-CStyleCastExpr {{.*}} <line:34:3, col:23> 'void' <ToVoid>
 // CHECK-NEXT:       `-UnaryExprOrTypeTraitExpr {{.*}} <col:10, col:23> 'unsigned long' __alignof 'int'

diff  --git a/clang/test/AST/ast-dump-wasm-attr-export.c b/clang/test/AST/ast-dump-wasm-attr-export.c
index 951b6cf8b083..d01c4816d65b 100644
--- a/clang/test/AST/ast-dump-wasm-attr-export.c
+++ b/clang/test/AST/ast-dump-wasm-attr-export.c
@@ -1,4 +1,12 @@
-// RUN: %clang_cc1 -triple wasm32-unknown-unknown -ast-dump %s | FileCheck --strict-whitespace %s
+// Test without serialization:
+// RUN: %clang_cc1 -triple wasm32-unknown-unknown -ast-dump %s \
+// RUN: | FileCheck --strict-whitespace %s
+//
+// Test with serialization:
+// RUN: %clang_cc1 -triple wasm32-unknown-unknown -emit-pch -o %t %s
+// RUN: %clang_cc1 -triple wasm32-unknown-unknown -x c -include-pch %t -ast-dump-all /dev/null \
+// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck --strict-whitespace %s
 
 // Test that functions can be redeclared and they retain their attributes.
 

diff  --git a/clang/test/AST/ast-dump-wasm-attr-import.c b/clang/test/AST/ast-dump-wasm-attr-import.c
index c4690eb15f27..122707e851b7 100644
--- a/clang/test/AST/ast-dump-wasm-attr-import.c
+++ b/clang/test/AST/ast-dump-wasm-attr-import.c
@@ -1,5 +1,13 @@
-// RUN: %clang_cc1 -triple wasm32-unknown-unknown -ast-dump %s | FileCheck --strict-whitespace %s
+// Test without serialization:
+// RUN: %clang_cc1 -triple wasm32-unknown-unknown -ast-dump %s \
+// RUN: | FileCheck --strict-whitespace %s
 
+// Test with serialization:
+// RUN: %clang_cc1 -triple wasm32-unknown-unknown -emit-pch -o %t %s
+// RUN: %clang_cc1 -triple wasm32-unknown-unknown -x c -include-pch %t -ast-dump-all /dev/null \
+// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck --strict-whitespace %s
+//
 // Test that functions can be redeclared and they retain their attributes.
 
 __attribute__((import_name("import_red"), import_module("mod"))) void red(void);

diff  --git a/clang/test/AST/ast-dump-wchar.cpp b/clang/test/AST/ast-dump-wchar.cpp
index a07bfcfa8302..c12115b90503 100644
--- a/clang/test/AST/ast-dump-wchar.cpp
+++ b/clang/test/AST/ast-dump-wchar.cpp
@@ -1,4 +1,12 @@
-// RUN: %clang_cc1 -std=c++11 -ast-dump %s -triple x86_64-linux-gnu | FileCheck %s 
+// Test without serialization:
+// RUN: %clang_cc1 -std=c++11 -ast-dump %s -triple x86_64-linux-gnu \
+// RUN: | FileCheck %s
+//
+// Test with serialization:
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -emit-pch -o %t %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -triple x86_64-linux-gnu -include-pch %t -ast-dump-all /dev/null \
+// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
+// RUN: | FileCheck %s
 
 char c8[] = u8"test\0\\\"\a\b\f\n\r\t\v\234";
 // CHECK: StringLiteral {{.*}} u8"test\000\\\"\a\b\f\n\r\t\v\234"


        


More information about the cfe-commits mailing list