From f9ad1d1c775a8e264bebc15d75e0c6e5c20eefc7 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 14 Oct 2021 14:48:17 -0700 Subject: [PATCH] Revert "Compress formatting of array type names (int [4] -> int[4])" Looks like lldb has some issues with this - somehow it causes lldb to treat a "char[N]" type as an array of chars (prints them out individually) but a "char [N]" is printed as a string. (even though the DWARF doesn't have this string in it - it's something to do with the string lldb generates for itself using clang) This reverts commit 277623f4d5a672d707390e2c3eaf30a9eb4b075c. --- clang/lib/AST/TypePrinter.cpp | 4 ++ clang/test/ARCMT/cxx-checking.mm | 2 +- .../test/AST/ast-dump-APValue-arithmetic.cpp | 4 +- clang/test/AST/ast-dump-APValue-array.cpp | 8 +-- clang/test/AST/ast-dump-array.cpp | 6 +- clang/test/AST/ast-dump-color.cpp | 2 +- clang/test/AST/ast-dump-expr-json.c | 14 ++-- clang/test/AST/ast-dump-expr-json.cpp | 2 +- clang/test/AST/ast-dump-expr-json.m | 16 ++--- clang/test/AST/ast-dump-expr.c | 14 ++-- clang/test/AST/ast-dump-expr.cpp | 2 +- clang/test/AST/ast-dump-file-line-json.c | 4 +- .../ast-dump-openmp-begin-declare-variant_9.c | 20 +++--- clang/test/AST/ast-dump-records-json.cpp | 4 +- clang/test/AST/ast-dump-records.c | 4 +- clang/test/AST/ast-dump-records.cpp | 4 +- clang/test/AST/ast-dump-stmt-json.cpp | 22 +++--- clang/test/AST/ast-dump-stmt.cpp | 16 ++--- .../test/AST/ast-dump-template-decls-json.cpp | 4 +- clang/test/AST/ast-dump-templates.cpp | 4 +- clang/test/AST/ast-dump-types-errors-json.cpp | 4 +- clang/test/AST/atomic-expr.cpp | 12 ++-- clang/test/AST/float16.cpp | 16 ++--- clang/test/AST/pr47636.cpp | 18 ++--- clang/test/AST/sourceranges.cpp | 2 +- clang/test/ASTMerge/var/test.c | 4 +- .../Analysis/auto-obj-dtors-cfg-output.cpp | 12 ++-- clang/test/Analysis/cfg.cpp | 16 ++--- clang/test/Analysis/explain-svals.cpp | 2 +- clang/test/Analysis/lifetime-cfg-output.cpp | 4 +- clang/test/Analysis/malloc-sizeof.c | 2 +- clang/test/Analysis/more-dtors-cfg-output.cpp | 8 +-- clang/test/Analysis/scopes-cfg-output.cpp | 10 +-- clang/test/CXX/basic/basic.types/p10.cpp | 6 +- .../CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp | 2 +- .../dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp | 2 +- clang/test/CXX/dcl.decl/dcl.decomp/p2.cpp | 4 +- .../dcl.decl/dcl.init/dcl.init.list/p3.cpp | 4 +- .../CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp | 24 +++---- .../CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp | 8 +-- clang/test/CXX/drs/dr177x.cpp | 8 +-- .../expr.prim.id/mixed-constraints.cpp | 10 +-- .../CXX/expr/expr.prim/expr.prim.id/p4.cpp | 4 +- .../expr/expr.prim/expr.prim.lambda/p4.cpp | 2 +- .../test/CXX/special/class.copy/p23-cxx11.cpp | 2 +- clang/test/CXX/special/class.ctor/p5-0x.cpp | 2 +- .../stmt.stmt/stmt.iter/stmt.ranged/p1.cpp | 4 +- .../CXX/temp/temp.arg/temp.arg.nontype/p1.cpp | 2 +- .../non-function-templates.cpp | 20 +++--- .../CXX/temp/temp.decls/temp.variadic/p2.cpp | 6 +- clang/test/CXX/temp/temp.explicit/p8.cpp | 6 +- clang/test/CXX/temp/temp.param/p10-2a.cpp | 30 ++++---- clang/test/CodeGen/const-init.c | 2 +- clang/test/CodeGen/dump-struct-builtin.c | 4 +- .../test/Import/array-init-loop-expr/test.cpp | 2 +- clang/test/Index/print-type-size.cpp | 2 +- clang/test/Index/print-type.c | 10 +-- clang/test/Index/print-type.cpp | 12 ++-- .../aix-Wpacked-expecting-diagnostics.cpp | 4 +- .../test/Layout/aix-double-struct-member.cpp | 12 ++-- .../aix-no-unique-address-with-double.cpp | 6 +- .../Layout/aix-power-alignment-typedef.cpp | 2 +- clang/test/Layout/ms-aligned-array.c | 6 +- clang/test/Layout/ms-x86-basic-layout.cpp | 20 +++--- clang/test/Layout/ms-x86-empty-layout.c | 12 ++-- .../Layout/ms-x86-empty-nonvirtual-bases.cpp | 4 +- .../test/Layout/ms-x86-empty-virtual-base.cpp | 4 +- .../ms-x86-lazy-empty-nonvirtual-base.cpp | 72 +++++++++---------- clang/test/Layout/ms-x86-misalignedarray.cpp | 4 +- clang/test/Layout/ms-x86-pack-and-align.cpp | 8 +-- clang/test/Layout/no-unique-address.cpp | 4 +- clang/test/Layout/watchos-standard-layout.cpp | 4 +- clang/test/Misc/diag-macro-backtrace2.c | 2 +- clang/test/Misc/integer-literal-printing.cpp | 14 ++-- clang/test/Modules/cxx-templates.cpp | 8 +-- clang/test/Modules/odr_hash.cpp | 8 +-- .../distribute_firstprivate_messages.cpp | 4 +- ...ute_parallel_for_firstprivate_messages.cpp | 4 +- ...bute_parallel_for_lastprivate_messages.cpp | 4 +- ...ribute_parallel_for_reduction_messages.cpp | 4 +- ...bute_parallel_for_simd_shared_messages.cpp | 8 +-- .../distribute_simd_firstprivate_messages.cpp | 4 +- .../distribute_simd_lastprivate_messages.cpp | 4 +- .../distribute_simd_reduction_messages.cpp | 4 +- .../test/OpenMP/parallel_reduction_messages.c | 2 +- ...teams_distribute_firstprivate_messages.cpp | 2 +- clang/test/PCH/objc_exprs.m | 2 +- clang/test/Parser/atomic.c | 2 +- clang/test/Sema/array-constraint.c | 2 +- clang/test/Sema/array-init.c | 28 ++++---- clang/test/Sema/assign.c | 4 +- .../builtin-expect-with-probability-avr.cpp | 2 +- .../Sema/builtin-expect-with-probability.cpp | 2 +- clang/test/Sema/c11-typedef-redef.c | 4 +- clang/test/Sema/compound-literal.c | 2 +- clang/test/Sema/crash-invalid-array.c | 2 +- clang/test/Sema/empty1.c | 6 +- clang/test/Sema/extern-redecl.c | 6 +- clang/test/Sema/generic-selection.c | 2 +- clang/test/Sema/gnu-flags.c | 2 +- clang/test/Sema/incomplete-decl.c | 2 +- clang/test/Sema/matrix-type-builtins.c | 4 +- clang/test/Sema/merge-decls.c | 2 +- clang/test/Sema/nullability.c | 22 +++--- clang/test/Sema/predef.c | 2 +- clang/test/Sema/typedef-retain.c | 2 +- clang/test/Sema/types.c | 2 +- clang/test/Sema/var-redecl.c | 2 +- clang/test/Sema/vla.cpp | 2 +- clang/test/Sema/warn-sizeof-array-decay.c | 10 +-- clang/test/Sema/warn-sizeof-arrayarg.c | 8 +-- clang/test/Sema/warn-write-strings.c | 2 +- clang/test/SemaCXX/MicrosoftExtensions.cpp | 2 +- .../test/SemaCXX/address-space-initialize.cpp | 2 +- clang/test/SemaCXX/alias-template.cpp | 2 +- clang/test/SemaCXX/array-bound-merge.cpp | 4 +- clang/test/SemaCXX/attr-gnu.cpp | 4 +- .../c99-variable-length-array-cxx11.cpp | 2 +- .../SemaCXX/c99-variable-length-array.cpp | 4 +- clang/test/SemaCXX/compare-cxx2a.cpp | 2 +- .../SemaCXX/constant-expression-cxx11.cpp | 4 +- .../SemaCXX/constant-expression-cxx2a.cpp | 8 +-- .../SemaCXX/constexpr-builtin-bit-cast.cpp | 2 +- clang/test/SemaCXX/constexpr-string.cpp | 2 +- clang/test/SemaCXX/coroutines.cpp | 2 +- .../SemaCXX/cxx0x-initializer-aggregates.cpp | 2 +- .../SemaCXX/cxx0x-type-convert-construct.cpp | 12 ++-- clang/test/SemaCXX/cxx1z-decomposition.cpp | 10 +-- clang/test/SemaCXX/cxx2a-compat.cpp | 4 +- clang/test/SemaCXX/dcl_init_aggr.cpp | 2 +- clang/test/SemaCXX/decl-init-ref.cpp | 6 +- clang/test/SemaCXX/exceptions.cpp | 2 +- clang/test/SemaCXX/flexible-array-test.cpp | 4 +- clang/test/SemaCXX/for-range-examples.cpp | 4 +- clang/test/SemaCXX/new-delete.cpp | 2 +- clang/test/SemaCXX/no-wchar.cpp | 4 +- clang/test/SemaCXX/nullability.cpp | 4 +- clang/test/SemaCXX/overload-call.cpp | 4 +- clang/test/SemaCXX/overload-member-call.cpp | 4 +- clang/test/SemaCXX/static-assert-cxx17.cpp | 4 +- clang/test/SemaCXX/typedef-redecl.cpp | 4 +- clang/test/SemaCXX/typeid.cpp | 4 +- clang/test/SemaCXX/warn-string-conversion.cpp | 22 +++--- clang/test/SemaObjC/argument-checking.m | 2 +- clang/test/SemaObjC/flexible-array.m | 48 ++++++------- clang/test/SemaObjC/ivar-sem-check-1.m | 2 +- clang/test/SemaObjC/method-bad-param.m | 2 +- clang/test/SemaObjC/nullability.m | 6 +- .../SemaObjC/rdr-6211479-array-property.m | 2 +- clang/test/SemaObjC/warn-write-strings.m | 2 +- clang/test/SemaObjCXX/message.mm | 2 +- clang/test/SemaOpenCL/half.cl | 2 +- .../SemaOpenCL/invalid-kernel-parameters.cl | 2 +- clang/test/SemaOpenCL/predefined-expr.cl | 2 +- .../address-space-deduction.clcpp | 2 +- clang/test/SemaTemplate/deduction-guide.cpp | 10 +-- clang/test/SemaTemplate/instantiate-init.cpp | 2 +- .../SemaTemplate/instantiate-local-class.cpp | 4 +- .../SemaTemplate/instantiate-static-var.cpp | 4 +- clang/test/SemaTemplate/pack-deduction.cpp | 2 +- clang/test/SemaTemplate/temp_arg_nontype.cpp | 2 +- clang/unittests/AST/ASTImporterTest.cpp | 10 +-- .../ASTMatchers/ASTMatchersNodeTest.cpp | 4 +- .../ASTMatchers/ASTMatchersTraversalTest.cpp | 4 +- 164 files changed, 531 insertions(+), 527 deletions(-) diff --git a/clang/lib/AST/TypePrinter.cpp b/clang/lib/AST/TypePrinter.cpp index cceed1ca26f3..e573037db10e 100644 --- a/clang/lib/AST/TypePrinter.cpp +++ b/clang/lib/AST/TypePrinter.cpp @@ -503,6 +503,7 @@ void TypePrinter::printMemberPointerAfter(const MemberPointerType *T, void TypePrinter::printConstantArrayBefore(const ConstantArrayType *T, raw_ostream &OS) { IncludeStrongLifetimeRAII Strong(Policy); + SaveAndRestore NonEmptyPH(HasEmptyPlaceHolder, false); printBefore(T->getElementType(), OS); } @@ -525,6 +526,7 @@ void TypePrinter::printConstantArrayAfter(const ConstantArrayType *T, void TypePrinter::printIncompleteArrayBefore(const IncompleteArrayType *T, raw_ostream &OS) { IncludeStrongLifetimeRAII Strong(Policy); + SaveAndRestore NonEmptyPH(HasEmptyPlaceHolder, false); printBefore(T->getElementType(), OS); } @@ -537,6 +539,7 @@ void TypePrinter::printIncompleteArrayAfter(const IncompleteArrayType *T, void TypePrinter::printVariableArrayBefore(const VariableArrayType *T, raw_ostream &OS) { IncludeStrongLifetimeRAII Strong(Policy); + SaveAndRestore NonEmptyPH(HasEmptyPlaceHolder, false); printBefore(T->getElementType(), OS); } @@ -583,6 +586,7 @@ void TypePrinter::printDependentSizedArrayBefore( const DependentSizedArrayType *T, raw_ostream &OS) { IncludeStrongLifetimeRAII Strong(Policy); + SaveAndRestore NonEmptyPH(HasEmptyPlaceHolder, false); printBefore(T->getElementType(), OS); } diff --git a/clang/test/ARCMT/cxx-checking.mm b/clang/test/ARCMT/cxx-checking.mm index f8836d9d7cd8..d6441def09b4 100644 --- a/clang/test/ARCMT/cxx-checking.mm +++ b/clang/test/ARCMT/cxx-checking.mm @@ -80,7 +80,7 @@ int check_non_pod_block1[__is_pod(int (^ __unsafe_unretained)(int))? 1 : -1]; struct FlexibleArrayMember0 { int length; - id array[]; // expected-error{{flexible array member 'array' of type '__strong id[]' with non-trivial destruction}} + id array[]; // expected-error{{flexible array member 'array' of type '__strong id []' with non-trivial destruction}} }; struct FlexibleArrayMember1 { diff --git a/clang/test/AST/ast-dump-APValue-arithmetic.cpp b/clang/test/AST/ast-dump-APValue-arithmetic.cpp index c474e4be0e8c..e51c1cee04cf 100644 --- a/clang/test/AST/ast-dump-APValue-arithmetic.cpp +++ b/clang/test/AST/ast-dump-APValue-arithmetic.cpp @@ -36,13 +36,13 @@ void Test() { // CHECK-NEXT: | |-value: ComplexFloat 3.141500e+00 + 4.200000e+01i constexpr _Complex int ArrayOfComplexInt[10] = {ComplexInt, ComplexInt, ComplexInt, ComplexInt}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} ArrayOfComplexInt 'const _Complex int[10]' constexpr cinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} ArrayOfComplexInt 'const _Complex int [10]' constexpr cinit // CHECK-NEXT: | |-value: Array size=10 // CHECK-NEXT: | | |-elements: ComplexInt 42 + 24i, ComplexInt 42 + 24i, ComplexInt 42 + 24i, ComplexInt 42 + 24i // CHECK-NEXT: | | `-filler: 6 x ComplexInt 0 + 0i constexpr _Complex float ArrayOfComplexFloat[10] = {ComplexFloat, ComplexFloat, ComplexInt, ComplexInt}; - // CHECK: `-VarDecl {{.*}} col:{{.*}} ArrayOfComplexFloat 'const _Complex float[10]' constexpr cinit + // CHECK: `-VarDecl {{.*}} col:{{.*}} ArrayOfComplexFloat 'const _Complex float [10]' constexpr cinit // CHECK-NEXT: |-value: Array size=10 // CHECK-NEXT: | |-elements: ComplexFloat 3.141500e+00 + 4.200000e+01i, ComplexFloat 3.141500e+00 + 4.200000e+01i, ComplexFloat 4.200000e+01 + 2.400000e+01i, ComplexFloat 4.200000e+01 + 2.400000e+01i // CHECK-NEXT: | `-filler: 6 x ComplexFloat 0.000000e+00 + 0.000000e+00i diff --git a/clang/test/AST/ast-dump-APValue-array.cpp b/clang/test/AST/ast-dump-APValue-array.cpp index d5fc521da448..72e519208ac5 100644 --- a/clang/test/AST/ast-dump-APValue-array.cpp +++ b/clang/test/AST/ast-dump-APValue-array.cpp @@ -43,7 +43,7 @@ void Test() { constexpr float arr_f[3][5] = { {1, 2, 3, 4, 5}, }; - // CHECK: | `-VarDecl {{.*}} line:{{.*}} arr_f 'const float[3][5]' constexpr cinit + // CHECK: | `-VarDecl {{.*}} line:{{.*}} arr_f 'const float [3][5]' constexpr cinit // CHECK-NEXT: | |-value: Array size=3 // CHECK-NEXT: | | |-element: Array size=5 // CHECK-NEXT: | | | |-elements: Float 1.000000e+00, Float 2.000000e+00, Float 3.000000e+00, Float 4.000000e+00 @@ -52,7 +52,7 @@ void Test() { // CHECK-NEXT: | | `-filler: 5 x Float 0.000000e+00 constexpr S0 arr_s0[2] = {{1, 2}, {3, 4}}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} arr_s0 'const S0[2]' constexpr cinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} arr_s0 'const S0 [2]' constexpr cinit // CHECK-NEXT: | |-value: Array size=2 // CHECK-NEXT: | | |-element: Struct // CHECK-NEXT: | | | `-field: Array size=2 @@ -62,12 +62,12 @@ void Test() { // CHECK-NEXT: | | `-elements: Int 3, Int 4 constexpr U0 arr_u0[2] = {{.i = 42}, {.f = 3.1415f}}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} arr_u0 'const U0[2]' constexpr cinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} arr_u0 'const U0 [2]' constexpr cinit // CHECK-NEXT: | |-value: Array size=2 // CHECK-NEXT: | | `-elements: Union .i Int 42, Union .f Float 3.141500e+00 constexpr S1 arr_s1[2] = {}; - // CHECK: `-VarDecl {{.*}} col:{{.*}} arr_s1 'const S1[2]' constexpr cinit + // CHECK: `-VarDecl {{.*}} col:{{.*}} arr_s1 'const S1 [2]' constexpr cinit // CHECK-NEXT: |-value: Array size=2 // CHECK-NEXT: | |-element: Struct // CHECK-NEXT: | | |-field: Struct diff --git a/clang/test/AST/ast-dump-array.cpp b/clang/test/AST/ast-dump-array.cpp index 609ad31a0e42..2e94f7769e0b 100644 --- a/clang/test/AST/ast-dump-array.cpp +++ b/clang/test/AST/ast-dump-array.cpp @@ -13,7 +13,7 @@ void testArrayInitExpr() int a[10]; auto l = [a]{ }; - // CHECK: |-ArrayInitLoopExpr 0x{{[^ ]*}} 'int[10]' + // CHECK: |-ArrayInitLoopExpr 0x{{[^ ]*}} 'int [10]' // CHECK: | `-ArrayInitIndexExpr 0x{{[^ ]*}} <> 'unsigned long' } @@ -22,7 +22,7 @@ class array { T data[Size]; using array_T_size = T[Size]; - // CHECK: `-DependentSizedArrayType 0x{{[^ ]*}} 'T[Size]' dependent + // CHECK: `-DependentSizedArrayType 0x{{[^ ]*}} 'T [Size]' dependent using const_array_T_size = const T[Size]; - // CHECK: `-DependentSizedArrayType 0x{{[^ ]*}} 'const T[Size]' dependent + // CHECK: `-DependentSizedArrayType 0x{{[^ ]*}} 'const T [Size]' dependent }; diff --git a/clang/test/AST/ast-dump-color.cpp b/clang/test/AST/ast-dump-color.cpp index 87797f6bffc5..baaf9729c7ce 100644 --- a/clang/test/AST/ast-dump-color.cpp +++ b/clang/test/AST/ast-dump-color.cpp @@ -32,7 +32,7 @@ struct Invalid { //CHECK: {{^}}[[GREEN:.\[0;1;32m]]TranslationUnitDecl[[RESET:.\[0m]][[Yellow:.\[0;33m]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]][[RESET]]> [[Yellow]][[RESET]]{{$}} //CHECK: {{^}}[[Blue:.\[0;34m]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]][[RESET]]> [[Yellow]][[RESET]] implicit[[CYAN:.\[0;1;36m]] __int128_t[[RESET]] [[Green:.\[0;32m]]'__int128'[[RESET]]{{$}} //CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]][[RESET]]> [[Yellow]][[RESET]] implicit[[CYAN]] __uint128_t[[RESET]] [[Green]]'unsigned __int128'[[RESET]]{{$}} -//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]][[RESET]]> [[Yellow]][[RESET]] implicit[[CYAN]] __builtin_va_list[[RESET]] [[Green]]'__va_list_tag[1]'[[RESET]]{{$}} +//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]][[RESET]]> [[Yellow]][[RESET]] implicit[[CYAN]] __builtin_va_list[[RESET]] [[Green]]'__va_list_tag [1]'[[RESET]]{{$}} //CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]VarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]{{.*}}ast-dump-color.cpp:6:1[[RESET]], [[Yellow]]col:5[[RESET]]> [[Yellow]]col:5[[RESET]][[CYAN]] Test[[RESET]] [[Green]]'int'[[RESET]] //CHECK: {{^}}[[Blue]]| |-[[RESET]][[BLUE:.\[0;1;34m]]UnusedAttr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:25[[RESET]]> unused{{$}} //CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]FullComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:4:4[[RESET]], [[Yellow]]line:5:8[[RESET]]>{{$}} diff --git a/clang/test/AST/ast-dump-expr-json.c b/clang/test/AST/ast-dump-expr-json.c index c322625cb2b2..3e288b9f0e70 100644 --- a/clang/test/AST/ast-dump-expr-json.c +++ b/clang/test/AST/ast-dump-expr-json.c @@ -4689,7 +4689,7 @@ void PrimaryExpressions(int a) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[4]" +// CHECK-NEXT: "qualType": "int [4]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "inner": [ @@ -4709,7 +4709,7 @@ void PrimaryExpressions(int a) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[4]" +// CHECK-NEXT: "qualType": "int [4]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "inner": [ @@ -5106,7 +5106,7 @@ void PrimaryExpressions(int a) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "char[2]" +// CHECK-NEXT: "qualType": "char [2]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "value": "\"a\"" @@ -5151,7 +5151,7 @@ void PrimaryExpressions(int a) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[2]" +// CHECK-NEXT: "qualType": "int [2]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "value": "L\"a\"" @@ -5196,7 +5196,7 @@ void PrimaryExpressions(int a) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "char[2]" +// CHECK-NEXT: "qualType": "char [2]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "value": "u8\"a\"" @@ -5241,7 +5241,7 @@ void PrimaryExpressions(int a) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "unsigned int[2]" +// CHECK-NEXT: "qualType": "unsigned int [2]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "value": "U\"a\"" @@ -5286,7 +5286,7 @@ void PrimaryExpressions(int a) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "unsigned short[2]" +// CHECK-NEXT: "qualType": "unsigned short [2]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "value": "u\"a\"" diff --git a/clang/test/AST/ast-dump-expr-json.cpp b/clang/test/AST/ast-dump-expr-json.cpp index 3ef2f78551b6..b9c66b0fc90e 100644 --- a/clang/test/AST/ast-dump-expr-json.cpp +++ b/clang/test/AST/ast-dump-expr-json.cpp @@ -2003,7 +2003,7 @@ void TestNonADLCall3() { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[2]" +// CHECK-NEXT: "qualType": "int [2]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "inner": [ diff --git a/clang/test/AST/ast-dump-expr-json.m b/clang/test/AST/ast-dump-expr-json.m index 062f6c06d1aa..9b30c5957e3b 100644 --- a/clang/test/AST/ast-dump-expr-json.m +++ b/clang/test/AST/ast-dump-expr-json.m @@ -181,7 +181,7 @@ void TestObjCBoolLiteral() { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "char[2]" +// CHECK-NEXT: "qualType": "char [2]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "encodedType": { @@ -228,7 +228,7 @@ void TestObjCBoolLiteral() { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "char[3]" +// CHECK-NEXT: "qualType": "char [3]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "encodedType": { @@ -3490,7 +3490,7 @@ void TestObjCBoolLiteral() { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "char[4]" +// CHECK-NEXT: "qualType": "char [4]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "value": "\"key\"" @@ -3698,7 +3698,7 @@ void TestObjCBoolLiteral() { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "char[4]" +// CHECK-NEXT: "qualType": "char [4]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "value": "\"key\"" @@ -4177,7 +4177,7 @@ void TestObjCBoolLiteral() { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "char[4]" +// CHECK-NEXT: "qualType": "char [4]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "value": "\"key\"" @@ -4420,7 +4420,7 @@ void TestObjCBoolLiteral() { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "char[4]" +// CHECK-NEXT: "qualType": "char [4]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "value": "\"key\"" @@ -4560,7 +4560,7 @@ void TestObjCBoolLiteral() { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "char[4]" +// CHECK-NEXT: "qualType": "char [4]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "value": "\"key\"" @@ -4745,7 +4745,7 @@ void TestObjCBoolLiteral() { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "char[4]" +// CHECK-NEXT: "qualType": "char [4]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "value": "\"key\"" diff --git a/clang/test/AST/ast-dump-expr.c b/clang/test/AST/ast-dump-expr.c index 8605cd4bbaa1..1cb8ceaafbd0 100644 --- a/clang/test/AST/ast-dump-expr.c +++ b/clang/test/AST/ast-dump-expr.c @@ -271,8 +271,8 @@ void PostfixOperators(int *a, struct S b, struct S *c) { (int [4]){1, 2, 3, 4, }; // CHECK: ImplicitCastExpr - // CHECK-NEXT: CompoundLiteralExpr 0x{{[^ ]*}} 'int[4]' lvalue - // CHECK-NEXT: InitListExpr 0x{{[^ ]*}} 'int[4]' + // CHECK-NEXT: CompoundLiteralExpr 0x{{[^ ]*}} 'int [4]' lvalue + // CHECK-NEXT: InitListExpr 0x{{[^ ]*}} 'int [4]' // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 1 // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 2 // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 3 @@ -300,23 +300,23 @@ void PrimaryExpressions(int a) { "a"; // ImplicitCastExpr - // CHECK: StringLiteral 0x{{[^ ]*}} 'char[2]' lvalue "a" + // CHECK: StringLiteral 0x{{[^ ]*}} 'char [2]' lvalue "a" L"a"; // ImplicitCastExpr - // CHECK: StringLiteral 0x{{[^ ]*}} 'int[2]' lvalue L"a" + // CHECK: StringLiteral 0x{{[^ ]*}} 'int [2]' lvalue L"a" u8"a"; // ImplicitCastExpr - // CHECK: StringLiteral 0x{{[^ ]*}} 'char[2]' lvalue u8"a" + // CHECK: StringLiteral 0x{{[^ ]*}} 'char [2]' lvalue u8"a" U"a"; // ImplicitCastExpr - // CHECK: StringLiteral 0x{{[^ ]*}} 'unsigned int[2]' lvalue U"a" + // CHECK: StringLiteral 0x{{[^ ]*}} 'unsigned int [2]' lvalue U"a" u"a"; // ImplicitCastExpr - // CHECK: StringLiteral 0x{{[^ ]*}} 'unsigned short[2]' lvalue u"a" + // CHECK: StringLiteral 0x{{[^ ]*}} 'unsigned short [2]' lvalue u"a" 1; // CHECK: IntegerLiteral 0x{{[^ ]*}} 'int' 1 diff --git a/clang/test/AST/ast-dump-expr.cpp b/clang/test/AST/ast-dump-expr.cpp index 8b890860e2e3..747a6a5cd539 100644 --- a/clang/test/AST/ast-dump-expr.cpp +++ b/clang/test/AST/ast-dump-expr.cpp @@ -147,7 +147,7 @@ void UnaryExpressions(int *p) { // CHECK: CXXNewExpr 0x{{[^ ]*}} 'int *' array Function 0x{{[^ ]*}} 'operator new[]' 'void *(unsigned long)' // CHECK-NEXT: ImplicitCastExpr // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 2 - // CHECK-NEXT: InitListExpr 0x{{[^ ]*}} 'int[2]' + // CHECK-NEXT: InitListExpr 0x{{[^ ]*}} 'int [2]' // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 1 // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 2 diff --git a/clang/test/AST/ast-dump-file-line-json.c b/clang/test/AST/ast-dump-file-line-json.c index d4899d8fbbe9..e2bc038b462e 100644 --- a/clang/test/AST/ast-dump-file-line-json.c +++ b/clang/test/AST/ast-dump-file-line-json.c @@ -137,14 +137,14 @@ int e; // CHECK-NEXT: "isImplicit": true, // CHECK-NEXT: "name": "__builtin_va_list", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "struct __va_list_tag[1]" +// CHECK-NEXT: "qualType": "struct __va_list_tag [1]" // CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", // CHECK-NEXT: "kind": "ConstantArrayType", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "struct __va_list_tag[1]" +// CHECK-NEXT: "qualType": "struct __va_list_tag [1]" // CHECK-NEXT: }, // CHECK-NEXT: "size": 1, // CHECK-NEXT: "inner": [ diff --git a/clang/test/AST/ast-dump-openmp-begin-declare-variant_9.c b/clang/test/AST/ast-dump-openmp-begin-declare-variant_9.c index 41b70edaf0c8..b2ab2fac8660 100644 --- a/clang/test/AST/ast-dump-openmp-begin-declare-variant_9.c +++ b/clang/test/AST/ast-dump-openmp-begin-declare-variant_9.c @@ -67,18 +67,18 @@ int main() { // C-NEXT: `-FunctionDecl [[ADDR_28:0x[a-z0-9]*]] line:24:5 main 'int ({{.*}})' // C-NEXT: `-CompoundStmt [[ADDR_29:0x[a-z0-9]*]] // C-NEXT: |-DeclStmt [[ADDR_30:0x[a-z0-9]*]] -// C-NEXT: | `-VarDecl [[ADDR_31:0x[a-z0-9]*]] col:6 used fns 'fd[2]' +// C-NEXT: | `-VarDecl [[ADDR_31:0x[a-z0-9]*]] col:6 used fns 'fd [2]' // C-NEXT: |-BinaryOperator [[ADDR_32:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' '=' // C-NEXT: | |-ArraySubscriptExpr [[ADDR_33:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' lvalue // C-NEXT: | | |-ImplicitCastExpr [[ADDR_34:0x[a-z0-9]*]] 'fd *' -// C-NEXT: | | | `-DeclRefExpr [[ADDR_35:0x[a-z0-9]*]] 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]' +// C-NEXT: | | | `-DeclRefExpr [[ADDR_35:0x[a-z0-9]*]] 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]' // C-NEXT: | | `-IntegerLiteral [[ADDR_36:0x[a-z0-9]*]] 'int' 0 // C-NEXT: | `-UnaryOperator [[ADDR_37:0x[a-z0-9]*]] 'int (*)({{.*}})' prefix '&' cannot overflow // C-NEXT: | `-DeclRefExpr [[ADDR_38:0x[a-z0-9]*]] 'int ({{.*}})' Function [[ADDR_0]] 'also_before' 'int ({{.*}})' // C-NEXT: |-BinaryOperator [[ADDR_39:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' '=' // C-NEXT: | |-ArraySubscriptExpr [[ADDR_40:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' lvalue // C-NEXT: | | |-ImplicitCastExpr [[ADDR_41:0x[a-z0-9]*]] 'fd *' -// C-NEXT: | | | `-DeclRefExpr [[ADDR_42:0x[a-z0-9]*]] 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]' +// C-NEXT: | | | `-DeclRefExpr [[ADDR_42:0x[a-z0-9]*]] 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]' // C-NEXT: | | `-IntegerLiteral [[ADDR_43:0x[a-z0-9]*]] 'int' 1 // C-NEXT: | `-ImplicitCastExpr [[ADDR_44:0x[a-z0-9]*]] 'int (*)({{.*}})' // C-NEXT: | `-DeclRefExpr [[ADDR_45:0x[a-z0-9]*]] 'int ({{.*}})' Function [[ADDR_17]] 'also_after' 'int ({{.*}})' @@ -98,7 +98,7 @@ int main() { // C-NEXT: | `-ParenExpr [[ADDR_59:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' lvalue // C-NEXT: | `-ArraySubscriptExpr [[ADDR_60:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' lvalue // C-NEXT: | |-ImplicitCastExpr [[ADDR_61:0x[a-z0-9]*]] 'fd *' -// C-NEXT: | | `-DeclRefExpr [[ADDR_62:0x[a-z0-9]*]] 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]' +// C-NEXT: | | `-DeclRefExpr [[ADDR_62:0x[a-z0-9]*]] 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]' // C-NEXT: | `-IntegerLiteral [[ADDR_63:0x[a-z0-9]*]] 'int' 0 // C-NEXT: `-CallExpr [[ADDR_64:0x[a-z0-9]*]] 'int' // C-NEXT: `-ImplicitCastExpr [[ADDR_65:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' @@ -106,7 +106,7 @@ int main() { // C-NEXT: `-ArraySubscriptExpr [[ADDR_67:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' lvalue // C-NEXT: |-IntegerLiteral [[ADDR_68:0x[a-z0-9]*]] 'int' 1 // C-NEXT: `-ImplicitCastExpr [[ADDR_69:0x[a-z0-9]*]] 'fd *' -// C-NEXT: `-DeclRefExpr [[ADDR_70:0x[a-z0-9]*]] 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]' +// C-NEXT: `-DeclRefExpr [[ADDR_70:0x[a-z0-9]*]] 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]' // CXX: |-FunctionDecl [[ADDR_0:0x[a-z0-9]*]] <{{.*}}, line:7:1> line:5:5 used also_before 'int ({{.*}})' // CXX-NEXT: | |-CompoundStmt [[ADDR_1:0x[a-z0-9]*]] @@ -140,18 +140,18 @@ int main() { // CXX-NEXT: `-FunctionDecl [[ADDR_28:0x[a-z0-9]*]] line:24:5 main 'int ({{.*}})' // CXX-NEXT: `-CompoundStmt [[ADDR_29:0x[a-z0-9]*]] // CXX-NEXT: |-DeclStmt [[ADDR_30:0x[a-z0-9]*]] -// CXX-NEXT: | `-VarDecl [[ADDR_31:0x[a-z0-9]*]] col:6 used fns 'fd[2]' +// CXX-NEXT: | `-VarDecl [[ADDR_31:0x[a-z0-9]*]] col:6 used fns 'fd [2]' // CXX-NEXT: |-BinaryOperator [[ADDR_32:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' {{.*}}'=' // CXX-NEXT: | |-ArraySubscriptExpr [[ADDR_33:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' lvalue // CXX-NEXT: | | |-ImplicitCastExpr [[ADDR_34:0x[a-z0-9]*]] 'fd *' -// CXX-NEXT: | | | `-DeclRefExpr [[ADDR_35:0x[a-z0-9]*]] 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]' +// CXX-NEXT: | | | `-DeclRefExpr [[ADDR_35:0x[a-z0-9]*]] 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]' // CXX-NEXT: | | `-IntegerLiteral [[ADDR_36:0x[a-z0-9]*]] 'int' 0 // CXX-NEXT: | `-UnaryOperator [[ADDR_37:0x[a-z0-9]*]] 'int (*)({{.*}})' prefix '&' cannot overflow // CXX-NEXT: | `-DeclRefExpr [[ADDR_38:0x[a-z0-9]*]] 'int ({{.*}})' {{.*}}Function [[ADDR_0]] 'also_before' 'int ({{.*}})' // CXX-NEXT: |-BinaryOperator [[ADDR_39:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' {{.*}}'=' // CXX-NEXT: | |-ArraySubscriptExpr [[ADDR_40:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' lvalue // CXX-NEXT: | | |-ImplicitCastExpr [[ADDR_41:0x[a-z0-9]*]] 'fd *' -// CXX-NEXT: | | | `-DeclRefExpr [[ADDR_42:0x[a-z0-9]*]] 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]' +// CXX-NEXT: | | | `-DeclRefExpr [[ADDR_42:0x[a-z0-9]*]] 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]' // CXX-NEXT: | | `-IntegerLiteral [[ADDR_43:0x[a-z0-9]*]] 'int' 1 // CXX-NEXT: | `-ImplicitCastExpr [[ADDR_44:0x[a-z0-9]*]] 'int (*)({{.*}})' // CXX-NEXT: | `-DeclRefExpr [[ADDR_45:0x[a-z0-9]*]] 'int ({{.*}})' {{.*}}Function [[ADDR_17]] 'also_after' 'int ({{.*}})' @@ -171,7 +171,7 @@ int main() { // CXX-NEXT: | `-ParenExpr [[ADDR_59:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' lvalue // CXX-NEXT: | `-ArraySubscriptExpr [[ADDR_60:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' lvalue // CXX-NEXT: | |-ImplicitCastExpr [[ADDR_61:0x[a-z0-9]*]] 'fd *' -// CXX-NEXT: | | `-DeclRefExpr [[ADDR_62:0x[a-z0-9]*]] 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]' +// CXX-NEXT: | | `-DeclRefExpr [[ADDR_62:0x[a-z0-9]*]] 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]' // CXX-NEXT: | `-IntegerLiteral [[ADDR_63:0x[a-z0-9]*]] 'int' 0 // CXX-NEXT: `-CallExpr [[ADDR_64:0x[a-z0-9]*]] 'int' // CXX-NEXT: `-ImplicitCastExpr [[ADDR_65:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' @@ -179,4 +179,4 @@ int main() { // CXX-NEXT: `-ArraySubscriptExpr [[ADDR_67:0x[a-z0-9]*]] 'fd':'int (*)({{.*}})' lvalue // CXX-NEXT: |-IntegerLiteral [[ADDR_68:0x[a-z0-9]*]] 'int' 1 // CXX-NEXT: `-ImplicitCastExpr [[ADDR_69:0x[a-z0-9]*]] 'fd *' -// CXX-NEXT: `-DeclRefExpr [[ADDR_70:0x[a-z0-9]*]] 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]' +// CXX-NEXT: `-DeclRefExpr [[ADDR_70:0x[a-z0-9]*]] 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]' diff --git a/clang/test/AST/ast-dump-records-json.cpp b/clang/test/AST/ast-dump-records-json.cpp index 01deb82096dd..2227a1fa33e0 100644 --- a/clang/test/AST/ast-dump-records-json.cpp +++ b/clang/test/AST/ast-dump-records-json.cpp @@ -1338,7 +1338,7 @@ struct Derived6 : virtual public Bases... { // CHECK-NEXT: }, // CHECK-NEXT: "name": "b", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[10]" +// CHECK-NEXT: "qualType": "int [10]" // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: { @@ -1364,7 +1364,7 @@ struct Derived6 : virtual public Bases... { // CHECK-NEXT: }, // CHECK-NEXT: "name": "c", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[]" +// CHECK-NEXT: "qualType": "int []" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: ] diff --git a/clang/test/AST/ast-dump-records.c b/clang/test/AST/ast-dump-records.c index c0fbac67bc49..52d841db2b47 100644 --- a/clang/test/AST/ast-dump-records.c +++ b/clang/test/AST/ast-dump-records.c @@ -84,9 +84,9 @@ struct D { int a; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 a 'int' int b[10]; - // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 b 'int[10]' + // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 b 'int [10]' int c[]; - // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 c 'int[]' + // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 c 'int []' }; union E; diff --git a/clang/test/AST/ast-dump-records.cpp b/clang/test/AST/ast-dump-records.cpp index 3dc087709a83..0e375d2ce53a 100644 --- a/clang/test/AST/ast-dump-records.cpp +++ b/clang/test/AST/ast-dump-records.cpp @@ -132,9 +132,9 @@ struct D { int a; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 a 'int' int b[10]; - // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 b 'int[10]' + // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 b 'int [10]' int c[]; - // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 c 'int[]' + // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 c 'int []' }; union E; diff --git a/clang/test/AST/ast-dump-stmt-json.cpp b/clang/test/AST/ast-dump-stmt-json.cpp index b8988cc16d43..6c357b449192 100644 --- a/clang/test/AST/ast-dump-stmt-json.cpp +++ b/clang/test/AST/ast-dump-stmt-json.cpp @@ -2965,7 +2965,7 @@ void TestDependentGenericSelectionExpr(Ty T) { // CHECK-NEXT: "name": "us", // CHECK-NEXT: "mangledName": "_ZZ17TestUnionInitListvE2us", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "U[3]" +// CHECK-NEXT: "qualType": "U [3]" // CHECK-NEXT: }, // CHECK-NEXT: "init": "c", // CHECK-NEXT: "inner": [ @@ -2985,7 +2985,7 @@ void TestDependentGenericSelectionExpr(Ty T) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "U[3]" +// CHECK-NEXT: "qualType": "U [3]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "array_filler": [ @@ -4392,7 +4392,7 @@ void TestDependentGenericSelectionExpr(Ty T) { // CHECK-NEXT: "name": "vals", // CHECK-NEXT: "mangledName": "_ZZ13TestIterationvE4vals", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[10]" +// CHECK-NEXT: "qualType": "int [10]" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: ] @@ -4478,7 +4478,7 @@ void TestDependentGenericSelectionExpr(Ty T) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[10]" +// CHECK-NEXT: "qualType": "int [10]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "referencedDecl": { @@ -4486,7 +4486,7 @@ void TestDependentGenericSelectionExpr(Ty T) { // CHECK-NEXT: "kind": "VarDecl", // CHECK-NEXT: "name": "vals", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[10]" +// CHECK-NEXT: "qualType": "int [10]" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: } @@ -4577,7 +4577,7 @@ void TestDependentGenericSelectionExpr(Ty T) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[10]" +// CHECK-NEXT: "qualType": "int [10]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "referencedDecl": { @@ -4699,7 +4699,7 @@ void TestDependentGenericSelectionExpr(Ty T) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[10]" +// CHECK-NEXT: "qualType": "int [10]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "referencedDecl": { @@ -6039,7 +6039,7 @@ void TestDependentGenericSelectionExpr(Ty T) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[10]" +// CHECK-NEXT: "qualType": "int [10]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "referencedDecl": { @@ -6047,7 +6047,7 @@ void TestDependentGenericSelectionExpr(Ty T) { // CHECK-NEXT: "kind": "VarDecl", // CHECK-NEXT: "name": "vals", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[10]" +// CHECK-NEXT: "qualType": "int [10]" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: } @@ -6138,7 +6138,7 @@ void TestDependentGenericSelectionExpr(Ty T) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[10]" +// CHECK-NEXT: "qualType": "int [10]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "referencedDecl": { @@ -6260,7 +6260,7 @@ void TestDependentGenericSelectionExpr(Ty T) { // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[10]" +// CHECK-NEXT: "qualType": "int [10]" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "referencedDecl": { diff --git a/clang/test/AST/ast-dump-stmt.cpp b/clang/test/AST/ast-dump-stmt.cpp index 4f73d39d4af2..47e1ac4071d9 100644 --- a/clang/test/AST/ast-dump-stmt.cpp +++ b/clang/test/AST/ast-dump-stmt.cpp @@ -97,8 +97,8 @@ union U { void TestUnionInitList() { U us[3] = {1}; -// CHECK: VarDecl {{.+}} col:5 us 'U[3]' cinit -// CHECK-NEXT: `-InitListExpr {{.+}} 'U[3]' +// CHECK: VarDecl {{.+}} col:5 us 'U [3]' cinit +// CHECK-NEXT: `-InitListExpr {{.+}} 'U [3]' // CHECK-NEXT: |-array_filler: InitListExpr {{.+}} 'U' field Field {{.+}} 'i' 'int' // CHECK-NEXT: `-InitListExpr {{.+}} 'U' field Field {{.+}} 'i' 'int' // CHECK-NEXT: `-IntegerLiteral {{.+}} 'int' 1 @@ -196,16 +196,16 @@ void TestIteration() { // CHECK-NEXT: <<>> // CHECK-NEXT: DeclStmt // CHECK-NEXT: VarDecl 0x{{[^ ]*}} col:16 implicit used __range1 'int (&)[10]' cinit - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int[10]' lvalue Var 0x{{[^ ]*}} 'vals' 'int[10]' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int [10]' lvalue Var 0x{{[^ ]*}} 'vals' 'int [10]' // CHECK-NEXT: DeclStmt // CHECK-NEXT: VarDecl 0x{{[^ ]*}} col:14 implicit used __begin1 'int *':'int *' cinit // CHECK-NEXT: ImplicitCastExpr - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int[10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int [10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]' // CHECK-NEXT: DeclStmt // CHECK-NEXT: VarDecl 0x{{[^ ]*}} col:14 implicit used __end1 'int *':'int *' cinit // CHECK-NEXT: BinaryOperator 0x{{[^ ]*}} 'int *' '+' // CHECK-NEXT: ImplicitCastExpr - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int[10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int [10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]' // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'long' 10 // CHECK-NEXT: BinaryOperator 0x{{[^ ]*}} 'bool' '!=' // CHECK-NEXT: ImplicitCastExpr @@ -264,16 +264,16 @@ void TestIteration() { // CHECK-NEXT: VarDecl 0x{{[^ ]*}} col:12 a 'int' // CHECK-NEXT: DeclStmt // CHECK-NEXT: VarDecl 0x{{[^ ]*}} col:23 implicit used __range1 'int (&)[10]' cinit - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int[10]' lvalue Var 0x{{[^ ]*}} 'vals' 'int[10]' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int [10]' lvalue Var 0x{{[^ ]*}} 'vals' 'int [10]' // CHECK-NEXT: DeclStmt // CHECK-NEXT: VarDecl 0x{{[^ ]*}} col:21 implicit used __begin1 'int *':'int *' cinit // CHECK-NEXT: ImplicitCastExpr - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int[10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int [10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]' // CHECK-NEXT: DeclStmt // CHECK-NEXT: VarDecl 0x{{[^ ]*}} col:21 implicit used __end1 'int *':'int *' cinit // CHECK-NEXT: BinaryOperator 0x{{[^ ]*}} 'int *' '+' // CHECK-NEXT: ImplicitCastExpr - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int[10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int [10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]' // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'long' 10 // CHECK-NEXT: BinaryOperator 0x{{[^ ]*}} 'bool' '!=' // CHECK-NEXT: ImplicitCastExpr diff --git a/clang/test/AST/ast-dump-template-decls-json.cpp b/clang/test/AST/ast-dump-template-decls-json.cpp index 5e7a547e2161..e3342190ff91 100644 --- a/clang/test/AST/ast-dump-template-decls-json.cpp +++ b/clang/test/AST/ast-dump-template-decls-json.cpp @@ -185,14 +185,14 @@ void i(); // CHECK-NEXT: "isImplicit": true, // CHECK-NEXT: "name": "__builtin_va_list", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "__va_list_tag[1]" +// CHECK-NEXT: "qualType": "__va_list_tag [1]" // CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", // CHECK-NEXT: "kind": "ConstantArrayType", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "__va_list_tag[1]" +// CHECK-NEXT: "qualType": "__va_list_tag [1]" // CHECK-NEXT: }, // CHECK-NEXT: "size": 1, // CHECK-NEXT: "inner": [ diff --git a/clang/test/AST/ast-dump-templates.cpp b/clang/test/AST/ast-dump-templates.cpp index ab4a7356028e..89feee75268a 100644 --- a/clang/test/AST/ast-dump-templates.cpp +++ b/clang/test/AST/ast-dump-templates.cpp @@ -46,9 +46,9 @@ template struct A { }; // CHECK1-LABEL: template void f(T ...[3]) { -// CHECK1-NEXT: A a; +// CHECK1-NEXT: A a; template void f(T ...[3]) { - A a; + A a; } namespace test2 { diff --git a/clang/test/AST/ast-dump-types-errors-json.cpp b/clang/test/AST/ast-dump-types-errors-json.cpp index 1f79130d9db3..89535fcb70f4 100644 --- a/clang/test/AST/ast-dump-types-errors-json.cpp +++ b/clang/test/AST/ast-dump-types-errors-json.cpp @@ -24,14 +24,14 @@ using TestContainsErrors = int[sizeof(undef())]; // CHECK-NEXT: }, // CHECK-NEXT: "name": "TestContainsErrors", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[sizeof ((undef))]" +// CHECK-NEXT: "qualType": "int [sizeof ((undef))]" // CHECK-NEXT: }, // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", // CHECK-NEXT: "kind": "DependentSizedArrayType", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "int[sizeof ((undef))]" +// CHECK-NEXT: "qualType": "int [sizeof ((undef))]" // CHECK-NEXT: }, // CHECK-NEXT: "containsErrors": true, // CHECK-NEXT: "isDependent": true, diff --git a/clang/test/AST/atomic-expr.cpp b/clang/test/AST/atomic-expr.cpp index bdb7bcb00569..db21d61e98c2 100644 --- a/clang/test/AST/atomic-expr.cpp +++ b/clang/test/AST/atomic-expr.cpp @@ -28,14 +28,14 @@ void useage(){ // CHECK: AtomicExpr // CHECK-NEXT: ImplicitCastExpr // CHECK-SAME: -// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]' +// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:28> 'int' 5 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:25> 'int' 0 // CHECK:FunctionDecl 0x{{[0-9a-f]+}} line:{{.*}}:6 used pr43370 // CHECK: AtomicExpr // CHECK-NEXT: ImplicitCastExpr // CHECK-SAME: -// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]' +// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:28> 'int' 5 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:25> 'int' 0 @@ -43,11 +43,11 @@ void useage(){ // CHECK: AtomicExpr // CHECK-NEXT: ImplicitCastExpr // CHECK-SAME: -// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]' +// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:53> 'int' 3 // CHECK-NEXT: ImplicitCastExpr // CHECK-SAME: -// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:42> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]' +// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:42> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:56> 'int' 4 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:47> 'int' 1 // CHECK-NEXT: ImplicitCastExpr @@ -56,11 +56,11 @@ void useage(){ // CHECK: AtomicExpr // CHECK-NEXT: ImplicitCastExpr // CHECK-SAME: -// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]' +// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:53> 'int' 3 // CHECK-NEXT: ImplicitCastExpr // CHECK-SAME: -// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:42> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]' +// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:42> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:56> 'int' 4 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:47> 'int' 1 // CHECK-NEXT: ImplicitCastExpr diff --git a/clang/test/AST/float16.cpp b/clang/test/AST/float16.cpp index 104ade6b54d6..807289ac0a7f 100644 --- a/clang/test/AST/float16.cpp +++ b/clang/test/AST/float16.cpp @@ -33,9 +33,9 @@ namespace { //CHECK-NEXT: | |-VarDecl {{.*}} f1n '_Float16' //CHECK-NEXT: | |-VarDecl {{.*}} f2n '_Float16' cinit //CHECK-NEXT: | | `-FloatingLiteral {{.*}} '_Float16' 3.300000e+01 -//CHECK-NEXT: | |-VarDecl {{.*}} arr1n '_Float16[10]' -//CHECK-NEXT: | |-VarDecl {{.*}} arr2n '_Float16[3]' cinit -//CHECK-NEXT: | | `-InitListExpr {{.*}} '_Float16[3]' +//CHECK-NEXT: | |-VarDecl {{.*}} arr1n '_Float16 [10]' +//CHECK-NEXT: | |-VarDecl {{.*}} arr2n '_Float16 [3]' cinit +//CHECK-NEXT: | | `-InitListExpr {{.*}} '_Float16 [3]' //CHECK-NEXT: | | |-ImplicitCastExpr {{.*}} '_Float16' //CHECK-NEXT: | | | `-FloatingLiteral {{.*}} 'double' 1.200000e+00 //CHECK-NEXT: | | |-ImplicitCastExpr {{.*}} '_Float16' @@ -55,9 +55,9 @@ _Float16 func1f(_Float16 arg); //CHECK-NEXT: |-VarDecl {{.*}} f2f '_Float16' cinit //CHECK-NEXT: | `-ImplicitCastExpr {{.*}} '_Float16' //CHECK-NEXT: | `-FloatingLiteral {{.*}} 'double' 3.240000e+01 -//CHECK-NEXT: |-VarDecl {{.*}} arr1f '_Float16[10]' -//CHECK-NEXT: |-VarDecl {{.*}} arr2f '_Float16[3]' cinit -//CHECK-NEXT: | `-InitListExpr {{.*}} '_Float16[3]' +//CHECK-NEXT: |-VarDecl {{.*}} arr1f '_Float16 [10]' +//CHECK-NEXT: |-VarDecl {{.*}} arr2f '_Float16 [3]' cinit +//CHECK-NEXT: | `-InitListExpr {{.*}} '_Float16 [3]' //CHECK-NEXT: | |-ImplicitCastExpr {{.*}} '_Float16' //CHECK-NEXT: | | `-UnaryOperator {{.*}} 'double' prefix '-' //CHECK-NEXT: | | `-FloatingLiteral {{.*}} 'double' 1.200000e+00 @@ -297,8 +297,8 @@ int main(void) { //CHECK-NEXT: | `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f4l' '_Float16' _Float16 arr1l[] = { -1.f16, -0.f16, -11.f16 }; -//CHECK: `-VarDecl {{.*}} arr1l '_Float16[3]' cinit -//CHECK-NEXT: `-InitListExpr {{.*}} '_Float16[3]' +//CHECK: `-VarDecl {{.*}} arr1l '_Float16 [3]' cinit +//CHECK-NEXT: `-InitListExpr {{.*}} '_Float16 [3]' //CHECK-NEXT: |-UnaryOperator {{.*}} '_Float16' prefix '-' //CHECK-NEXT: | `-FloatingLiteral {{.*}} '_Float16' 1.000000e+00 //CHECK-NEXT: |-UnaryOperator {{.*}} '_Float16' prefix '-' diff --git a/clang/test/AST/pr47636.cpp b/clang/test/AST/pr47636.cpp index 5311edb892c5..29d2a0a06e79 100644 --- a/clang/test/AST/pr47636.cpp +++ b/clang/test/AST/pr47636.cpp @@ -2,25 +2,25 @@ int(&&intu_rvref)[] {1,2,3,4}; // CHECK: VarDecl 0x[[GLOB_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'int (&&)[4]' listinit -// CHECK-NEXT: ExprWithCleanups {{.*}} 'int[4]' xvalue -// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int[4]' xvalue extended by Var 0x[[GLOB_ADDR]] 'intu_rvref' 'int (&&)[4]' -// CHECK-NEXT: InitListExpr {{.*}} 'int[4]' +// CHECK-NEXT: ExprWithCleanups {{.*}} 'int [4]' xvalue +// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int [4]' xvalue extended by Var 0x[[GLOB_ADDR]] 'intu_rvref' 'int (&&)[4]' +// CHECK-NEXT: InitListExpr {{.*}} 'int [4]' // CHECK: FunctionDecl {{.*}} static_const void static_const() { static const int(&&intu_rvref)[] {1,2,3,4}; // CHECK: VarDecl 0x[[STATIC_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'const int (&&)[4]' static listinit - // CHECK-NEXT: ExprWithCleanups {{.*}} 'const int[4]' xvalue - // CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'const int[4]' xvalue extended by Var 0x[[STATIC_ADDR]] 'intu_rvref' 'const int (&&)[4]' - // CHECK-NEXT: InitListExpr {{.*}} 'const int[4]' + // CHECK-NEXT: ExprWithCleanups {{.*}} 'const int [4]' xvalue + // CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'const int [4]' xvalue extended by Var 0x[[STATIC_ADDR]] 'intu_rvref' 'const int (&&)[4]' + // CHECK-NEXT: InitListExpr {{.*}} 'const int [4]' } // CHECK: FunctionDecl {{.*}} const_expr constexpr int const_expr() { int(&&intu_rvref)[]{1, 2, 3, 4}; // CHECK: VarDecl 0x[[CE_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'int (&&)[4]' listinit - // CHECK-NEXT: ExprWithCleanups {{.*}} 'int[4]' xvalue - // CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int[4]' xvalue extended by Var 0x[[CE_ADDR]] 'intu_rvref' 'int (&&)[4]' - // CHECK-NEXT: InitListExpr {{.*}} 'int[4]' + // CHECK-NEXT: ExprWithCleanups {{.*}} 'int [4]' xvalue + // CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int [4]' xvalue extended by Var 0x[[CE_ADDR]] 'intu_rvref' 'int (&&)[4]' + // CHECK-NEXT: InitListExpr {{.*}} 'int [4]' return intu_rvref[0]; } diff --git a/clang/test/AST/sourceranges.cpp b/clang/test/AST/sourceranges.cpp index afb9492b2c36..cd1095c69afc 100644 --- a/clang/test/AST/sourceranges.cpp +++ b/clang/test/AST/sourceranges.cpp @@ -13,7 +13,7 @@ enum B {}; typedef int C; } -// CHECK: VarDecl {{0x[0-9a-fA-F]+}} col:15 ImplicitConstrArray 'foo::A[2]' +// CHECK: VarDecl {{0x[0-9a-fA-F]+}} col:15 ImplicitConstrArray 'foo::A [2]' static foo::A ImplicitConstrArray[2]; int main() { diff --git a/clang/test/ASTMerge/var/test.c b/clang/test/ASTMerge/var/test.c index 5efc25fdb573..a43de77bfe62 100644 --- a/clang/test/ASTMerge/var/test.c +++ b/clang/test/ASTMerge/var/test.c @@ -7,6 +7,6 @@ // CHECK: var2.c:3:5: warning: external variable 'x2' declared with incompatible types in different translation units ('int' vs. 'double') // CHECK: In file included from{{.*}}var1.c:3: // CHECK: var1.h:1:8: note: declared here with type 'double' -// CHECK: warning: external variable 'xarray3' declared with incompatible types in different translation units ('int[17]' vs. 'int[18]') -// CHECK: var1.c:7:5: note: declared here with type 'int[18]' +// CHECK: warning: external variable 'xarray3' declared with incompatible types in different translation units ('int [17]' vs. 'int [18]') +// CHECK: var1.c:7:5: note: declared here with type 'int [18]' // CHECK: 3 warnings generated diff --git a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp index 82c86a95792a..22df86e1773c 100644 --- a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp +++ b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp @@ -334,7 +334,7 @@ void test_aggregate_array_lifetime_extension() { // CHECK-NEXT: 61: ~A() (Temporary object destructor) // CHECK-NEXT: 62: ~A() (Temporary object destructor) // CHECK-NEXT: 63: ~A() (Temporary object destructor) -// CHECK-NEXT: 64: [B1.57].~D[2]() (Implicit destructor) +// CHECK-NEXT: 64: [B1.57].~D [2]() (Implicit destructor) // CHECK-NEXT: 65: [B1.18].~D() (Implicit destructor) // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (1): B0 @@ -357,13 +357,13 @@ void test_aggregate_with_nontrivial_own_destructor() { // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A[2]) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], class A[2]) +// WARNINGS-NEXT: 1: (CXXConstructExpr, class A [2]) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], class A [2]) // CHECK-NEXT: 2: A a[2]; -// WARNINGS-NEXT: 3: (CXXConstructExpr, class A[0]) -// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A[0]) +// WARNINGS-NEXT: 3: (CXXConstructExpr, class A [0]) +// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A [0]) // CHECK-NEXT: 4: A b[0]; -// CHECK-NEXT: 5: [B1.2].~A[2]() (Implicit destructor) +// CHECK-NEXT: 5: [B1.2].~A [2]() (Implicit destructor) // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (1): B0 // CHECK: [B0 (EXIT)] diff --git a/clang/test/Analysis/cfg.cpp b/clang/test/Analysis/cfg.cpp index b61addcb5d86..14f5d1e155fd 100644 --- a/clang/test/Analysis/cfg.cpp +++ b/clang/test/Analysis/cfg.cpp @@ -116,8 +116,8 @@ void test_deletedtor() { // CHECK: [B1] // CHECK-NEXT: 1: 5 // CHECK-NEXT: 2: CFGNewAllocator(A *) -// WARNINGS-NEXT: 3: (CXXConstructExpr, class A[5]) -// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A[5]) +// WARNINGS-NEXT: 3: (CXXConstructExpr, class A [5]) +// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A [5]) // CHECK-NEXT: 4: new A {{\[\[}}B1.1]] // CHECK-NEXT: 5: A *a = new A [5]; // CHECK-NEXT: 6: a @@ -342,8 +342,8 @@ void test_placement_new() { // CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, BitCast, void *) // CHECK-NEXT: 5: 5 // CHECK-NEXT: 6: CFGNewAllocator(MyClass *) -// WARNINGS-NEXT: 7: (CXXConstructExpr, class MyClass[5]) -// ANALYZER-NEXT: 7: (CXXConstructExpr, [B1.8], class MyClass[5]) +// WARNINGS-NEXT: 7: (CXXConstructExpr, class MyClass [5]) +// ANALYZER-NEXT: 7: (CXXConstructExpr, [B1.8], class MyClass [5]) // CHECK-NEXT: 8: new ([B1.4]) MyClass {{\[\[}}B1.5]] // CHECK-NEXT: 9: MyClass *obj = new (buffer) MyClass [5]; // CHECK-NEXT: Preds (1): B2 @@ -513,7 +513,7 @@ void vla_typedef(int x) { // CHECK: [B1] // CHECK-NEXT: 1: x // CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, LValueToRValue, int) -// CHECK-NEXT: 3: using VLA = int[x]; +// CHECK-NEXT: 3: using VLA = int [x]; void vla_typealias(int x) { using VLA = int[x]; } @@ -538,7 +538,7 @@ void vla_typedef_multi(int x, int y) { // CHECK-NEXT: 5: [B1.4] (ImplicitCastExpr, LValueToRValue, int) // CHECK-NEXT: 6: typedef VLA VLA1[y]; // CHECK-NEXT: 7: 3 -// CHECK-NEXT: 8: using VLA2 = VLA1[3]; +// CHECK-NEXT: 8: using VLA2 = VLA1 [3]; // CHECK-NEXT: 9: 4 // CHECK-NEXT: 10: VLA2 vla[4]; void vla_typedefname_multi(int x, int y) { @@ -557,8 +557,8 @@ void vla_typedefname_multi(int x, int y) { // CHECK-NEXT: 5: x // CHECK-NEXT: 6: ++[B1.5] // CHECK-NEXT: 7: [B1.6] (ImplicitCastExpr, LValueToRValue, int) -// CHECK-NEXT: 8: sizeof(int[++x]) -// CHECK-NEXT: 9: alignof(int[++x]) +// CHECK-NEXT: 8: sizeof(int [++x]) +// CHECK-NEXT: 9: alignof(int [++x]) // CHECK-NEXT: 10: 0 // CHECK-NEXT: 11: x // CHECK-NEXT: 12: [B1.11] (ImplicitCastExpr, LValueToRValue, int) diff --git a/clang/test/Analysis/explain-svals.cpp b/clang/test/Analysis/explain-svals.cpp index 44cd66b491ea..387530c17f6c 100644 --- a/clang/test/Analysis/explain-svals.cpp +++ b/clang/test/Analysis/explain-svals.cpp @@ -81,7 +81,7 @@ void test_4(int x, int y) { clang_analyzer_explain(&stat); // expected-warning-re{{{{^pointer to static local variable 'stat'$}}}} clang_analyzer_explain(stat_glob); // expected-warning-re{{{{^initial value of global variable 'stat_glob'$}}}} clang_analyzer_explain(&stat_glob); // expected-warning-re{{{{^pointer to global variable 'stat_glob'$}}}} - clang_analyzer_explain((int[]){1, 2, 3}); // expected-warning-re{{{{^pointer to element of type 'int' with index 0 of temporary object constructed at statement '\(int\[3\]\)\{1, 2, 3\}'$}}}} + clang_analyzer_explain((int[]){1, 2, 3}); // expected-warning-re{{{{^pointer to element of type 'int' with index 0 of temporary object constructed at statement '\(int \[3\]\)\{1, 2, 3\}'$}}}} } namespace { diff --git a/clang/test/Analysis/lifetime-cfg-output.cpp b/clang/test/Analysis/lifetime-cfg-output.cpp index 2c574c7cae8a..dc2849db1b63 100644 --- a/clang/test/Analysis/lifetime-cfg-output.cpp +++ b/clang/test/Analysis/lifetime-cfg-output.cpp @@ -84,9 +84,9 @@ void test_const_ref() { // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, class A[2]) +// CHECK-NEXT: 1: (CXXConstructExpr, class A [2]) // CHECK-NEXT: 2: A a[2]; -// CHECK-NEXT: 3: (CXXConstructExpr, class A[0]) +// CHECK-NEXT: 3: (CXXConstructExpr, class A [0]) // CHECK-NEXT: 4: A b[0]; // lifetime of a ends when its destructors are run // CHECK-NEXT: 5: [B1.2] (Lifetime ends) diff --git a/clang/test/Analysis/malloc-sizeof.c b/clang/test/Analysis/malloc-sizeof.c index 9d2ada4af1e2..22c4045b7bbd 100644 --- a/clang/test/Analysis/malloc-sizeof.c +++ b/clang/test/Analysis/malloc-sizeof.c @@ -49,6 +49,6 @@ int *mallocArraySize() { int *mallocWrongArraySize() { static const double sTable[10]; - int *table = malloc(sizeof sTable); // expected-warning {{Result of 'malloc' is converted to a pointer of type 'int', which is incompatible with sizeof operand type 'const double[10]'}} + int *table = malloc(sizeof sTable); // expected-warning {{Result of 'malloc' is converted to a pointer of type 'int', which is incompatible with sizeof operand type 'const double [10]'}} return table; } diff --git a/clang/test/Analysis/more-dtors-cfg-output.cpp b/clang/test/Analysis/more-dtors-cfg-output.cpp index 964c6d94d378..668210a0f61e 100644 --- a/clang/test/Analysis/more-dtors-cfg-output.cpp +++ b/clang/test/Analysis/more-dtors-cfg-output.cpp @@ -208,7 +208,7 @@ void compound_literal() { // CHECK: void compound_literal() // CHECK: (CXXConstructExpr, struct Bar) // CHECK: (CXXConstructExpr, struct Bar) -// CHECK: ~Bar[2]() (Temporary object destructor) +// CHECK: ~Bar [2]() (Temporary object destructor) Foo elided_return() { return get_foo(); @@ -258,17 +258,17 @@ void default_ctor_with_default_arg() { DefaultArgInCtor qux[3]; } // CHECK: void default_ctor_with_default_arg() -// CHECK: CXXConstructExpr, {{.*}}, struct DefaultArgInCtor[3] +// CHECK: CXXConstructExpr, {{.*}}, struct DefaultArgInCtor [3] // CXX14: ~Foo() (Temporary object destructor) // CHECK: ~Foo() (Temporary object destructor) -// CHECK: .~DefaultArgInCtor[3]() (Implicit destructor) +// CHECK: .~DefaultArgInCtor [3]() (Implicit destructor) void new_default_ctor_with_default_arg(long count) { // Same problems as above. new DefaultArgInCtor[count]; } // CHECK: void new_default_ctor_with_default_arg(long count) -// CHECK: CXXConstructExpr, {{.*}}, struct DefaultArgInCtor[] +// CHECK: CXXConstructExpr, {{.*}}, struct DefaultArgInCtor [] // CXX14: ~Foo() (Temporary object destructor) // CHECK: ~Foo() (Temporary object destructor) diff --git a/clang/test/Analysis/scopes-cfg-output.cpp b/clang/test/Analysis/scopes-cfg-output.cpp index c8212d51f6b2..4b6e2a92c53a 100644 --- a/clang/test/Analysis/scopes-cfg-output.cpp +++ b/clang/test/Analysis/scopes-cfg-output.cpp @@ -34,11 +34,11 @@ extern const bool UV; // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], class A[2]) +// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], class A [2]) // CHECK-NEXT: 3: A a[2]; -// CHECK-NEXT: 4: (CXXConstructExpr, [B1.5], class A[0]) +// CHECK-NEXT: 4: (CXXConstructExpr, [B1.5], class A [0]) // CHECK-NEXT: 5: A b[0]; -// CHECK-NEXT: 6: [B1.3].~A[2]() (Implicit destructor) +// CHECK-NEXT: 6: [B1.3].~A [2]() (Implicit destructor) // CHECK-NEXT: 7: CFGScopeEnd(a) // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (1): B0 @@ -810,7 +810,7 @@ void test_for_compound_and_break() { // CHECK-NEXT: 1: CFGScopeEnd(__end1) // CHECK-NEXT: 2: CFGScopeEnd(__begin1) // CHECK-NEXT: 3: CFGScopeEnd(__range1) -// CHECK-NEXT: 4: [B5.3].~A[10]() (Implicit destructor) +// CHECK-NEXT: 4: [B5.3].~A [10]() (Implicit destructor) // CHECK-NEXT: 5: CFGScopeEnd(a) // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (1): B0 @@ -846,7 +846,7 @@ void test_for_compound_and_break() { // CHECK-NEXT: Succs (1): B3 // CHECK: [B5] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B5.3], class A[10]) +// CHECK-NEXT: 2: (CXXConstructExpr, [B5.3], class A [10]) // CHECK-NEXT: 3: A a[10]; // CHECK-NEXT: 4: a // CHECK-NEXT: 5: auto &&__range1 = a; diff --git a/clang/test/CXX/basic/basic.types/p10.cpp b/clang/test/CXX/basic/basic.types/p10.cpp index d41b394bb60f..eae0c6513ac2 100644 --- a/clang/test/CXX/basic/basic.types/p10.cpp +++ b/clang/test/CXX/basic/basic.types/p10.cpp @@ -32,7 +32,7 @@ struct Incomplete; // expected-note 2{{forward declaration of 'Incomplete'}} template struct ClassTemp {}; constexpr Incomplete incomplete = {}; // expected-error {{constexpr variable cannot have non-literal type 'const Incomplete'}} expected-note {{incomplete type 'const Incomplete' is not a literal type}} -constexpr Incomplete incomplete2[] = {}; // expected-error {{constexpr variable cannot have non-literal type 'const Incomplete[]'}} expected-note {{incomplete type 'const Incomplete[]' is not a literal type}} +constexpr Incomplete incomplete2[] = {}; // expected-error {{constexpr variable cannot have non-literal type 'const Incomplete []'}} expected-note {{incomplete type 'const Incomplete []' is not a literal type}} constexpr ClassTemp classtemplate = {}; constexpr ClassTemp classtemplate2[] = {}; @@ -132,12 +132,12 @@ struct ArrGood { constexpr int f(ArrGood) { return 0; } struct ArrBad { - S s[3]; // expected-note {{data member 's' of non-literal type 'S[3]'}} + S s[3]; // expected-note {{data member 's' of non-literal type 'S [3]'}} }; constexpr int f(ArrBad) { return 0; } // expected-error {{1st parameter type 'ArrBad' is not a literal type}} constexpr int arb(int n) { - int a[n]; // expected-error {{variable of non-literal type 'int[n]' cannot be defined in a constexpr function}} + int a[n]; // expected-error {{variable of non-literal type 'int [n]' cannot be defined in a constexpr function}} } // expected-warning@+1 {{variable length array folded to constant array as an extension}} constexpr long Overflow[(1 << 30) << 2]{}; // expected-warning {{requires 34 bits to represent}} diff --git a/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp b/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp index 4f28d5359aa2..81e2ca5f1e4d 100644 --- a/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp @@ -9,7 +9,7 @@ static_assert(alignof(X) == alignof(int), ""); template struct Y { - alignas(A) T buffer[N]; // expected-error {{requested alignment is less than minimum alignment of 4 for type 'int[1]'}} + alignas(A) T buffer[N]; // expected-error {{requested alignment is less than minimum alignment of 4 for type 'int [1]'}} }; static_assert(alignof(Y) == alignof(int), ""); diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp index 5ef917fe356c..8c6f6e5ddc79 100644 --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp @@ -40,7 +40,7 @@ namespace VariableLengthArrays { const int m = 42; using U = int[m]; using U = int[42]; // expected-note {{previous definition}} - using U = int; // expected-error {{type alias redefinition with different types ('int' vs 'int[42]')}} + using U = int; // expected-error {{type alias redefinition with different types ('int' vs 'int [42]')}} void f() { int n = 42; diff --git a/clang/test/CXX/dcl.decl/dcl.decomp/p2.cpp b/clang/test/CXX/dcl.decl/dcl.decomp/p2.cpp index cad7d8e89ce0..211719a7e9c6 100644 --- a/clang/test/CXX/dcl.decl/dcl.decomp/p2.cpp +++ b/clang/test/CXX/dcl.decl/dcl.decomp/p2.cpp @@ -16,8 +16,8 @@ int array() { using X3 = X[3]; auto [a3, b3, c3] = X3{1, 2, 3}; - auto &[d, e] = arr; // expected-error {{type 'int[3]' decomposes into 3 elements, but only 2 names were provided}} - auto &[f, g, h, i] = arr; // expected-error {{type 'int[3]' decomposes into 3 elements, but 4 names were provided}} + auto &[d, e] = arr; // expected-error {{type 'int [3]' decomposes into 3 elements, but only 2 names were provided}} + auto &[f, g, h, i] = arr; // expected-error {{type 'int [3]' decomposes into 3 elements, but 4 names were provided}} auto &[r0, r1, r2] = arr; const auto &[cr0, cr1, cr2] = arr; diff --git a/clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp b/clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp index 46f46d249666..6e39bdd2429d 100644 --- a/clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp +++ b/clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp @@ -134,11 +134,11 @@ namespace rdar13395022 { void test(MoveOnly mo) { auto &&list1 = {mo}; // expected-error {{call to implicitly-deleted copy constructor}} expected-note {{in initialization of temporary of type 'std::initializer_list}} - MoveOnly (&&list2)[1] = {mo}; // expected-error {{call to implicitly-deleted copy constructor}} expected-note {{in initialization of temporary of type 'rdar13395022::MoveOnly[1]'}} + MoveOnly (&&list2)[1] = {mo}; // expected-error {{call to implicitly-deleted copy constructor}} expected-note {{in initialization of temporary of type 'rdar13395022::MoveOnly [1]'}} std::initializer_list &&list3 = {}; MoveOnly (&&list4)[1] = {}; // expected-error {{no matching constructor}} // expected-note@-1 {{in implicit initialization of array element 0 with omitted initializer}} - // expected-note@-2 {{in initialization of temporary of type 'rdar13395022::MoveOnly[1]' created to list-initialize this reference}} + // expected-note@-2 {{in initialization of temporary of type 'rdar13395022::MoveOnly [1]' created to list-initialize this reference}} } } diff --git a/clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp index bf16d123abe7..188a0a2c7eed 100644 --- a/clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp +++ b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp @@ -8,9 +8,9 @@ namespace test0 { extern "C" int array[]; void declare() { extern int array[100]; } - int value1 = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int value1 = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} extern "C" int array[]; - int value2 = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int value2 = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } namespace test1 { @@ -18,21 +18,21 @@ namespace test1 { void test() { { extern int array[100]; } extern int array[]; - int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } } namespace test2 { void declare() { extern int array[100]; } extern int array[]; - int value = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int value = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } namespace test3 { void test() { { extern int array[100]; } extern int array[]; - int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } } @@ -42,7 +42,7 @@ namespace test4 { extern int array[100]; int x = sizeof(array); } - int y = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int y = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } namespace test5 { @@ -58,7 +58,7 @@ namespace test6 { extern int array[100]; { extern int array[]; - int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } int y = sizeof(array); extern int array[]; @@ -70,7 +70,7 @@ namespace test7 { extern int array[100]; void test() { extern int array[]; - int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } int y = sizeof(array); extern int array[]; @@ -83,9 +83,9 @@ namespace test8 { extern int array[100]; int x = sizeof(array); } - int y = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int y = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} extern int array[]; - int z = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int z = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } namespace dependent { @@ -145,7 +145,7 @@ namespace dependent { template void l() { extern T arrX; // expected-note {{previous}} - extern U arrX; // expected-error {{different type: 'int[4]' vs 'int[3]'}} + extern U arrX; // expected-error {{different type: 'int [4]' vs 'int [3]'}} (void)sizeof(arrX); // expected-error {{incomplete}} } @@ -210,4 +210,4 @@ namespace use_outside_ns { extern int arr[]; void f1() { extern int arr[2]; } // expected-note {{previous}} -void f2() { extern int arr[3]; } // expected-error {{different type: 'int[3]' vs 'int[2]'}} +void f2() { extern int arr[3]; } // expected-error {{different type: 'int [3]' vs 'int [2]'}} diff --git a/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp index 9cc13b4efb80..de1c5a708db6 100644 --- a/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp +++ b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp @@ -57,15 +57,15 @@ template void b(T[] ...); template -void c(T ... []); // expected-error{{type 'T[]' of function parameter pack does not contain any unexpanded parameter packs}} +void c(T ... []); // expected-error{{type 'T []' of function parameter pack does not contain any unexpanded parameter packs}} template -void d(T ... x[]); // expected-error{{type 'T[]' of function parameter pack does not contain any unexpanded parameter packs}} +void d(T ... x[]); // expected-error{{type 'T []' of function parameter pack does not contain any unexpanded parameter packs}} void ai(int[] ... x); // expected-error{{expected ')'}} expected-note{{to match this '('}} void bi(int[] ...); -void ci(int ... []); // expected-error{{type 'int[]' of function parameter pack does not contain any unexpanded parameter packs}} -void di(int ... x[]); // expected-error{{type 'int[]' of function parameter pack does not contain any unexpanded parameter packs}} +void ci(int ... []); // expected-error{{type 'int []' of function parameter pack does not contain any unexpanded parameter packs}} +void di(int ... x[]); // expected-error{{type 'int []' of function parameter pack does not contain any unexpanded parameter packs}} } void f5a(auto fp(int)->unk ...) {} // expected-error{{unknown type name 'unk'}} diff --git a/clang/test/CXX/drs/dr177x.cpp b/clang/test/CXX/drs/dr177x.cpp index 546cf9e27fcc..0ac4deac6a8d 100644 --- a/clang/test/CXX/drs/dr177x.cpp +++ b/clang/test/CXX/drs/dr177x.cpp @@ -12,8 +12,8 @@ namespace dr1772 { // dr1772: 14 // CXX11: CXXRecordDecl // CXX11: CXXMethodDecl{{.+}} operator() 'void () const' // CXX11-NEXT: CompoundStmt - // CXX11-NEXT: PredefinedExpr{{.+}} 'const char[11]' lvalue __func__ - // CXX11-NEXT: StringLiteral{{.+}} 'const char[11]' lvalue "operator()" + // CXX11-NEXT: PredefinedExpr{{.+}} 'const char [11]' lvalue __func__ + // CXX11-NEXT: StringLiteral{{.+}} 'const char [11]' lvalue "operator()" void func() { // CXX11: FunctionDecl{{.+}} func @@ -23,8 +23,8 @@ namespace dr1772 { // dr1772: 14 // CXX11: CXXRecordDecl // CXX11: CXXMethodDecl{{.+}} operator() 'void () const' // CXX11-NEXT: CompoundStmt - // CXX11-NEXT: PredefinedExpr{{.+}} 'const char[11]' lvalue __func__ - // CXX11-NEXT: StringLiteral{{.+}} 'const char[11]' lvalue "operator()" + // CXX11-NEXT: PredefinedExpr{{.+}} 'const char [11]' lvalue __func__ + // CXX11-NEXT: StringLiteral{{.+}} 'const char [11]' lvalue "operator()" } #endif // __cplusplus >= 201103L } diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp index dee5487771ef..6add2c5d10a4 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp @@ -1,13 +1,13 @@ // RUN: %clang_cc1 -std=c++2a -verify %s template requires (sizeof(T) >= 4 && sizeof(T) <= 10) -// expected-note@-1{{because 'sizeof(char[20]) <= 10' (20 <= 10) evaluated to false}} +// expected-note@-1{{because 'sizeof(char [20]) <= 10' (20 <= 10) evaluated to false}} // expected-note@-2{{because 'sizeof(char) >= 4' (1 >= 4) evaluated to false}} void foo() requires (sizeof(T) <= 8) {} // expected-note@-1{{candidate template ignored: constraints not satisfied [with T = char]}} -// expected-note@-2{{candidate template ignored: constraints not satisfied [with T = char[9]]}} -// expected-note@-3{{candidate template ignored: constraints not satisfied [with T = char[20]]}} -// expected-note@-4{{because 'sizeof(char[9]) <= 8' (9 <= 8) evaluated to false}} +// expected-note@-2{{candidate template ignored: constraints not satisfied [with T = char [9]]}} +// expected-note@-3{{candidate template ignored: constraints not satisfied [with T = char [20]]}} +// expected-note@-4{{because 'sizeof(char [9]) <= 8' (9 <= 8) evaluated to false}} void bar() { foo(); // expected-error{{no matching function for call to 'foo'}} @@ -15,4 +15,4 @@ void bar() { foo(); foo(); // expected-error{{no matching function for call to 'foo'}} foo(); // expected-error{{no matching function for call to 'foo'}} -} +} \ No newline at end of file diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp index 3c6b1b1bac59..d3dde10ff2b2 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp @@ -24,7 +24,7 @@ namespace methods { template struct A { - static void foo(int) requires (sizeof(T) == 1) {} // expected-note 3{{because 'sizeof(char[2]) == 1' (2 == 1) evaluated to false}} + static void foo(int) requires (sizeof(T) == 1) {} // expected-note 3{{because 'sizeof(char [2]) == 1' (2 == 1) evaluated to false}} static void bar(int) requires (sizeof(T) == 2) {} // expected-note 3{{because 'sizeof(char) == 2' (1 == 2) evaluated to false}} // Make sure the function body is not instantiated before constraints are checked. static auto baz(int) requires (sizeof(T) == 2) { return T::foo(); } // expected-note{{because 'sizeof(char) == 2' (1 == 2) evaluated to false}} @@ -58,4 +58,4 @@ namespace operators auto* x = &A::operator-; // expected-error{{invalid reference to function 'operator-': constraints not satisfied}} auto y = &A::operator-; } -} +} \ No newline at end of file diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp index 5f7f73d622d8..a36175af6fec 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp @@ -48,5 +48,5 @@ void test_result_type(int N) { auto l1 = [] () -> Incomplete { }; // expected-error{{incomplete result type 'Incomplete' in lambda expression}} typedef int vla[N]; - auto l2 = [] () -> vla { }; // expected-error{{function cannot return array type 'vla' (aka 'int[N]')}} + auto l2 = [] () -> vla { }; // expected-error{{function cannot return array type 'vla' (aka 'int [N]')}} } diff --git a/clang/test/CXX/special/class.copy/p23-cxx11.cpp b/clang/test/CXX/special/class.copy/p23-cxx11.cpp index 3e2341c3331f..0b9652b50fcf 100644 --- a/clang/test/CXX/special/class.copy/p23-cxx11.cpp +++ b/clang/test/CXX/special/class.copy/p23-cxx11.cpp @@ -78,7 +78,7 @@ struct B1 { const int a; // expected-note 2{{field 'a' is of const-qualified type}} }; struct B2 { - const void *const a[3][9][2]; // expected-note 2{{field 'a' is of const-qualified type 'const void *const[3][9][2]'}} + const void *const a[3][9][2]; // expected-note 2{{field 'a' is of const-qualified type 'const void *const [3][9][2]'}} }; struct B3 { const void *a[3]; diff --git a/clang/test/CXX/special/class.ctor/p5-0x.cpp b/clang/test/CXX/special/class.ctor/p5-0x.cpp index 67f0d2a93574..5fa61008e8b7 100644 --- a/clang/test/CXX/special/class.ctor/p5-0x.cpp +++ b/clang/test/CXX/special/class.ctor/p5-0x.cpp @@ -57,7 +57,7 @@ class Deleted3a { const int a; }; // expected-note {{because field 'a' of const- expected-warning {{does not declare any constructor}} \ expected-note {{will never be initialized}} Deleted3a d3a; // expected-error {{implicitly-deleted default constructor}} -class Deleted3b { const DefaultedDefCtor1 a[42]; }; // expected-note {{because field 'a' of const-qualified type 'const DefaultedDefCtor1[42]' would not be initialized}} +class Deleted3b { const DefaultedDefCtor1 a[42]; }; // expected-note {{because field 'a' of const-qualified type 'const DefaultedDefCtor1 [42]' would not be initialized}} Deleted3b d3b; // expected-error {{implicitly-deleted default constructor}} class Deleted3c { const DefaultedDefCtor2 a; }; // expected-note {{because field 'a' of const-qualified type 'const DefaultedDefCtor2' would not be initialized}} Deleted3c d3c; // expected-error {{implicitly-deleted default constructor}} diff --git a/clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp b/clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp index d6d171470c21..1c6aeeefe006 100644 --- a/clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp +++ b/clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp @@ -121,10 +121,10 @@ void g() { ; extern int incomplete[]; - for (auto a : incomplete) // expected-error {{cannot use incomplete type 'int[]' as a range}} + for (auto a : incomplete) // expected-error {{cannot use incomplete type 'int []' as a range}} ; extern struct Incomplete also_incomplete[2]; // expected-note 2{{forward declaration}} - for (auto &a : also_incomplete) // expected-error {{cannot use incomplete type 'struct Incomplete[2]' as a range}} + for (auto &a : also_incomplete) // expected-error {{cannot use incomplete type 'struct Incomplete [2]' as a range}} ; struct VoidBegin { diff --git a/clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp b/clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp index 47bb95f2c024..58290ac40fdb 100644 --- a/clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp +++ b/clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp @@ -113,7 +113,7 @@ namespace addr_of_obj_or_func { X2 x2a; X2<&i> x2a_addr; // expected-error {{address taken}} - X2 x2b; // expected-error {{cannot bind to template argument of type 'int[10]'}} + X2 x2b; // expected-error {{cannot bind to template argument of type 'int [10]'}} X2<&iarr> x2b_addr; // expected-error {{address taken}} X2 x2c; // expected-error {{ignores qualifiers}} #if __cplusplus <= 199711L diff --git a/clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp b/clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp index dd6bfe8011dd..7d4d858b286f 100644 --- a/clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp +++ b/clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp @@ -9,20 +9,20 @@ static_assert(A::value == 4); static_assert(A::value == 1); // expected-error{{constraints not satisfied for class template 'A' [with T = char]}} template - requires (sizeof(T) != sizeof(U) // expected-note{{because 'sizeof(int) != sizeof(char[4])' (4 != 4) evaluated to false}} + requires (sizeof(T) != sizeof(U) // expected-note{{because 'sizeof(int) != sizeof(char [4])' (4 != 4) evaluated to false}} && sizeof(T) >= 4) // expected-note{{because 'sizeof(char) >= 4' (1 >= 4) evaluated to false}} constexpr int SizeDiff = sizeof(T) > sizeof(U) ? sizeof(T) - sizeof(U) : sizeof(U) - sizeof(T); static_assert(SizeDiff == 3); -static_assert(SizeDiff == 0); // expected-error{{constraints not satisfied for variable template 'SizeDiff' [with T = int, U = char[4]]}} +static_assert(SizeDiff == 0); // expected-error{{constraints not satisfied for variable template 'SizeDiff' [with T = int, U = char [4]]}} static_assert(SizeDiff == 3); // expected-error{{constraints not satisfied for variable template 'SizeDiff' [with T = char, U = int]}} template - requires ((sizeof(Ts) == 4) || ...) // expected-note{{because 'sizeof(char) == 4' (1 == 4) evaluated to false}} expected-note{{'sizeof(long long) == 4' (8 == 4) evaluated to false}} expected-note{{'sizeof(int[20]) == 4' (80 == 4) evaluated to false}} + requires ((sizeof(Ts) == 4) || ...) // expected-note{{because 'sizeof(char) == 4' (1 == 4) evaluated to false}} expected-note{{'sizeof(long long) == 4' (8 == 4) evaluated to false}} expected-note{{'sizeof(int [20]) == 4' (80 == 4) evaluated to false}} constexpr auto SumSizes = (sizeof(Ts) + ...); static_assert(SumSizes == 13); -static_assert(SumSizes == 89); // expected-error{{constraints not satisfied for variable template 'SumSizes' [with Ts = ]}} +static_assert(SumSizes == 89); // expected-error{{constraints not satisfied for variable template 'SumSizes' [with Ts = ]}} template concept IsBig = sizeof(T) > 100; // expected-note{{because 'sizeof(int) > 100' (4 > 100) evaluated to false}} @@ -44,28 +44,28 @@ static_assert(S::value); template struct AA { - template requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int[2]) == sizeof(int)' (8 == 4) evaluated to false}} + template requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int [2]) == sizeof(int)' (8 == 4) evaluated to false}} struct B { static constexpr int a = 0; }; - template requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int[2]) == sizeof(int)' (8 == 4) evaluated to false}} + template requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int [2]) == sizeof(int)' (8 == 4) evaluated to false}} static constexpr int b = 1; - template requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int[2]) == sizeof(int)' (8 == 4) evaluated to false}} - static constexpr int getB() { // expected-note{{candidate template ignored: constraints not satisfied [with U = int[2]]}} + template requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int [2]) == sizeof(int)' (8 == 4) evaluated to false}} + static constexpr int getB() { // expected-note{{candidate template ignored: constraints not satisfied [with U = int [2]]}} return 2; } static auto foo() { - return B::a; // expected-error{{constraints not satisfied for class template 'B' [with U = int[2]]}} + return B::a; // expected-error{{constraints not satisfied for class template 'B' [with U = int [2]]}} } static auto foo1() { - return b; // expected-error{{constraints not satisfied for variable template 'b' [with U = int[2]]}} + return b; // expected-error{{constraints not satisfied for variable template 'b' [with U = int [2]]}} } static auto foo2() diff --git a/clang/test/CXX/temp/temp.decls/temp.variadic/p2.cpp b/clang/test/CXX/temp/temp.decls/temp.variadic/p2.cpp index 8c2a9c151323..e7a62366a9be 100644 --- a/clang/test/CXX/temp/temp.decls/temp.variadic/p2.cpp +++ b/clang/test/CXX/temp/temp.decls/temp.variadic/p2.cpp @@ -12,11 +12,11 @@ void test() { template void recurse_until_fail(const Head &, const Tail &...tail) { // expected-note{{candidate function template not viable: requires at least 1 argument, but 0 were provided}} recurse_until_fail(tail...); // expected-error{{no matching function for call to 'recurse_until_fail'}} \ - // expected-note{{in instantiation of function template specialization 'recurse_until_fail' requested here}} \ - // expected-note{{in instantiation of function template specialization 'recurse_until_fail' requested here}} + // expected-note{{in instantiation of function template specialization 'recurse_until_fail' requested here}} \ + // expected-note{{in instantiation of function template specialization 'recurse_until_fail' requested here}} } void test_recurse_until_fail() { - recurse_until_fail(1, 3.14159, "string"); // expected-note{{in instantiation of function template specialization 'recurse_until_fail' requested here}} + recurse_until_fail(1, 3.14159, "string"); // expected-note{{in instantiation of function template specialization 'recurse_until_fail' requested here}} } diff --git a/clang/test/CXX/temp/temp.explicit/p8.cpp b/clang/test/CXX/temp/temp.explicit/p8.cpp index 6224080588b8..1f09be04afb9 100644 --- a/clang/test/CXX/temp/temp.explicit/p8.cpp +++ b/clang/test/CXX/temp/temp.explicit/p8.cpp @@ -1,13 +1,13 @@ // RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template requires (sizeof(T) + sizeof(S) < 10) -// expected-note@-1{{because 'sizeof(char[100]) + sizeof(char) < 10' (101 < 10) evaluated to false}} +// expected-note@-1{{because 'sizeof(char [100]) + sizeof(char) < 10' (101 < 10) evaluated to false}} void f(T t, S s) requires (sizeof(t) == 1 && sizeof(s) == 1) { }; // expected-note@-1{{candidate template ignored: constraints not satisfied [with T = int, S = char]}} // expected-note@-2{{because 'sizeof (t) == 1' (4 == 1) evaluated to false}} // expected-note@-3{{candidate template ignored: constraints not satisfied [with T = char, S = short]}} // expected-note@-4{{because 'sizeof (s) == 1' (2 == 1) evaluated to false}} -// expected-note@-5{{candidate template ignored: constraints not satisfied [with T = char[100], S = char]}} +// expected-note@-5{{candidate template ignored: constraints not satisfied [with T = char [100], S = char]}} template<> void f(int t, char s) { }; @@ -19,4 +19,4 @@ void f(char t, short s) { }; template<> void f(char t[100], char s) { }; -// expected-error@-1{{no function template matches function template specialization 'f'}} +// expected-error@-1{{no function template matches function template specialization 'f'}} \ No newline at end of file diff --git a/clang/test/CXX/temp/temp.param/p10-2a.cpp b/clang/test/CXX/temp/temp.param/p10-2a.cpp index 4f5fdd3b4809..f0364274fb35 100644 --- a/clang/test/CXX/temp/temp.param/p10-2a.cpp +++ b/clang/test/CXX/temp/temp.param/p10-2a.cpp @@ -27,21 +27,21 @@ using b4 = B; // expected-error {{constraints not satisfied for ali template concept C3 = (sizeof(T) + ...) == 12; -// expected-note@-1 {{because 'sizeof(char[11]) == 12' (11 == 12) evaluated to false}} -// expected-note@-2 {{because 'sizeof(char[10]) == 12' (10 == 12) evaluated to false}} +// expected-note@-1 {{because 'sizeof(char [11]) == 12' (11 == 12) evaluated to false}} +// expected-note@-2 {{because 'sizeof(char [10]) == 12' (10 == 12) evaluated to false}} // expected-note@-3 3{{because 'sizeof(int) == 12' (4 == 12) evaluated to false}} // expected-note@-4 6{{because 'sizeof(short) == 12' (2 == 12) evaluated to false}} template -// expected-note@-1 {{because 'char[11]' does not satisfy 'C3'}} -// expected-note@-2 {{because 'char[10]' does not satisfy 'C3'}} +// expected-note@-1 {{because 'char [11]' does not satisfy 'C3'}} +// expected-note@-2 {{because 'char [10]' does not satisfy 'C3'}} using C = T2; using c1 = C; using c2 = C; -// expected-error@-1 {{constraints not satisfied for alias template 'C' [with T1 = char[12], T2 = char[11], T3 = char[10]]}} +// expected-error@-1 {{constraints not satisfied for alias template 'C' [with T1 = char [12], T2 = char [11], T3 = char [10]]}} using c3 = C; -// expected-error@-1 {{constraints not satisfied for alias template 'C' [with T1 = char[12], T2 = char[12], T3 = char[10]]}} +// expected-error@-1 {{constraints not satisfied for alias template 'C' [with T1 = char [12], T2 = char [12], T3 = char [10]]}} template // expected-note@-1 {{because 'int' does not satisfy 'C3'}} @@ -87,33 +87,33 @@ using f2 = F; // expected-error {{constraints not satisfied for alias temp template concept OneOf = (is_same_v || ...); -// expected-note@-1 2{{because 'is_same_v' evaluated to false}} -// expected-note@-2 2{{and 'is_same_v' evaluated to false}} +// expected-note@-1 2{{because 'is_same_v' evaluated to false}} +// expected-note@-2 2{{and 'is_same_v' evaluated to false}} // expected-note@-3 {{because 'is_same_v' evaluated to false}} // expected-note@-4 {{and 'is_same_v' evaluated to false}} // expected-note@-5 {{and 'is_same_v' evaluated to false}} -// expected-note@-6 3{{because 'is_same_v' evaluated to false}} -// expected-note@-7 3{{and 'is_same_v' evaluated to false}} +// expected-note@-6 3{{because 'is_same_v' evaluated to false}} +// expected-note@-7 3{{and 'is_same_v' evaluated to false}} // expected-note@-8 2{{because 'is_same_v' evaluated to false}} // expected-note@-9 2{{and 'is_same_v' evaluated to false}} template T, OneOf U> -// expected-note@-1 2{{because 'OneOf' evaluated to false}} +// expected-note@-1 2{{because 'OneOf' evaluated to false}} // expected-note@-2 {{because 'OneOf' evaluated to false}} using G = T; using g1 = G; using g2 = G; // expected-error{{constraints not satisfied for alias template 'G' [with T = char, U = int]}} -using g3 = G; // expected-error{{constraints not satisfied for alias template 'G' [with T = char[1], U = short]}} +using g3 = G; // expected-error{{constraints not satisfied for alias template 'G' [with T = char [1], U = short]}} using g4 = G; // expected-error{{constraints not satisfied for alias template 'G' [with T = char, U = short]}} template... Ts> -// expected-note@-1 2{{because 'OneOf' evaluated to false}} -// expected-note@-2 {{and 'OneOf' evaluated to false}} +// expected-note@-1 2{{because 'OneOf' evaluated to false}} +// expected-note@-2 {{and 'OneOf' evaluated to false}} using H = int; using h1 = H; -// expected-error@-1 {{constraints not satisfied for alias template 'H' [with Ts = ]}} +// expected-error@-1 {{constraints not satisfied for alias template 'H' [with Ts = ]}} using h2 = H; // expected-error@-1 {{constraints not satisfied for alias template 'H' [with Ts = ]}} using h3 = H; diff --git a/clang/test/CodeGen/const-init.c b/clang/test/CodeGen/const-init.c index 7a0818a78a0a..08783862837e 100644 --- a/clang/test/CodeGen/const-init.c +++ b/clang/test/CodeGen/const-init.c @@ -156,7 +156,7 @@ void g29() { // CHECK: @g29.b = internal global [1 x i32] [i32 ptrtoint ([5 x i8]* @.str.1 to i32)], align 4 // CHECK: @g29.c = internal global [1 x i32] [i32 97], align 4 static DCC_SRVR_NM a = { {"@"} }; - static int b[1] = { "asdf" }; // expected-warning {{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char[5]'}} + static int b[1] = { "asdf" }; // expected-warning {{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char [5]'}} static int c[1] = { L"a" }; } diff --git a/clang/test/CodeGen/dump-struct-builtin.c b/clang/test/CodeGen/dump-struct-builtin.c index 6464d7fa70d8..929c5f71131b 100644 --- a/clang/test/CodeGen/dump-struct-builtin.c +++ b/clang/test/CodeGen/dump-struct-builtin.c @@ -91,7 +91,7 @@ // CHECK: @__const.unit15.a = private unnamed_addr constant %struct.U15A { [3 x i32] [i32 1, i32 2, i32 3] }, align 4 // CHECK-NEXT: [[STRUCT_STR_U15:@[0-9]+]] = private unnamed_addr constant [15 x i8] c"struct U15A {\0A\00" -// CHECK-NEXT: [[FIELD_U15:@[0-9]+]] = private unnamed_addr constant [12 x i8] c"int[3] a : \00" +// CHECK-NEXT: [[FIELD_U15:@[0-9]+]] = private unnamed_addr constant [13 x i8] c"int [3] a : \00" // CHECK-NEXT: [[FORMAT_U15:@[0-9]+]] = private unnamed_addr constant [4 x i8] c"%p\0A\00" // CHECK-NEXT: [[END_STRUCT_U15:@[0-9]+]] = private unnamed_addr constant [3 x i8] c"}\0A\00" @@ -380,7 +380,7 @@ void unit15() { // CHECK: call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* [[STRUCT_STR_U15]], i32 0, i32 0)) // CHECK: [[RES1:%[0-9]+]] = getelementptr inbounds %struct.U15A, %struct.U15A* %a, i32 0, i32 0 - // CHECK: call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* [[FIELD_U15]], i32 0, i32 0)) + // CHECK: call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* [[FIELD_U15]], i32 0, i32 0)) // CHECK: [[LOAD1:%[0-9]+]] = load [3 x i32], [3 x i32]* [[RES1]], // CHECK: call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* [[FORMAT_U15]], i32 0, i32 0), [3 x i32] [[LOAD1]]) // CHECK: call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* [[END_STRUCT_U15]], i32 0, i32 0) diff --git a/clang/test/Import/array-init-loop-expr/test.cpp b/clang/test/Import/array-init-loop-expr/test.cpp index 653f68140d5a..7fe109c305dd 100644 --- a/clang/test/Import/array-init-loop-expr/test.cpp +++ b/clang/test/Import/array-init-loop-expr/test.cpp @@ -1,7 +1,7 @@ // RUN: clang-import-test -dump-ast -import %S/Inputs/S.cpp -expression %s | FileCheck %s // CHECK: CXXCtorInitializer // CHECK-NEXT: ArrayInitLoopExpr -// CHECK-SAME: 'int[10]' +// CHECK-SAME: 'int [10]' // CHECK: ArrayInitIndexExpr diff --git a/clang/test/Index/print-type-size.cpp b/clang/test/Index/print-type-size.cpp index c61965004000..b4098d97726c 100644 --- a/clang/test/Index/print-type-size.cpp +++ b/clang/test/Index/print-type-size.cpp @@ -368,7 +368,7 @@ struct BaseStruct namespace NotConstantSize { void f(int i) { -// CHECK32: VarDecl=v2:[[@LINE+1]]:8 (Definition) [type=int[i]] [typekind=VariableArray] [sizeof=-4] [alignof=4] +// CHECK32: VarDecl=v2:[[@LINE+1]]:8 (Definition) [type=int [i]] [typekind=VariableArray] [sizeof=-4] [alignof=4] int v2[i]; { struct CS1 { diff --git a/clang/test/Index/print-type.c b/clang/test/Index/print-type.c index c976e28e3321..745b661113ca 100644 --- a/clang/test/Index/print-type.c +++ b/clang/test/Index/print-type.c @@ -32,12 +32,12 @@ void fun(struct { int x; int y; } *param); _Atomic(unsigned long) aul; // RUN: c-index-test -test-print-type %s | FileCheck %s -// CHECK: FunctionDecl=f:3:6 (Definition) [type=int *(int *, char *, FooType, int *, void (*)(int))] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int, int *, void (*)(int))] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [FooType] [Typedef] [int[5]] [ConstantArray] [void (*)(int)] [Pointer]] [isPOD=0] +// CHECK: FunctionDecl=f:3:6 (Definition) [type=int *(int *, char *, FooType, int *, void (*)(int))] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int, int *, void (*)(int))] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [FooType] [Typedef] [int [5]] [ConstantArray] [void (*)(int)] [Pointer]] [isPOD=0] // CHECK: ParmDecl=p:3:13 (Definition) [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] // CHECK: ParmDecl=x:3:22 (Definition) [type=char *] [typekind=Pointer] [isPOD=1] [pointeetype=char] [pointeekind=Char_{{[US]}}] // CHECK: ParmDecl=z:3:33 (Definition) [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: TypeRef=FooType:1:13 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] -// CHECK: ParmDecl=arr:3:40 (Definition) [type=int[5]] [typekind=ConstantArray] [isPOD=1] +// CHECK: ParmDecl=arr:3:40 (Definition) [type=int [5]] [typekind=ConstantArray] [isPOD=1] // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] // CHECK: ParmDecl=fn:3:55 (Definition) [type=void (*)(int)] [typekind=Pointer] [canonicaltype=void (*)(int)] [canonicaltypekind=Pointer] [isPOD=1] [pointeetype=void (int)] [pointeekind=FunctionProto] // CHECK: ParmDecl=:3:62 (Definition) [type=int] [typekind=Int] [isPOD=1] @@ -56,14 +56,14 @@ _Atomic(unsigned long) aul; // CHECK: DeclRefExpr=p:3:13 [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] // CHECK: DeclRefExpr=z:3:33 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: ArraySubscriptExpr= [type=int] [typekind=Int] [isPOD=1] -// CHECK: UnexposedExpr=arr:3:40 [type=int[5]] [typekind=ConstantArray] [isPOD=1] +// CHECK: UnexposedExpr=arr:3:40 [type=int [5]] [typekind=ConstantArray] [isPOD=1] // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] // CHECK: TypedefDecl=OtherType:8:16 (Definition) [type=OtherType] [typekind=Typedef] [canonicaltype=double] [canonicaltypekind=Double] [isPOD=1] -// CHECK: TypedefDecl=ArrayType:9:13 (Definition) [type=ArrayType] [typekind=Typedef] [canonicaltype=int[5]] [canonicaltypekind=ConstantArray] [isPOD=1] +// CHECK: TypedefDecl=ArrayType:9:13 (Definition) [type=ArrayType] [typekind=Typedef] [canonicaltype=int [5]] [canonicaltypekind=ConstantArray] [isPOD=1] // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] // CHECK: VarDecl=x:10:38 [type=__attribute__((__vector_size__(4 * sizeof(int)))) int] [typekind=Vector] [isPOD=1] // CHECK: TypedefDecl=int4_t:11:46 (Definition) [type=int4_t] [typekind=Typedef] [canonicaltype=__attribute__((__vector_size__(4 * sizeof(int)))) int] [canonicaltypekind=Vector] [isPOD=1] -// CHECK: ParmDecl=incompletearray:13:12 (Definition) [type=int[]] [typekind=IncompleteArray] [isPOD=1] +// CHECK: ParmDecl=incompletearray:13:12 (Definition) [type=int []] [typekind=IncompleteArray] [isPOD=1] // CHECK: FunctionDecl=elaboratedEnumType:15:25 [type=enum Enum ()] [typekind=FunctionNoProto] [canonicaltype=enum Enum ()] [canonicaltypekind=FunctionNoProto] [resulttype=enum Enum] [resulttypekind=Elaborated] [isPOD=0] // CHECK: TypeRef=enum Enum:15:6 [type=enum Enum] [typekind=Enum] [isPOD=1] // CHECK: StructDecl=Struct:16:8 (Definition) [type=struct Struct] [typekind=Record] [isPOD=1] diff --git a/clang/test/Index/print-type.cpp b/clang/test/Index/print-type.cpp index f52ee8092e8f..18259e80ebac 100644 --- a/clang/test/Index/print-type.cpp +++ b/clang/test/Index/print-type.cpp @@ -130,7 +130,7 @@ inline namespace InlineNS {} // CHECK: UnexposedExpr=z:22:35 [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: DeclRefExpr=z:22:35 [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: TypedefDecl=OtherType:26:18 (Definition) [type=outer::inner::Bar::OtherType] [typekind=Typedef] [canonicaltype=double] [canonicaltypekind=Double] [isPOD=1] -// CHECK: TypedefDecl=ArrayType:27:15 (Definition) [type=outer::inner::Bar::ArrayType] [typekind=Typedef] [canonicaltype=int[5]] [canonicaltypekind=ConstantArray] [isPOD=1] +// CHECK: TypedefDecl=ArrayType:27:15 (Definition) [type=outer::inner::Bar::ArrayType] [typekind=Typedef] [canonicaltype=int [5]] [canonicaltypekind=ConstantArray] [isPOD=1] // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] // CHECK: FieldDecl=baz:28:20 (Definition) [type=Baz] [typekind=Unexposed] [templateargs/3= [type=int] [typekind=Int]] [canonicaltype=outer::Baz] [canonicaltypekind=Record] [canonicaltemplateargs/3= [type=int] [typekind=Int]] [isPOD=1] // CHECK: TemplateRef=Baz:9:8 [type=] [typekind=Invalid] [isPOD=0] @@ -146,20 +146,20 @@ inline namespace InlineNS {} // CHECK: FunctionTemplate=tbar:39:3 [type=T (int *)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int *)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0] // CHECK: TemplateTypeParameter=T:38:20 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] // CHECK: TypeRef=T:38:20 [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] -// CHECK: ParmDecl=:39:11 (Definition) [type=int[5]] [typekind=ConstantArray] [isPOD=1] +// CHECK: ParmDecl=:39:11 (Definition) [type=int [5]] [typekind=ConstantArray] [isPOD=1] // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] // CHECK: FunctionTemplate=tbar:42:3 [type=T (int *)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int *)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0] // CHECK: TemplateTypeParameter=T:41:20 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] // CHECK: NonTypeTemplateParameter=size:41:27 (Definition) [type=int] [typekind=Int] [isPOD=1] // CHECK: TypeRef=T:41:20 [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] -// CHECK: ParmDecl=:42:11 (Definition) [type=int[size]] [typekind=DependentSizedArray] [isPOD=0] +// CHECK: ParmDecl=:42:11 (Definition) [type=int [size]] [typekind=DependentSizedArray] [isPOD=0] // CHECK: DeclRefExpr=size:41:27 [type=int] [typekind=Int] [isPOD=1] -// CHECK: FunctionDecl=foo:44:6 (Definition) [type=void (int, int *)] [typekind=FunctionProto] [canonicaltype=void (int, int *)] [canonicaltypekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [int] [Int] [int[]] [IncompleteArray]] [isPOD=0] +// CHECK: FunctionDecl=foo:44:6 (Definition) [type=void (int, int *)] [typekind=FunctionProto] [canonicaltype=void (int, int *)] [canonicaltypekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [int] [Int] [int []] [IncompleteArray]] [isPOD=0] // CHECK: ParmDecl=i:44:14 (Definition) [type=int] [typekind=Int] [isPOD=1] -// CHECK: ParmDecl=incomplete_array:44:21 (Definition) [type=int[]] [typekind=IncompleteArray] [isPOD=1] +// CHECK: ParmDecl=incomplete_array:44:21 (Definition) [type=int []] [typekind=IncompleteArray] [isPOD=1] // CHECK: CompoundStmt= [type=] [typekind=Invalid] [isPOD=0] // CHECK: DeclStmt= [type=] [typekind=Invalid] [isPOD=0] -// CHECK: VarDecl=variable_array:44:47 (Definition) [type=int[i]] [typekind=VariableArray] [isPOD=1] +// CHECK: VarDecl=variable_array:44:47 (Definition) [type=int [i]] [typekind=VariableArray] [isPOD=1] // CHECK: DeclRefExpr=i:44:14 [type=int] [typekind=Int] [isPOD=1] // CHECK: StructDecl=Blob:46:8 (Definition) [type=Blob] [typekind=Record] [isPOD=1] [nbFields=2] // CHECK: FieldDecl=i:47:7 (Definition) [type=int] [typekind=Int] [isPOD=1] diff --git a/clang/test/Layout/aix-Wpacked-expecting-diagnostics.cpp b/clang/test/Layout/aix-Wpacked-expecting-diagnostics.cpp index 37982fcb74b9..1980c04877c5 100644 --- a/clang/test/Layout/aix-Wpacked-expecting-diagnostics.cpp +++ b/clang/test/Layout/aix-Wpacked-expecting-diagnostics.cpp @@ -22,9 +22,9 @@ int b = sizeof(C); // CHECK: 0 | struct C // CHECK-NEXT: 0 | struct B (base) -// CHECK-NEXT: 0 | char[8] x +// CHECK-NEXT: 0 | char [8] x // CHECK-NEXT: 8 | struct A (base) // CHECK-NEXT: 8 | double d -// CHECK-NEXT: 16 | char[8] x +// CHECK-NEXT: 16 | char [8] x // CHECK-NEXT: | [sizeof=24, dsize=24, align=4, preferredalign=4, // CHECK-NEXT: | nvsize=24, nvalign=4, preferrednvalign=4] diff --git a/clang/test/Layout/aix-double-struct-member.cpp b/clang/test/Layout/aix-double-struct-member.cpp index 6e091fcb1b1e..32466259d31b 100644 --- a/clang/test/Layout/aix-double-struct-member.cpp +++ b/clang/test/Layout/aix-double-struct-member.cpp @@ -196,14 +196,14 @@ int a = sizeof(A); // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct test6::A::B -// CHECK-NEXT: 0 | double[3] d +// CHECK-NEXT: 0 | double [3] d // CHECK-NEXT: | [sizeof=24, dsize=24, align=4, preferredalign=8, // CHECK-NEXT: | nvsize=24, nvalign=4, preferrednvalign=8] // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct test6::A // CHECK-NEXT: 0 | struct test6::A::B b -// CHECK-NEXT: 0 | double[3] d +// CHECK-NEXT: 0 | double [3] d // CHECK-NEXT: | [sizeof=24, dsize=24, align=4, preferredalign=8, // CHECK-NEXT: | nvsize=24, nvalign=4, preferrednvalign=8] @@ -220,14 +220,14 @@ int a = sizeof(A); // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct test7::A::B -// CHECK-NEXT: 0 | _Complex long double[3] d +// CHECK-NEXT: 0 | _Complex long double [3] d // CHECK-NEXT: | [sizeof=48, dsize=48, align=4, preferredalign=8, // CHECK-NEXT: | nvsize=48, nvalign=4, preferrednvalign=8] // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct test7::A // CHECK-NEXT: 0 | struct test7::A::B b -// CHECK-NEXT: 0 | _Complex long double[3] d +// CHECK-NEXT: 0 | _Complex long double [3] d // CHECK-NEXT: | [sizeof=48, dsize=48, align=4, preferredalign=8, // CHECK-NEXT: | nvsize=48, nvalign=4, preferrednvalign=8] @@ -284,14 +284,14 @@ int b = sizeof(D); // CHECK: 0 | struct test9::B // CHECK-NEXT: 0 | struct test9::A (base) -// CHECK-NEXT: 0 | char[0] zea +// CHECK-NEXT: 0 | char [0] zea // CHECK-NEXT: 0 | double d // CHECK-NEXT: | [sizeof=8, dsize=8, align=4, preferredalign=4, // CHECK-NEXT: | nvsize=8, nvalign=4, preferrednvalign=4] // CHECK: 0 | struct test9::D // CHECK-NEXT: 0 | struct test9::A (base) -// CHECK-NEXT: 0 | char[0] zea +// CHECK-NEXT: 0 | char [0] zea // CHECK-NEXT: 0 | struct test9::C (base) // CHECK-NEXT: 0 | double d // CHECK-NEXT: 8 | char x diff --git a/clang/test/Layout/aix-no-unique-address-with-double.cpp b/clang/test/Layout/aix-no-unique-address-with-double.cpp index 470f4dfcb01f..5188bf128bc5 100644 --- a/clang/test/Layout/aix-no-unique-address-with-double.cpp +++ b/clang/test/Layout/aix-no-unique-address-with-double.cpp @@ -52,7 +52,7 @@ struct B1 { // CHECK-NEXT: 4 | struct A a // CHECK-NEXT: 4 | double d // CHECK-NEXT: 12 | char c -// CHECK-NEXT: 13 | char[7] ext +// CHECK-NEXT: 13 | char [7] ext // CHECK-NEXT: | [sizeof=20, dsize=20, align=4, preferredalign=4, // CHECK-NEXT: | nvsize=20, nvalign=4, preferrednvalign=4] @@ -85,7 +85,7 @@ struct C1 { // CHECK-NEXT: 0 | struct A a // CHECK-NEXT: 0 | double d // CHECK-NEXT: 8 | char c -// CHECK-NEXT: 9 | char[7] ext +// CHECK-NEXT: 9 | char [7] ext // CHECK-NEXT: | [sizeof=16, dsize=16, align=4, preferredalign=8, // CHECK-NEXT: | nvsize=16, nvalign=4, preferrednvalign=8] @@ -118,7 +118,7 @@ struct D1 { // CHECK-NEXT: 4 | struct A a // CHECK-NEXT: 4 | double d // CHECK-NEXT: 12 | char c -// CHECK-NEXT: 13 | char[7] ext +// CHECK-NEXT: 13 | char [7] ext // CHECK-NEXT: | [sizeof=20, dsize=20, align=4, preferredalign=4, // CHECK-NEXT: | nvsize=20, nvalign=4, preferrednvalign=4] diff --git a/clang/test/Layout/aix-power-alignment-typedef.cpp b/clang/test/Layout/aix-power-alignment-typedef.cpp index 4696c195eaac..f6925c34b171 100644 --- a/clang/test/Layout/aix-power-alignment-typedef.cpp +++ b/clang/test/Layout/aix-power-alignment-typedef.cpp @@ -67,7 +67,7 @@ union U { int x = sizeof(U); // CHECK: 0 | union test4::U -// CHECK-NEXT: 0 | test4::Dbl[] DblArr +// CHECK-NEXT: 0 | test4::Dbl [] DblArr // CHECK-NEXT: 0 | char x // CHECK-NEXT: | [sizeof=2, dsize=2, align=2, preferredalign=2, // CHECK-NEXT: | nvsize=2, nvalign=2, preferrednvalign=2] diff --git a/clang/test/Layout/ms-aligned-array.c b/clang/test/Layout/ms-aligned-array.c index 7cf976ccd2be..81fbbbb62753 100644 --- a/clang/test/Layout/ms-aligned-array.c +++ b/clang/test/Layout/ms-aligned-array.c @@ -36,17 +36,17 @@ CHECK_SIZE(C, 16); // CHECK-NEXT: | [sizeof=16, align=16] // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct A -// CHECK-NEXT: 0 | struct AlignedStruct[1] a +// CHECK-NEXT: 0 | struct AlignedStruct [1] a // CHECK-NEXT: | [sizeof=16, align=16] // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct B // CHECK-NEXT: 0 | char b -// CHECK-NEXT: 16 | AlignedInt[1] a +// CHECK-NEXT: 16 | AlignedInt [1] a // CHECK-NEXT: | [sizeof=32, align=16] // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct C // CHECK-NEXT: 0 | char b -// CHECK-NEXT: 16 | AlignedInt[] a +// CHECK-NEXT: 16 | AlignedInt [] a // CHECK-NEXT: | [sizeof=16, align=16] #pragma pack(pop) diff --git a/clang/test/Layout/ms-x86-basic-layout.cpp b/clang/test/Layout/ms-x86-basic-layout.cpp index 1bd85bf6057e..0b49fcb0b074 100644 --- a/clang/test/Layout/ms-x86-basic-layout.cpp +++ b/clang/test/Layout/ms-x86-basic-layout.cpp @@ -716,11 +716,11 @@ struct ArrayFieldOfRecords { }; // CHECK-LABEL: 0 | struct ArrayFieldOfRecords{{$}} -// CHECK-NEXT: 0 | struct A4[2] InlineElts +// CHECK-NEXT: 0 | struct A4 [2] InlineElts // CHECK-NEXT: | [sizeof=8, align=4 // CHECK-NEXT: | nvsize=8, nvalign=4] // CHECK-X64-LABEL: 0 | struct ArrayFieldOfRecords{{$}} -// CHECK-X64-NEXT: 0 | struct A4[2] InlineElts +// CHECK-X64-NEXT: 0 | struct A4 [2] InlineElts // CHECK-X64-NEXT: | [sizeof=8, align=4 // CHECK-X64-NEXT: | nvsize=8, nvalign=4] @@ -729,11 +729,11 @@ struct ArrayOfArrayFieldOfRecords { }; // CHECK-LABEL: 0 | struct ArrayOfArrayFieldOfRecords{{$}} -// CHECK-NEXT: 0 | struct A4[2][2] InlineElts +// CHECK-NEXT: 0 | struct A4 [2][2] InlineElts // CHECK-NEXT: | [sizeof=16, align=4 // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct ArrayOfArrayFieldOfRecords{{$}} -// CHECK-X64-NEXT: 0 | struct A4[2][2] InlineElts +// CHECK-X64-NEXT: 0 | struct A4 [2][2] InlineElts // CHECK-X64-NEXT: | [sizeof=16, align=4 // CHECK-X64-NEXT: | nvsize=16, nvalign=4] @@ -743,11 +743,11 @@ struct RecordArrayTypedef { }; // CHECK-LABEL: 0 | struct RecordArrayTypedef{{$}} -// CHECK-NEXT: 0 | RecordArrayTypedef::ArrayTy[2] InlineElts +// CHECK-NEXT: 0 | RecordArrayTypedef::ArrayTy [2] InlineElts // CHECK-NEXT: | [sizeof=16, align=4 // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct RecordArrayTypedef{{$}} -// CHECK-X64-NEXT: 0 | RecordArrayTypedef::ArrayTy[2] InlineElts +// CHECK-X64-NEXT: 0 | RecordArrayTypedef::ArrayTy [2] InlineElts // CHECK-X64-NEXT: | [sizeof=16, align=4 // CHECK-X64-NEXT: | nvsize=16, nvalign=4] @@ -756,11 +756,11 @@ struct EmptyIntMemb { }; // CHECK-LABEL: 0 | struct EmptyIntMemb{{$}} -// CHECK-NEXT: 0 | int[0] FlexArrayMemb +// CHECK-NEXT: 0 | int [0] FlexArrayMemb // CHECK-NEXT: | [sizeof=1, align=4 // CHECK-NEXT: | nvsize=0, nvalign=4] // CHECK-X64-LABEL: 0 | struct EmptyIntMemb{{$}} -// CHECK-X64-NEXT: 0 | int[0] FlexArrayMemb +// CHECK-X64-NEXT: 0 | int [0] FlexArrayMemb // CHECK-X64-NEXT: | [sizeof=4, align=4 // CHECK-X64-NEXT: | nvsize=0, nvalign=4] @@ -769,11 +769,11 @@ struct EmptyLongLongMemb { }; // CHECK-LABEL: 0 | struct EmptyLongLongMemb{{$}} -// CHECK-NEXT: 0 | long long[0] FlexArrayMemb +// CHECK-NEXT: 0 | long long [0] FlexArrayMemb // CHECK-NEXT: | [sizeof=1, align=8 // CHECK-NEXT: | nvsize=0, nvalign=8] // CHECK-X64-LABEL: 0 | struct EmptyLongLongMemb{{$}} -// CHECK-X64-NEXT: 0 | long long[0] FlexArrayMemb +// CHECK-X64-NEXT: 0 | long long [0] FlexArrayMemb // CHECK-X64-NEXT: | [sizeof=8, align=8 // CHECK-X64-NEXT: | nvsize=0, nvalign=8] diff --git a/clang/test/Layout/ms-x86-empty-layout.c b/clang/test/Layout/ms-x86-empty-layout.c index dfcbb851977e..5dbd8446597e 100644 --- a/clang/test/Layout/ms-x86-empty-layout.c +++ b/clang/test/Layout/ms-x86-empty-layout.c @@ -8,7 +8,7 @@ struct EmptyIntMemb { }; // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct EmptyIntMemb -// CHECK-NEXT: 0 | int[0] FlexArrayMemb +// CHECK-NEXT: 0 | int [0] FlexArrayMemb // CHECK-NEXT: | [sizeof=4, align=4 struct EmptyLongLongMemb { @@ -16,7 +16,7 @@ struct EmptyLongLongMemb { }; // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct EmptyLongLongMemb -// CHECK-NEXT: 0 | long long[0] FlexArrayMemb +// CHECK-NEXT: 0 | long long [0] FlexArrayMemb // CHECK-NEXT: | [sizeof=4, align=8 struct EmptyAligned2LongLongMemb { @@ -25,7 +25,7 @@ struct EmptyAligned2LongLongMemb { // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct EmptyAligned2LongLongMemb -// CHECK-NEXT: 0 | long long[0] FlexArrayMemb +// CHECK-NEXT: 0 | long long [0] FlexArrayMemb // CHECK-NEXT: | [sizeof=4, align=8 struct EmptyAligned8LongLongMemb { @@ -34,7 +34,7 @@ struct EmptyAligned8LongLongMemb { // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct EmptyAligned8LongLongMemb -// CHECK-NEXT: 0 | long long[0] FlexArrayMemb +// CHECK-NEXT: 0 | long long [0] FlexArrayMemb // CHECK-NEXT: | [sizeof=8, align=8 #pragma pack(1) @@ -45,7 +45,7 @@ struct __declspec(align(4)) EmptyPackedAligned4LongLongMemb { // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct EmptyPackedAligned4LongLongMemb -// CHECK-NEXT: 0 | long long[0] FlexArrayMemb +// CHECK-NEXT: 0 | long long [0] FlexArrayMemb // CHECK-NEXT: | [sizeof=4, align=4 #pragma pack(1) @@ -56,7 +56,7 @@ struct EmptyPackedAligned8LongLongMemb { // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct EmptyPackedAligned8LongLongMemb -// CHECK-NEXT: 0 | long long[0] FlexArrayMemb +// CHECK-NEXT: 0 | long long [0] FlexArrayMemb // CHECK-NEXT: | [sizeof=8, align=8 diff --git a/clang/test/Layout/ms-x86-empty-nonvirtual-bases.cpp b/clang/test/Layout/ms-x86-empty-nonvirtual-bases.cpp index 41658f6a11e5..b4ea0e447b25 100644 --- a/clang/test/Layout/ms-x86-empty-nonvirtual-bases.cpp +++ b/clang/test/Layout/ms-x86-empty-nonvirtual-bases.cpp @@ -148,7 +148,7 @@ struct I { }; // CHECK-LABEL: 0 | struct I{{$}} -// CHECK-NEXT: 0 | int[0] i0 +// CHECK-NEXT: 0 | int [0] i0 // CHECK-NEXT: | [sizeof={{1|4}}, align=4, // CHECK-NEXT: | nvsize=0, nvalign=4] @@ -158,7 +158,7 @@ struct J : I { // CHECK-LABEL: 0 | struct J{{$}} // CHECK-NEXT: 0 | struct I (base) -// CHECK-NEXT: 0 | int[0] i0 +// CHECK-NEXT: 0 | int [0] i0 // CHECK-NEXT: 0 | int j // CHECK-NEXT: | [sizeof=4, align=4, // CHECK-NEXT: | nvsize=4, nvalign=4] diff --git a/clang/test/Layout/ms-x86-empty-virtual-base.cpp b/clang/test/Layout/ms-x86-empty-virtual-base.cpp index 8c350a2a56e1..9b897a307953 100644 --- a/clang/test/Layout/ms-x86-empty-virtual-base.cpp +++ b/clang/test/Layout/ms-x86-empty-virtual-base.cpp @@ -572,7 +572,7 @@ struct T : virtual B0, virtual B1, virtual C0, virtual D2, virtual B2, virtual B // CHECK-NEXT: 40 | struct C0 (virtual base) // CHECK-NEXT: 40 | int a // CHECK-NEXT: 44 | struct D2 (virtual base) -// CHECK-NEXT: 44 | int[8] a +// CHECK-NEXT: 44 | int [8] a // CHECK-NEXT: 80 | struct B2 (virtual base) (empty) // CHECK-NEXT: 88 | struct B3 (virtual base) (empty) // CHECK-NEXT: 104 | struct B4 (virtual base) (empty) @@ -586,7 +586,7 @@ struct T : virtual B0, virtual B1, virtual C0, virtual D2, virtual B2, virtual B // CHECK-X64-NEXT: 40 | struct C0 (virtual base) // CHECK-X64-NEXT: 40 | int a // CHECK-X64-NEXT: 44 | struct D2 (virtual base) -// CHECK-X64-NEXT: 44 | int[8] a +// CHECK-X64-NEXT: 44 | int [8] a // CHECK-X64-NEXT: 80 | struct B2 (virtual base) (empty) // CHECK-X64-NEXT: 88 | struct B3 (virtual base) (empty) // CHECK-X64-NEXT: 104 | struct B4 (virtual base) (empty) diff --git a/clang/test/Layout/ms-x86-lazy-empty-nonvirtual-base.cpp b/clang/test/Layout/ms-x86-lazy-empty-nonvirtual-base.cpp index 7eb6958ce446..58488ece2923 100644 --- a/clang/test/Layout/ms-x86-lazy-empty-nonvirtual-base.cpp +++ b/clang/test/Layout/ms-x86-lazy-empty-nonvirtual-base.cpp @@ -33,7 +33,7 @@ struct AA : B8, B1, virtual B0 { // CHECK-LABEL: 0 | struct AA{{$}} // CHECK-NEXT: 0 | struct B8 (base) -// CHECK-NEXT: 0 | char[5] c +// CHECK-NEXT: 0 | char [5] c // CHECK-NEXT: 13 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AA vbtable pointer) // CHECK-NEXT: 16 | int a @@ -42,7 +42,7 @@ struct AA : B8, B1, virtual B0 { // CHECK-NEXT: | nvsize=20, nvalign=4] // CHECK-X64-LABEL: 0 | struct AA{{$}} // CHECK-X64-NEXT: 0 | struct B8 (base) -// CHECK-X64-NEXT: 0 | char[5] c +// CHECK-X64-NEXT: 0 | char [5] c // CHECK-X64-NEXT: 17 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AA vbtable pointer) // CHECK-X64-NEXT: 20 | int a @@ -57,7 +57,7 @@ struct AB : B8, B1, virtual B0 { // CHECK-LABEL: 0 | struct AB{{$}} // CHECK-NEXT: 0 | struct B8 (base) -// CHECK-NEXT: 0 | char[5] c +// CHECK-NEXT: 0 | char [5] c // CHECK-NEXT: 13 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AB vbtable pointer) // CHECK-NEXT: 14 | short a @@ -66,7 +66,7 @@ struct AB : B8, B1, virtual B0 { // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct AB{{$}} // CHECK-X64-NEXT: 0 | struct B8 (base) -// CHECK-X64-NEXT: 0 | char[5] c +// CHECK-X64-NEXT: 0 | char [5] c // CHECK-X64-NEXT: 17 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AB vbtable pointer) // CHECK-X64-NEXT: 18 | short a @@ -81,7 +81,7 @@ struct AC : B8, B1, virtual B0 { // CHECK-LABEL: 0 | struct AC{{$}} // CHECK-NEXT: 0 | struct B8 (base) -// CHECK-NEXT: 0 | char[5] c +// CHECK-NEXT: 0 | char [5] c // CHECK-NEXT: 12 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AC vbtable pointer) // CHECK-NEXT: 12 | char a @@ -90,7 +90,7 @@ struct AC : B8, B1, virtual B0 { // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct AC{{$}} // CHECK-X64-NEXT: 0 | struct B8 (base) -// CHECK-X64-NEXT: 0 | char[5] c +// CHECK-X64-NEXT: 0 | char [5] c // CHECK-X64-NEXT: 16 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AC vbtable pointer) // CHECK-X64-NEXT: 16 | char a @@ -104,7 +104,7 @@ struct AD : B8, B1, virtual B0 { // CHECK-LABEL: 0 | struct AD{{$}} // CHECK-NEXT: 0 | struct B8 (base) -// CHECK-NEXT: 0 | char[5] c +// CHECK-NEXT: 0 | char [5] c // CHECK-NEXT: 12 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AD vbtable pointer) // CHECK-NEXT: 12 | struct B0 (virtual base) (empty) @@ -112,7 +112,7 @@ struct AD : B8, B1, virtual B0 { // CHECK-NEXT: | nvsize=12, nvalign=4] // CHECK-X64-LABEL: 0 | struct AD{{$}} // CHECK-X64-NEXT: 0 | struct B8 (base) -// CHECK-X64-NEXT: 0 | char[5] c +// CHECK-X64-NEXT: 0 | char [5] c // CHECK-X64-NEXT: 16 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AD vbtable pointer) // CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty) @@ -126,7 +126,7 @@ struct AA1 : B9, B1, virtual B0 { // CHECK-LABEL: 0 | struct AA1{{$}} // CHECK-NEXT: 0 | struct B9 (base) -// CHECK-NEXT: 0 | char[6] c +// CHECK-NEXT: 0 | char [6] c // CHECK-NEXT: 14 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AA1 vbtable pointer) // CHECK-NEXT: 16 | int a @@ -135,7 +135,7 @@ struct AA1 : B9, B1, virtual B0 { // CHECK-NEXT: | nvsize=20, nvalign=4] // CHECK-X64-LABEL: 0 | struct AA1{{$}} // CHECK-X64-NEXT: 0 | struct B9 (base) -// CHECK-X64-NEXT: 0 | char[6] c +// CHECK-X64-NEXT: 0 | char [6] c // CHECK-X64-NEXT: 18 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AA1 vbtable pointer) // CHECK-X64-NEXT: 20 | int a @@ -150,7 +150,7 @@ struct AB1 : B9, B1, virtual B0 { // CHECK-LABEL: 0 | struct AB1{{$}} // CHECK-NEXT: 0 | struct B9 (base) -// CHECK-NEXT: 0 | char[6] c +// CHECK-NEXT: 0 | char [6] c // CHECK-NEXT: 12 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AB1 vbtable pointer) // CHECK-NEXT: 12 | short a @@ -159,7 +159,7 @@ struct AB1 : B9, B1, virtual B0 { // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct AB1{{$}} // CHECK-X64-NEXT: 0 | struct B9 (base) -// CHECK-X64-NEXT: 0 | char[6] c +// CHECK-X64-NEXT: 0 | char [6] c // CHECK-X64-NEXT: 16 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AB1 vbtable pointer) // CHECK-X64-NEXT: 16 | short a @@ -174,7 +174,7 @@ struct AC1 : B9, B1, virtual B0 { // CHECK-LABEL: 0 | struct AC1{{$}} // CHECK-NEXT: 0 | struct B9 (base) -// CHECK-NEXT: 0 | char[6] c +// CHECK-NEXT: 0 | char [6] c // CHECK-NEXT: 12 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AC1 vbtable pointer) // CHECK-NEXT: 12 | char a @@ -183,7 +183,7 @@ struct AC1 : B9, B1, virtual B0 { // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct AC1{{$}} // CHECK-X64-NEXT: 0 | struct B9 (base) -// CHECK-X64-NEXT: 0 | char[6] c +// CHECK-X64-NEXT: 0 | char [6] c // CHECK-X64-NEXT: 16 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AC1 vbtable pointer) // CHECK-X64-NEXT: 16 | char a @@ -197,7 +197,7 @@ struct AD1 : B9, B1, virtual B0 { // CHECK-LABEL: 0 | struct AD1{{$}} // CHECK-NEXT: 0 | struct B9 (base) -// CHECK-NEXT: 0 | char[6] c +// CHECK-NEXT: 0 | char [6] c // CHECK-NEXT: 12 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AD1 vbtable pointer) // CHECK-NEXT: 12 | struct B0 (virtual base) (empty) @@ -205,7 +205,7 @@ struct AD1 : B9, B1, virtual B0 { // CHECK-NEXT: | nvsize=12, nvalign=4] // CHECK-X64-LABEL: 0 | struct AD1{{$}} // CHECK-X64-NEXT: 0 | struct B9 (base) -// CHECK-X64-NEXT: 0 | char[6] c +// CHECK-X64-NEXT: 0 | char [6] c // CHECK-X64-NEXT: 16 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AD1 vbtable pointer) // CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty) @@ -219,7 +219,7 @@ struct AA2 : B10, B1, virtual B0 { // CHECK-LABEL: 0 | struct AA2{{$}} // CHECK-NEXT: 0 | struct B10 (base) -// CHECK-NEXT: 0 | char[7] c +// CHECK-NEXT: 0 | char [7] c // CHECK-NEXT: 15 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AA2 vbtable pointer) // CHECK-NEXT: 16 | int a @@ -228,7 +228,7 @@ struct AA2 : B10, B1, virtual B0 { // CHECK-NEXT: | nvsize=20, nvalign=4] // CHECK-X64-LABEL: 0 | struct AA2{{$}} // CHECK-X64-NEXT: 0 | struct B10 (base) -// CHECK-X64-NEXT: 0 | char[7] c +// CHECK-X64-NEXT: 0 | char [7] c // CHECK-X64-NEXT: 19 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AA2 vbtable pointer) // CHECK-X64-NEXT: 20 | int a @@ -243,7 +243,7 @@ struct AB2 : B10, B1, virtual B0 { // CHECK-LABEL: 0 | struct AB2{{$}} // CHECK-NEXT: 0 | struct B10 (base) -// CHECK-NEXT: 0 | char[7] c +// CHECK-NEXT: 0 | char [7] c // CHECK-NEXT: 13 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AB2 vbtable pointer) // CHECK-NEXT: 14 | short a @@ -252,7 +252,7 @@ struct AB2 : B10, B1, virtual B0 { // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct AB2{{$}} // CHECK-X64-NEXT: 0 | struct B10 (base) -// CHECK-X64-NEXT: 0 | char[7] c +// CHECK-X64-NEXT: 0 | char [7] c // CHECK-X64-NEXT: 17 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AB2 vbtable pointer) // CHECK-X64-NEXT: 18 | short a @@ -267,7 +267,7 @@ struct AC2 : B10, B1, virtual B0 { // CHECK-LABEL: 0 | struct AC2{{$}} // CHECK-NEXT: 0 | struct B10 (base) -// CHECK-NEXT: 0 | char[7] c +// CHECK-NEXT: 0 | char [7] c // CHECK-NEXT: 12 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AC2 vbtable pointer) // CHECK-NEXT: 12 | char a @@ -276,7 +276,7 @@ struct AC2 : B10, B1, virtual B0 { // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct AC2{{$}} // CHECK-X64-NEXT: 0 | struct B10 (base) -// CHECK-X64-NEXT: 0 | char[7] c +// CHECK-X64-NEXT: 0 | char [7] c // CHECK-X64-NEXT: 16 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AC2 vbtable pointer) // CHECK-X64-NEXT: 16 | char a @@ -290,7 +290,7 @@ struct AD2 : B10, B1, virtual B0 { // CHECK-LABEL: 0 | struct AD2{{$}} // CHECK-NEXT: 0 | struct B10 (base) -// CHECK-NEXT: 0 | char[7] c +// CHECK-NEXT: 0 | char [7] c // CHECK-NEXT: 12 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AD2 vbtable pointer) // CHECK-NEXT: 12 | struct B0 (virtual base) (empty) @@ -298,7 +298,7 @@ struct AD2 : B10, B1, virtual B0 { // CHECK-NEXT: | nvsize=12, nvalign=4] // CHECK-X64-LABEL: 0 | struct AD2{{$}} // CHECK-X64-NEXT: 0 | struct B10 (base) -// CHECK-X64-NEXT: 0 | char[7] c +// CHECK-X64-NEXT: 0 | char [7] c // CHECK-X64-NEXT: 16 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AD2 vbtable pointer) // CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty) @@ -312,7 +312,7 @@ struct AA3 : B11, B1, virtual B0 { // CHECK-LABEL: 0 | struct AA3{{$}} // CHECK-NEXT: 0 | struct B11 (base) -// CHECK-NEXT: 0 | char[8] c +// CHECK-NEXT: 0 | char [8] c // CHECK-NEXT: 12 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AA3 vbtable pointer) // CHECK-NEXT: 12 | int a @@ -321,7 +321,7 @@ struct AA3 : B11, B1, virtual B0 { // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct AA3{{$}} // CHECK-X64-NEXT: 0 | struct B11 (base) -// CHECK-X64-NEXT: 0 | char[8] c +// CHECK-X64-NEXT: 0 | char [8] c // CHECK-X64-NEXT: 16 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AA3 vbtable pointer) // CHECK-X64-NEXT: 16 | int a @@ -336,7 +336,7 @@ struct AB3 : B11, B1, virtual B0 { // CHECK-LABEL: 0 | struct AB3{{$}} // CHECK-NEXT: 0 | struct B11 (base) -// CHECK-NEXT: 0 | char[8] c +// CHECK-NEXT: 0 | char [8] c // CHECK-NEXT: 12 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AB3 vbtable pointer) // CHECK-NEXT: 12 | short a @@ -345,7 +345,7 @@ struct AB3 : B11, B1, virtual B0 { // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct AB3{{$}} // CHECK-X64-NEXT: 0 | struct B11 (base) -// CHECK-X64-NEXT: 0 | char[8] c +// CHECK-X64-NEXT: 0 | char [8] c // CHECK-X64-NEXT: 16 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AB3 vbtable pointer) // CHECK-X64-NEXT: 16 | short a @@ -360,7 +360,7 @@ struct AC3 : B11, B1, virtual B0 { // CHECK-LABEL: 0 | struct AC3{{$}} // CHECK-NEXT: 0 | struct B11 (base) -// CHECK-NEXT: 0 | char[8] c +// CHECK-NEXT: 0 | char [8] c // CHECK-NEXT: 12 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AC3 vbtable pointer) // CHECK-NEXT: 12 | char a @@ -369,7 +369,7 @@ struct AC3 : B11, B1, virtual B0 { // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct AC3{{$}} // CHECK-X64-NEXT: 0 | struct B11 (base) -// CHECK-X64-NEXT: 0 | char[8] c +// CHECK-X64-NEXT: 0 | char [8] c // CHECK-X64-NEXT: 16 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AC3 vbtable pointer) // CHECK-X64-NEXT: 16 | char a @@ -383,7 +383,7 @@ struct AD3 : B11, B1, virtual B0 { // CHECK-LABEL: 0 | struct AD3{{$}} // CHECK-NEXT: 0 | struct B11 (base) -// CHECK-NEXT: 0 | char[8] c +// CHECK-NEXT: 0 | char [8] c // CHECK-NEXT: 12 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (AD3 vbtable pointer) // CHECK-NEXT: 12 | struct B0 (virtual base) (empty) @@ -391,7 +391,7 @@ struct AD3 : B11, B1, virtual B0 { // CHECK-NEXT: | nvsize=12, nvalign=4] // CHECK-X64-LABEL: 0 | struct AD3{{$}} // CHECK-X64-NEXT: 0 | struct B11 (base) -// CHECK-X64-NEXT: 0 | char[8] c +// CHECK-X64-NEXT: 0 | char [8] c // CHECK-X64-NEXT: 16 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (AD3 vbtable pointer) // CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty) @@ -507,7 +507,7 @@ struct F : B1, B6, B4, B8, B5, virtual B0 { // CHECK-NEXT: 2 | struct B6 (base) (empty) // CHECK-NEXT: 3 | struct B4 (base) (empty) // CHECK-NEXT: 3 | struct B8 (base) -// CHECK-NEXT: 3 | char[5] c +// CHECK-NEXT: 3 | char [5] c // CHECK-NEXT: 12 | struct B5 (base) (empty) // CHECK-NEXT: 8 | (F vbtable pointer) // CHECK-NEXT: 12 | int a @@ -519,7 +519,7 @@ struct F : B1, B6, B4, B8, B5, virtual B0 { // CHECK-X64-NEXT: 2 | struct B6 (base) (empty) // CHECK-X64-NEXT: 3 | struct B4 (base) (empty) // CHECK-X64-NEXT: 3 | struct B8 (base) -// CHECK-X64-NEXT: 3 | char[5] c +// CHECK-X64-NEXT: 3 | char [5] c // CHECK-X64-NEXT: 16 | struct B5 (base) (empty) // CHECK-X64-NEXT: 8 | (F vbtable pointer) // CHECK-X64-NEXT: 16 | int a @@ -535,7 +535,7 @@ struct G : B8, B1, virtual B0 { // CHECK-LABEL: 0 | struct G{{$}} // CHECK-NEXT: 0 | struct B8 (base) -// CHECK-NEXT: 0 | char[5] c +// CHECK-NEXT: 0 | char [5] c // CHECK-NEXT: 21 | struct B1 (base) (empty) // CHECK-NEXT: 8 | (G vbtable pointer) // CHECK-NEXT: 24 | int a @@ -545,7 +545,7 @@ struct G : B8, B1, virtual B0 { // CHECK-NEXT: | nvsize=48, nvalign=16] // CHECK-X64-LABEL: 0 | struct G{{$}} // CHECK-X64-NEXT: 0 | struct B8 (base) -// CHECK-X64-NEXT: 0 | char[5] c +// CHECK-X64-NEXT: 0 | char [5] c // CHECK-X64-NEXT: 21 | struct B1 (base) (empty) // CHECK-X64-NEXT: 8 | (G vbtable pointer) // CHECK-X64-NEXT: 24 | int a diff --git a/clang/test/Layout/ms-x86-misalignedarray.cpp b/clang/test/Layout/ms-x86-misalignedarray.cpp index 7ca24ee6b468..de5bcc7c35c2 100644 --- a/clang/test/Layout/ms-x86-misalignedarray.cpp +++ b/clang/test/Layout/ms-x86-misalignedarray.cpp @@ -11,7 +11,7 @@ struct T3 { T2 a[1]; char c; }; // CHECK: *** Dumping AST Record Layout // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct T3 -// CHECK-NEXT: 0 | struct T2[1] a +// CHECK-NEXT: 0 | struct T2 [1] a // CHECK-NEXT: 5 | char c // CHECK-NEXT: | [sizeof=8, align=4 // CHECK-NEXT: | nvsize=8, nvalign=4] @@ -19,7 +19,7 @@ struct T3 { T2 a[1]; char c; }; // CHECK-X64: *** Dumping AST Record Layout // CHECK-X64: *** Dumping AST Record Layout // CHECK-X64-NEXT: 0 | struct T3 -// CHECK-X64-NEXT: 0 | struct T2[1] a +// CHECK-X64-NEXT: 0 | struct T2 [1] a // CHECK-X64-NEXT: 16 | char c // CHECK-X64-NEXT: | [sizeof=24, align=8 // CHECK-X64-NEXT: | nvsize=24, nvalign=8] diff --git a/clang/test/Layout/ms-x86-pack-and-align.cpp b/clang/test/Layout/ms-x86-pack-and-align.cpp index fc4fe17b29e3..c557ebcc954d 100644 --- a/clang/test/Layout/ms-x86-pack-and-align.cpp +++ b/clang/test/Layout/ms-x86-pack-and-align.cpp @@ -650,11 +650,11 @@ struct __declspec(align(4)) EmptyAlignedLongLongMemb { }; // CHECK-LABEL: 0 | struct EmptyAlignedLongLongMemb{{$}} -// CHECK-NEXT: 0 | long long[0] FlexArrayMemb +// CHECK-NEXT: 0 | long long [0] FlexArrayMemb // CHECK-NEXT: | [sizeof=8, align=8 // CHECK-NEXT: | nvsize=0, nvalign=8] // CHECK-X64-LABEL: 0 | struct EmptyAlignedLongLongMemb{{$}} -// CHECK-X64-NEXT: 0 | long long[0] FlexArrayMemb +// CHECK-X64-NEXT: 0 | long long [0] FlexArrayMemb // CHECK-X64-NEXT: | [sizeof=8, align=8 // CHECK-X64-NEXT: | nvsize=0, nvalign=8] @@ -665,11 +665,11 @@ struct __declspec(align(4)) EmptyPackedAlignedLongLongMemb { #pragma pack() // CHECK-LABEL: 0 | struct EmptyPackedAlignedLongLongMemb{{$}} -// CHECK-NEXT: 0 | long long[0] FlexArrayMemb +// CHECK-NEXT: 0 | long long [0] FlexArrayMemb // CHECK-NEXT: | [sizeof=4, align=4 // CHECK-NEXT: | nvsize=0, nvalign=4] // CHECK-X64-LABEL: 0 | struct EmptyPackedAlignedLongLongMemb{{$}} -// CHECK-X64-NEXT: 0 | long long[0] FlexArrayMemb +// CHECK-X64-NEXT: 0 | long long [0] FlexArrayMemb // CHECK-X64-NEXT: | [sizeof=4, align=4 // CHECK-X64-NEXT: | nvsize=0, nvalign=4] diff --git a/clang/test/Layout/no-unique-address.cpp b/clang/test/Layout/no-unique-address.cpp index d5bb46647b88..977355b55886 100644 --- a/clang/test/Layout/no-unique-address.cpp +++ b/clang/test/Layout/no-unique-address.cpp @@ -154,7 +154,7 @@ namespace POD { // CHECK: 0 | struct POD::B // CHECK-NEXT: 0 | struct POD::A a // CHECK-NEXT: 0 | int n - // CHECK-NEXT: 4 | char[3] c + // CHECK-NEXT: 4 | char [3] c // CHECK-NEXT: 8 | char d // CHECK-NEXT: | [sizeof=12, dsize=12, align=4, // CHECK-NEXT: | nvsize=12, nvalign=4] @@ -169,7 +169,7 @@ namespace NonPOD { // CHECK: 0 | struct NonPOD::B // CHECK-NEXT: 0 | struct NonPOD::A a // CHECK-NEXT: 0 | int n - // CHECK-NEXT: 4 | char[3] c + // CHECK-NEXT: 4 | char [3] c // CHECK-NEXT: 7 | char d // CHECK-NEXT: | [sizeof=8, dsize=8, align=4, // CHECK-NEXT: | nvsize=8, nvalign=4] diff --git a/clang/test/Layout/watchos-standard-layout.cpp b/clang/test/Layout/watchos-standard-layout.cpp index bf8af60fd98f..bd7bb1a434bd 100644 --- a/clang/test/Layout/watchos-standard-layout.cpp +++ b/clang/test/Layout/watchos-standard-layout.cpp @@ -20,7 +20,7 @@ static_assert(!__is_standard_layout(B)); // CHECK-NEXT: 0 | struct A (base) (empty) // CHECK-NEXT: 0:- | int // CHECK-NEXT: 0 | int n -// CHECK-NEXT: 4 | char[3] c +// CHECK-NEXT: 4 | char [3] c // CHECK-NEXT: 8 | char d // CHECK-NEXT: | [sizeof=12, dsize=9, align=4, // CHECK-NEXT: | nvsize=9, nvalign=4] @@ -41,7 +41,7 @@ static_assert(!__is_standard_layout(F)); // CHECK-NEXT: 1 | struct E (base) (empty) // CHECK-NEXT: 1 | struct D (base) (empty) // CHECK-NEXT: 0 | int n -// CHECK-NEXT: 4 | char[3] c +// CHECK-NEXT: 4 | char [3] c // CHECK-NEXT: 8 | char d // CHECK-NEXT: | [sizeof=12, dsize=9, align=4, // CHECK-NEXT: | nvsize=9, nvalign=4] diff --git a/clang/test/Misc/diag-macro-backtrace2.c b/clang/test/Misc/diag-macro-backtrace2.c index b90dfa16900f..ca13dca074d8 100644 --- a/clang/test/Misc/diag-macro-backtrace2.c +++ b/clang/test/Misc/diag-macro-backtrace2.c @@ -14,7 +14,7 @@ void PR16799() { const char str[] = "string"; a(str); // CHECK: :15:3: error: invalid operands to binary expression - // CHECK: ('const char[7]' and 'int') + // CHECK: ('const char [7]' and 'int') // CHECK: a(str); // CHECK: ^~~~~~ // CHECK: :3:11: note: expanded from macro 'a' diff --git a/clang/test/Misc/integer-literal-printing.cpp b/clang/test/Misc/integer-literal-printing.cpp index bd231a368fb7..75e90be3c23c 100644 --- a/clang/test/Misc/integer-literal-printing.cpp +++ b/clang/test/Misc/integer-literal-printing.cpp @@ -68,12 +68,12 @@ void Function() { Function1(Type1<-42>()); // expected-error{{no matching function for call to 'Function1'}} Function2(Type2<42>()); // expected-error{{no matching function for call to 'Function2'}} - struct Type3 t3; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type3Helper<(boolTy)false>::Ty' (aka 'boolTy')}} + struct Type3 t3; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type3Helper<(boolTy)false>::Ty' (aka 'boolTy')}} - struct Type4 t4; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type4Helper<(charTy)'\x00'>::Ty' (aka 'charTy')}} - struct Type5 t5; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type5Helper<(scharTy)'\x00'>::Ty' (aka 'scharTy')}} - struct Type6 t6; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type6Helper<(ucharTy)'\x00'>::Ty' (aka 'ucharTy')}} - struct Type7 t7; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type7Helper<(wcharTy)L'\x00'>::Ty' (aka 'wcharTy')}} - struct Type8 t8; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type8Helper<(char16Ty)u'\x00'>::Ty' (aka 'char16Ty')}} - struct Type9 t9; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type9Helper<(char32Ty)u'\x00'>::Ty' (aka 'char32Ty')}} + struct Type4 t4; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type4Helper<(charTy)'\x00'>::Ty' (aka 'charTy')}} + struct Type5 t5; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type5Helper<(scharTy)'\x00'>::Ty' (aka 'scharTy')}} + struct Type6 t6; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type6Helper<(ucharTy)'\x00'>::Ty' (aka 'ucharTy')}} + struct Type7 t7; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type7Helper<(wcharTy)L'\x00'>::Ty' (aka 'wcharTy')}} + struct Type8 t8; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type8Helper<(char16Ty)u'\x00'>::Ty' (aka 'char16Ty')}} + struct Type9 t9; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type9Helper<(char32Ty)u'\x00'>::Ty' (aka 'char32Ty')}} } diff --git a/clang/test/Modules/cxx-templates.cpp b/clang/test/Modules/cxx-templates.cpp index b7d5741e69af..5bb3ca338051 100644 --- a/clang/test/Modules/cxx-templates.cpp +++ b/clang/test/Modules/cxx-templates.cpp @@ -251,7 +251,7 @@ namespace Std { // CHECK-DUMP: ClassTemplateDecl {{.*}} <{{.*[/\\]}}cxx-templates-common.h:1:1, {{.*}}> col:{{.*}} in cxx_templates_common SomeTemplate // CHECK-DUMP: ClassTemplateSpecializationDecl {{.*}} prev {{.*}} SomeTemplate -// CHECK-DUMP-NEXT: TemplateArgument type 'char[2]' +// CHECK-DUMP-NEXT: TemplateArgument type 'char [2]' // CHECK-DUMP: ClassTemplateSpecializationDecl {{.*}} SomeTemplate definition // CHECK-DUMP-NEXT: DefinitionData // CHECK-DUMP-NEXT: DefaultConstructor @@ -260,9 +260,9 @@ namespace Std { // CHECK-DUMP-NEXT: CopyAssignment // CHECK-DUMP-NEXT: MoveAssignment // CHECK-DUMP-NEXT: Destructor -// CHECK-DUMP-NEXT: TemplateArgument type 'char[2]' +// CHECK-DUMP-NEXT: TemplateArgument type 'char [2]' // CHECK-DUMP: ClassTemplateSpecializationDecl {{.*}} prev {{.*}} SomeTemplate -// CHECK-DUMP-NEXT: TemplateArgument type 'char[1]' +// CHECK-DUMP-NEXT: TemplateArgument type 'char [1]' // CHECK-DUMP: ClassTemplateSpecializationDecl {{.*}} SomeTemplate definition // CHECK-DUMP-NEXT: DefinitionData // CHECK-DUMP-NEXT: DefaultConstructor @@ -271,4 +271,4 @@ namespace Std { // CHECK-DUMP-NEXT: CopyAssignment // CHECK-DUMP-NEXT: MoveAssignment // CHECK-DUMP-NEXT: Destructor -// CHECK-DUMP-NEXT: TemplateArgument type 'char[1]' +// CHECK-DUMP-NEXT: TemplateArgument type 'char [1]' diff --git a/clang/test/Modules/odr_hash.cpp b/clang/test/Modules/odr_hash.cpp index e2ff4348f04b..6d26b3cfb570 100644 --- a/clang/test/Modules/odr_hash.cpp +++ b/clang/test/Modules/odr_hash.cpp @@ -625,8 +625,8 @@ struct S14 { }; #else S14 s14; -// expected-error@second.h:* {{'Method::S14' has different definitions in different modules; first difference is definition in module 'SecondModule' found method 'A' with 1st parameter of type 'int *' decayed from 'int[3]'}} -// expected-note@first.h:* {{but in 'FirstModule' found method 'A' with 1st parameter of type 'int *' decayed from 'int[2]'}} +// expected-error@second.h:* {{'Method::S14' has different definitions in different modules; first difference is definition in module 'SecondModule' found method 'A' with 1st parameter of type 'int *' decayed from 'int [3]'}} +// expected-note@first.h:* {{but in 'FirstModule' found method 'A' with 1st parameter of type 'int *' decayed from 'int [2]'}} #endif #if defined(FIRST) @@ -4533,8 +4533,8 @@ int F9(int[1]) { return 0; } int F9(int[2]) { return 0; } #else int I9 = F9(nullptr); -// expected-error@second.h:* {{'FunctionDecl::F9' has different definitions in different modules; definition in module 'SecondModule' first difference is 1st parameter with type 'int *' decayed from 'int[2]'}} -// expected-note@first.h:* {{but in 'FirstModule' found 1st parameter with type 'int *' decayed from 'int[1]'}} +// expected-error@second.h:* {{'FunctionDecl::F9' has different definitions in different modules; definition in module 'SecondModule' first difference is 1st parameter with type 'int *' decayed from 'int [2]'}} +// expected-note@first.h:* {{but in 'FirstModule' found 1st parameter with type 'int *' decayed from 'int [1]'}} #endif #if defined(FIRST) diff --git a/clang/test/OpenMP/distribute_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_firstprivate_messages.cpp index 30fa8be519ef..1eb629512e6d 100644 --- a/clang/test/OpenMP/distribute_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_firstprivate_messages.cpp @@ -103,11 +103,11 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams - #pragma omp distribute firstprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}} + #pragma omp distribute firstprivate(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams - #pragma omp distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}} + #pragma omp distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp index 84d6337be34b..16584a005f24 100644 --- a/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp @@ -256,12 +256,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for firstprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute parallel for firstprivate(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for firstprivate(ca) // expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute parallel for firstprivate(ca) // expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp index f403922e14e8..6001e2715523 100644 --- a/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp @@ -243,12 +243,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for lastprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute parallel for lastprivate(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute parallel for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp index 645da9b7f0fe..800e33897226 100644 --- a/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp @@ -374,12 +374,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp index 7c83e4c674c6..455eb7d053bf 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp @@ -131,14 +131,14 @@ T tmain(T argc, S **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd shared(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute parallel for simd shared(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for(int k = 0 ; k < n ; k++) { acc++; } #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd shared(ca) // expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute parallel for simd shared(ca) // expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for(int k = 0 ; k < n ; k++) { acc++; } @@ -305,14 +305,14 @@ int main(int argc, char **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd shared(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute parallel for simd shared(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for(int k = 0 ; k < n ; k++) { acc++; } #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd shared(ca) // expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute parallel for simd shared(ca) // expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for(int k = 0 ; k < n ; k++) { acc++; } diff --git a/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp b/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp index 43057fe5bacc..7ec5cf2f2774 100644 --- a/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp @@ -248,12 +248,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd firstprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute simd firstprivate(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd firstprivate(ca) // expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute simd firstprivate(ca) // expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp b/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp index 7658288242ab..6033f6b0f4b4 100644 --- a/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp @@ -244,12 +244,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd lastprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute simd lastprivate(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_simd_reduction_messages.cpp b/clang/test/OpenMP/distribute_simd_reduction_messages.cpp index 841103d7a6b7..3ac2227625be 100644 --- a/clang/test/OpenMP/distribute_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_reduction_messages.cpp @@ -379,12 +379,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/parallel_reduction_messages.c b/clang/test/OpenMP/parallel_reduction_messages.c index fda8200f4b8d..eef9a7d7d133 100644 --- a/clang/test/OpenMP/parallel_reduction_messages.c +++ b/clang/test/OpenMP/parallel_reduction_messages.c @@ -16,7 +16,7 @@ void test(int *p) { ; #pragma omp parallel reduction(inscan, + : a) // expected-error {{'inscan' modifier can be used only in 'omp for', 'omp simd', 'omp for simd', 'omp parallel for', or 'omp parallel for simd' directive}} ; -#pragma omp parallel reduction(+ : incomplete, ([10])p) // expected-error {{a reduction list item with incomplete type 'int[]'}} expected-error {{expected variable name, array element or array section}} +#pragma omp parallel reduction(+ : incomplete, ([10])p) // expected-error {{a reduction list item with incomplete type 'int []'}} expected-error {{expected variable name, array element or array section}} ; } diff --git a/clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp index fccf5515998d..cbb35568e22f 100644 --- a/clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp @@ -119,7 +119,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}} +#pragma omp teams distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute firstprivate(da, z) diff --git a/clang/test/PCH/objc_exprs.m b/clang/test/PCH/objc_exprs.m index b503f419c7a3..1f971e794133 100644 --- a/clang/test/PCH/objc_exprs.m +++ b/clang/test/PCH/objc_exprs.m @@ -9,7 +9,7 @@ int *A1 = (objc_string)0; // expected-warning {{aka 'NSString *'}} char A2 = (objc_encode){}; // expected-error {{not a compile-time constant}} \ - expected-warning {{char[2]}} + expected-warning {{char [2]}} int *A3 = (objc_protocol)0; // expected-warning {{aka 'Protocol *'}} diff --git a/clang/test/Parser/atomic.c b/clang/test/Parser/atomic.c index e8214966c334..928a43b33031 100644 --- a/clang/test/Parser/atomic.c +++ b/clang/test/Parser/atomic.c @@ -29,7 +29,7 @@ typedef int int_fn(); typedef _Atomic int_fn atomic_int_fn; // expected-error {{_Atomic cannot be applied to function type 'int_fn' (aka 'int ()')}} \ // ext-warning {{'_Atomic' is a C11 extension}} typedef _Atomic int atomic_int_array[3]; // ext-warning {{'_Atomic' is a C11 extension}} -typedef _Atomic atomic_int_array atomic_int_atomic_array; // expected-error {{_Atomic cannot be applied to array type 'atomic_int_array' (aka '_Atomic(int)[3]')}} \ +typedef _Atomic atomic_int_array atomic_int_atomic_array; // expected-error {{_Atomic cannot be applied to array type 'atomic_int_array' (aka '_Atomic(int) [3]')}} \ // ext-warning {{'_Atomic' is a C11 extension}} _Atomic struct S { int n; }; // expected-warning {{'_Atomic' ignored on this declaration}} \ diff --git a/clang/test/Sema/array-constraint.c b/clang/test/Sema/array-constraint.c index b7e46fda7c56..bee33c09efbd 100644 --- a/clang/test/Sema/array-constraint.c +++ b/clang/test/Sema/array-constraint.c @@ -46,7 +46,7 @@ typedef int TA[I]; // expected-error {{variable length array declaration not all void strFunc(char *); // expected-note{{passing argument to parameter here}} const char staticAry[] = "test"; void checkStaticAry() { - strFunc(staticAry); // expected-warning{{passing 'const char[5]' to parameter of type 'char *' discards qualifiers}} + strFunc(staticAry); // expected-warning{{passing 'const char [5]' to parameter of type 'char *' discards qualifiers}} } diff --git a/clang/test/Sema/array-init.c b/clang/test/Sema/array-init.c index 5ce5075dc972..15edcb0a8656 100644 --- a/clang/test/Sema/array-init.c +++ b/clang/test/Sema/array-init.c @@ -11,7 +11,7 @@ int ary2[] = { x, y, z }; // expected-error{{initializer element is not a compil extern int fileScopeExtern[3] = { 1, 3, 5 }; // expected-warning{{'extern' variable has an initializer}} -static long ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char[4]'}} +static long ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char [4]'}} void func() { int x = 1; @@ -51,7 +51,7 @@ void func() { extern int blockScopeExtern[3] = { 1, 3, 5 }; // expected-error{{'extern' variable cannot have an initializer}} static long x2[3] = { 1.0, - "abc", // expected-warning{{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char[4]'}} + "abc", // expected-warning{{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char [4]'}} 5.8 }; // expected-warning {{implicit conversion from 'double' to 'long' changes value from 5.8 to 5}} } @@ -114,12 +114,12 @@ int legal2() { } void illegal() { - short q2[4][][2] = { // expected-error{{array has incomplete element type 'short[][2]'}} + short q2[4][][2] = { // expected-error{{array has incomplete element type 'short [][2]'}} { 1, 0, 0, 0, 0, 0 }, { 2, 3, 0, 0, 0, 0 }, { 4, 5, 6 } }; - short q3[4][3][] = { // expected-error{{array has incomplete element type 'short[]'}} + short q3[4][3][] = { // expected-error{{array has incomplete element type 'short []'}} { { 1 }, }, @@ -131,7 +131,7 @@ void illegal() { { 6 }, }, }; - int a[][] = { 1, 2 }; // expected-error{{array has incomplete element type 'int[]'}} + int a[][] = { 1, 2 }; // expected-error{{array has incomplete element type 'int []'}} } typedef int AryT[]; @@ -168,10 +168,10 @@ void charArrays() { char c[] = { "Hello" }; int l[sizeof(c) == 6 ? 1 : -1]; - int i[] = { "Hello "}; // expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char[7]'}} + int i[] = { "Hello "}; // expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char [7]'}} char c2[] = { "Hello", "Good bye" }; //expected-warning{{excess elements in char array initializer}} - int i2[1] = { "Hello" }; //expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char[6]'}} + int i2[1] = { "Hello" }; //expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char [6]'}} char c3[5] = { "Hello" }; char c4[4] = { "Hello" }; //expected-warning{{initializer-string for char array is too long}} @@ -204,7 +204,7 @@ void autoStructTest() { struct s1 {char a; char b;} t1; struct s2 {struct s1 c;} t2 = { t1 }; // The following is a less than great diagnostic (though it's on par with EDG). -struct s1 t3[] = {t1, t1, "abc", 0}; //expected-warning{{incompatible pointer to integer conversion initializing 'char' with an expression of type 'char[4]'}} +struct s1 t3[] = {t1, t1, "abc", 0}; //expected-warning{{incompatible pointer to integer conversion initializing 'char' with an expression of type 'char [4]'}} int t4[sizeof t3 == 6 ? 1 : -1]; } struct foo { int z; } w; @@ -282,13 +282,13 @@ char badchararray[1] = { badchararray[0], "asdf" }; // expected-warning {{excess // Test the GNU extension for initializing an array from an array // compound literal. PR9261. typedef int int5[5]; -int a1[5] = (int[]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int[5]' from a compound literal of type 'int[5]' is a GNU extension}} -int a2[5] = (int[5]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int[5]' from a compound literal of type 'int[5]' is a GNU extension}} -int a3[] = ((int[]){1, 2, 3, 4, 5}); // expected-warning{{initialization of an array of type 'int[]' from a compound literal of type 'int[5]' is a GNU extension}} -int a4[] = (int[5]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int[]' from a compound literal of type 'int[5]' is a GNU extension}} -int a5[] = (int5){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int[]' from a compound literal of type 'int5' (aka 'int[5]') is a GNU extension}} +int a1[5] = (int[]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int [5]' from a compound literal of type 'int [5]' is a GNU extension}} +int a2[5] = (int[5]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int [5]' from a compound literal of type 'int [5]' is a GNU extension}} +int a3[] = ((int[]){1, 2, 3, 4, 5}); // expected-warning{{initialization of an array of type 'int []' from a compound literal of type 'int [5]' is a GNU extension}} +int a4[] = (int[5]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int []' from a compound literal of type 'int [5]' is a GNU extension}} +int a5[] = (int5){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int []' from a compound literal of type 'int5' (aka 'int [5]') is a GNU extension}} -int a6[5] = (int[]){1, 2, 3}; // expected-error{{cannot initialize array of type 'int[5]' with array of type 'int[3]'}} +int a6[5] = (int[]){1, 2, 3}; // expected-error{{cannot initialize array of type 'int [5]' with array of type 'int [3]'}} int nonconst_value(); int a7[5] = (int[5]){ 1, diff --git a/clang/test/Sema/assign.c b/clang/test/Sema/assign.c index 3a329432dfbc..d65f9bf26547 100644 --- a/clang/test/Sema/assign.c +++ b/clang/test/Sema/assign.c @@ -13,8 +13,8 @@ typedef int arr[10]; void test3() { const arr b; // expected-note {{variable 'b' declared const here}} const int b2[10]; // expected-note {{variable 'b2' declared const here}} - b[4] = 1; // expected-error {{cannot assign to variable 'b' with const-qualified type 'const arr' (aka 'const int[10]')}} - b2[4] = 1; // expected-error {{cannot assign to variable 'b2' with const-qualified type 'const int[10]'}} + b[4] = 1; // expected-error {{cannot assign to variable 'b' with const-qualified type 'const arr' (aka 'const int [10]')}} + b2[4] = 1; // expected-error {{cannot assign to variable 'b2' with const-qualified type 'const int [10]'}} } typedef struct I { diff --git a/clang/test/Sema/builtin-expect-with-probability-avr.cpp b/clang/test/Sema/builtin-expect-with-probability-avr.cpp index b27ca80fd95a..1767480134a2 100644 --- a/clang/test/Sema/builtin-expect-with-probability-avr.cpp +++ b/clang/test/Sema/builtin-expect-with-probability-avr.cpp @@ -6,7 +6,7 @@ void test(int x, double p) { // expected-note {{declared here}} dummy = __builtin_expect_with_probability(x > 0, 1, 1.1); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}} dummy = __builtin_expect_with_probability(x > 0, 1, -1); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}} dummy = __builtin_expect_with_probability(x > 0, 1, p); // expected-error {{probability argument to __builtin_expect_with_probability must be constant floating-point expression}} expected-note {{function parameter 'p' with unknown value}} - dummy = __builtin_expect_with_probability(x > 0, 1, "aa"); // expected-error {{cannot initialize a parameter of type 'double' with an lvalue of type 'const char[3]'}} + dummy = __builtin_expect_with_probability(x > 0, 1, "aa"); // expected-error {{cannot initialize a parameter of type 'double' with an lvalue of type 'const char [3]'}} dummy = __builtin_expect_with_probability(x > 0, 1, __builtin_nan("")); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}} dummy = __builtin_expect_with_probability(x > 0, 1, __builtin_inf()); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}} dummy = __builtin_expect_with_probability(x > 0, 1, -0.0); diff --git a/clang/test/Sema/builtin-expect-with-probability.cpp b/clang/test/Sema/builtin-expect-with-probability.cpp index 2b72c7b27ae9..e05174f70673 100644 --- a/clang/test/Sema/builtin-expect-with-probability.cpp +++ b/clang/test/Sema/builtin-expect-with-probability.cpp @@ -44,7 +44,7 @@ void test(int x, double p) { // expected-note {{declared here}} dummy = __builtin_expect_with_probability(x > 0, 1, 1.1); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}} dummy = __builtin_expect_with_probability(x > 0, 1, -1); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}} dummy = __builtin_expect_with_probability(x > 0, 1, p); // expected-error {{probability argument to __builtin_expect_with_probability must be constant floating-point expression}} expected-note {{function parameter 'p'}} - dummy = __builtin_expect_with_probability(x > 0, 1, "aa"); // expected-error {{cannot initialize a parameter of type 'double' with an lvalue of type 'const char[3]'}} + dummy = __builtin_expect_with_probability(x > 0, 1, "aa"); // expected-error {{cannot initialize a parameter of type 'double' with an lvalue of type 'const char [3]'}} dummy = __builtin_expect_with_probability(x > 0, 1, __builtin_nan("")); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}} dummy = __builtin_expect_with_probability(x > 0, 1, __builtin_inf()); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}} dummy = __builtin_expect_with_probability(x > 0, 1, -0.0); diff --git a/clang/test/Sema/c11-typedef-redef.c b/clang/test/Sema/c11-typedef-redef.c index 77e28d248338..b899f15ce638 100644 --- a/clang/test/Sema/c11-typedef-redef.c +++ b/clang/test/Sema/c11-typedef-redef.c @@ -10,9 +10,9 @@ void f(int N) { typedef int type2; typedef int vla[N]; // expected-note{{previous definition is here}} - typedef int vla[N]; // expected-error{{redefinition of typedef for variably-modified type 'int[N]'}} + typedef int vla[N]; // expected-error{{redefinition of typedef for variably-modified type 'int [N]'}} typedef int vla2[N]; typedef vla2 vla3; // expected-note{{previous definition is here}} - typedef vla2 vla3; // expected-error{{redefinition of typedef for variably-modified type 'vla2' (aka 'int[N]')}} + typedef vla2 vla3; // expected-error{{redefinition of typedef for variably-modified type 'vla2' (aka 'int [N]')}} } diff --git a/clang/test/Sema/compound-literal.c b/clang/test/Sema/compound-literal.c index ed18157a9276..217dbeda8a7b 100644 --- a/clang/test/Sema/compound-literal.c +++ b/clang/test/Sema/compound-literal.c @@ -11,7 +11,7 @@ static int *p = (int []){2,4}; static int x = (int){1}; static int *p2 = (int []){2,x}; // expected-error {{initializer element is not a compile-time constant}} -static long *p3 = (long []){2,"x"}; // expected-warning {{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char[2]'}} +static long *p3 = (long []){2,"x"}; // expected-warning {{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char [2]'}} typedef struct { } cache_t; // expected-warning{{empty struct is a GNU extension}} static cache_t clo_I1_cache = ((cache_t) { } ); // expected-warning{{use of GNU empty initializer extension}} diff --git a/clang/test/Sema/crash-invalid-array.c b/clang/test/Sema/crash-invalid-array.c index 18fbd1c84dbc..029413b9843f 100644 --- a/clang/test/Sema/crash-invalid-array.c +++ b/clang/test/Sema/crash-invalid-array.c @@ -10,7 +10,7 @@ int main() for(i = 0; i < 10; ++i) { - p[i][i] = i; // expected-error {{subscript of pointer to incomplete type 'int[]'}} + p[i][i] = i; // expected-error {{subscript of pointer to incomplete type 'int []'}} } } diff --git a/clang/test/Sema/empty1.c b/clang/test/Sema/empty1.c index 39a46a7b7cd5..9a2fb678de66 100644 --- a/clang/test/Sema/empty1.c +++ b/clang/test/Sema/empty1.c @@ -75,13 +75,13 @@ int func_7(struct A *x, struct A *y) { } int func_8(struct emp_1 (*x)[10], struct emp_1 (*y)[10]) { - return x - y; // expected-warning {{subtraction of pointers to type 'struct emp_1[10]' of zero size has undefined behavior}} + return x - y; // expected-warning {{subtraction of pointers to type 'struct emp_1 [10]' of zero size has undefined behavior}} } int func_9(struct emp_1 (*x)[], struct emp_1 (*y)[]) { - return x - y; // expected-error {{arithmetic on a pointer to an incomplete type 'struct emp_1[]'}} + return x - y; // expected-error {{arithmetic on a pointer to an incomplete type 'struct emp_1 []'}} } int func_10(int (*x)[0], int (*y)[0]) { - return x - y; // expected-warning {{subtraction of pointers to type 'int[0]' of zero size has undefined behavior}} + return x - y; // expected-warning {{subtraction of pointers to type 'int [0]' of zero size has undefined behavior}} } diff --git a/clang/test/Sema/extern-redecl.c b/clang/test/Sema/extern-redecl.c index bccf7ba38a6d..6bdb66e07f55 100644 --- a/clang/test/Sema/extern-redecl.c +++ b/clang/test/Sema/extern-redecl.c @@ -26,12 +26,12 @@ extern int test1_a[]; // rdar://13535367 void test2declarer() { extern int test2_array[100]; } extern int test2_array[]; -int test2v = sizeof(test2_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} +int test2v = sizeof(test2_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} void test3declarer() { { extern int test3_array[100]; } extern int test3_array[]; - int x = sizeof(test3_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int x = sizeof(test3_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } void test4() { @@ -40,7 +40,7 @@ void test4() { extern int test4_array[100]; int x = sizeof(test4_array); // fine } - int x = sizeof(test4_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + int x = sizeof(test4_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } // Test that invalid local extern declarations of library diff --git a/clang/test/Sema/generic-selection.c b/clang/test/Sema/generic-selection.c index 36cfce4a950a..f083dff8ac8b 100644 --- a/clang/test/Sema/generic-selection.c +++ b/clang/test/Sema/generic-selection.c @@ -7,7 +7,7 @@ void foo(int n) { (void) _Generic(0, // ext-warning {{'_Generic' is a C11 extension}} struct A: 0, // expected-error {{type 'struct A' in generic association incomplete}} void(): 0, // expected-error {{type 'void ()' in generic association not an object type}} - int[n]: 0); // expected-error {{type 'int[n]' in generic association is a variably modified type}} + int[n]: 0); // expected-error {{type 'int [n]' in generic association is a variably modified type}} (void) _Generic(0, // ext-warning {{'_Generic' is a C11 extension}} void (*)(): 0, // expected-note {{compatible type 'void (*)()' specified here}} diff --git a/clang/test/Sema/gnu-flags.c b/clang/test/Sema/gnu-flags.c index 163ed50a38a4..e53e5fdf11df 100644 --- a/clang/test/Sema/gnu-flags.c +++ b/clang/test/Sema/gnu-flags.c @@ -97,7 +97,7 @@ void statementexp() #if ALL || COMPOUNDLITERALINITIALIZER -// expected-warning@+4 {{initialization of an array of type 'int[5]' from a compound literal of type 'int[5]' is a GNU extension}} +// expected-warning@+4 {{initialization of an array of type 'int [5]' from a compound literal of type 'int [5]' is a GNU extension}} #endif typedef int int5[5]; diff --git a/clang/test/Sema/incomplete-decl.c b/clang/test/Sema/incomplete-decl.c index 08f86f683b83..0214a0c6ce4c 100644 --- a/clang/test/Sema/incomplete-decl.c +++ b/clang/test/Sema/incomplete-decl.c @@ -22,7 +22,7 @@ void func() { } int h[]; // expected-warning {{tentative array definition assumed to have one element}} -int (*i)[] = &h+1; // expected-error {{arithmetic on a pointer to an incomplete type 'int[]'}} +int (*i)[] = &h+1; // expected-error {{arithmetic on a pointer to an incomplete type 'int []'}} struct bar j = {1}; // expected-error {{variable has incomplete type 'struct bar'}} \ expected-note {{forward declaration of 'struct bar'}} diff --git a/clang/test/Sema/matrix-type-builtins.c b/clang/test/Sema/matrix-type-builtins.c index c58384613e79..2f7e4549e495 100644 --- a/clang/test/Sema/matrix-type-builtins.c +++ b/clang/test/Sema/matrix-type-builtins.c @@ -57,13 +57,13 @@ void column_major_load(float *p1, int *p2, _Bool *p3, struct Foo *p4) { 10, // expected-error {{1st argument must be a pointer to a valid matrix element type}} 1ull << 21, // expected-error {{row dimension is outside the allowed range [1, 1048575]}} 1ull << 21, // expected-error {{column dimension is outside the allowed range [1, 1048575]}} - ""); // expected-warning {{incompatible pointer to integer conversion casting 'char[1]' to type 'unsigned long'}} + ""); // expected-warning {{incompatible pointer to integer conversion casting 'char [1]' to type 'unsigned long'}} sx5x10_t a13 = __builtin_matrix_column_major_load( 10, // expected-error {{1st argument must be a pointer to a valid matrix element type}} *p4, // expected-error {{casting 'struct Foo' to incompatible type 'unsigned long'}} "", // expected-error {{column argument must be a constant unsigned integer expression}} - // expected-warning@-1 {{incompatible pointer to integer conversion casting 'char[1]' to type 'unsigned long'}} + // expected-warning@-1 {{incompatible pointer to integer conversion casting 'char [1]' to type 'unsigned long'}} 10); } diff --git a/clang/test/Sema/merge-decls.c b/clang/test/Sema/merge-decls.c index 3b27c04a3e25..29707d259b96 100644 --- a/clang/test/Sema/merge-decls.c +++ b/clang/test/Sema/merge-decls.c @@ -73,7 +73,7 @@ void test4_f(a) int test5_f(int (*)[10]); int test5_f(int (*x)[]) { - return sizeof(*x); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}} + return sizeof(*x); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } void test6_f(int (*a)[11]); diff --git a/clang/test/Sema/nullability.c b/clang/test/Sema/nullability.c index d462886de043..a5cb4b9a031e 100644 --- a/clang/test/Sema/nullability.c +++ b/clang/test/Sema/nullability.c @@ -213,25 +213,25 @@ void testDecayedType() { int produceAnErrorMessage = arrays; // expected-warning {{incompatible pointer to integer conversion initializing 'int' with an expression of type 'void (int * _Nonnull, void ** _Nullable, void *** _Nullable, void * _Null_unspecified * _Nonnull * _Nullable, int * _Nonnull, int * _Nonnull, int * _Nonnull, int * _Nonnull, int * _Nonnull, void ** _Nullable)'}} } -int notInFunction[_Nullable 3]; // expected-error {{nullability specifier '_Nullable' cannot be applied to non-pointer type 'int[3]'}} +int notInFunction[_Nullable 3]; // expected-error {{nullability specifier '_Nullable' cannot be applied to non-pointer type 'int [3]'}} -void nestedArrays(int x[5][_Nonnull 1]) {} // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int[1]'}} -void nestedArrays2(int x[5][_Nonnull 1][2]) {} // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int[1][2]'}} +void nestedArrays(int x[5][_Nonnull 1]) {} // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int [1]'}} +void nestedArrays2(int x[5][_Nonnull 1][2]) {} // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int [1][2]'}} void nestedArraysOK(int x[_Nonnull 5][1]) {} // ok void nullabilityOnBase(_Nonnull int x[1], // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int'}} int _Nonnull y[1]); // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int'}} typedef int INTS[4]; -typedef int BAD_INTS[_Nonnull 4]; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int[4]'}} +typedef int BAD_INTS[_Nonnull 4]; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int [4]'}} void typedefTest(INTS _Nonnull x, _Nonnull INTS xx, - INTS _Nonnull y[2], // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int[4]')}} + INTS _Nonnull y[2], // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int [4]')}} INTS z[_Nonnull 2]); -INTS _Nonnull x; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int[4]')}} -_Nonnull INTS x; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int[4]')}} +INTS _Nonnull x; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int [4]')}} +_Nonnull INTS x; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int [4]')}} void arraysInBlocks() { typedef int INTS[4]; @@ -239,11 +239,11 @@ void arraysInBlocks() { simple(0); // expected-warning {{null passed to a callee that requires a non-null argument}} void (^nested)(void *_Nullable x[_Nonnull 2]) = ^(void *_Nullable x[_Nonnull 2]) {}; nested(0); // expected-warning {{null passed to a callee that requires a non-null argument}} - void (^nestedBad)(int x[2][_Nonnull 2]) = // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int[2]'}} - ^(int x[2][_Nonnull 2]) {}; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int[2]'}} + void (^nestedBad)(int x[2][_Nonnull 2]) = // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int [2]'}} + ^(int x[2][_Nonnull 2]) {}; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int [2]'}} void (^withTypedef)(INTS _Nonnull) = ^(INTS _Nonnull x) {}; withTypedef(0); // expected-warning {{null passed to a callee that requires a non-null argument}} - void (^withTypedefBad)(INTS _Nonnull [2]) = // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int[4]')}} - ^(INTS _Nonnull x[2]) {}; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int[4]')}} + void (^withTypedefBad)(INTS _Nonnull [2]) = // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int [4]')}} + ^(INTS _Nonnull x[2]) {}; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int [4]')}} } diff --git a/clang/test/Sema/predef.c b/clang/test/Sema/predef.c index 6db683eb66e1..95bcfb9d8d51 100644 --- a/clang/test/Sema/predef.c +++ b/clang/test/Sema/predef.c @@ -6,7 +6,7 @@ void abcdefghi12(void) { } char *X = __func__; // expected-warning {{predefined identifier is only valid}} \ - expected-warning {{initializing 'char *' with an expression of type 'const char[1]' discards qualifiers}} + expected-warning {{initializing 'char *' with an expression of type 'const char [1]' discards qualifiers}} void a() { __func__[0] = 'a'; // expected-error {{variable is not assignable}} diff --git a/clang/test/Sema/typedef-retain.c b/clang/test/Sema/typedef-retain.c index cbec109456a7..d4358bce5ee5 100644 --- a/clang/test/Sema/typedef-retain.c +++ b/clang/test/Sema/typedef-retain.c @@ -17,7 +17,7 @@ typedef int a[5]; void test3() { typedef const a b; b r; // expected-note {{variable 'r' declared const here}} - r[0] = 10; // expected-error {{cannot assign to variable 'r' with const-qualified type 'b' (aka 'const int[5]')}} + r[0] = 10; // expected-error {{cannot assign to variable 'r' with const-qualified type 'b' (aka 'const int [5]')}} } int test4(const a y) { diff --git a/clang/test/Sema/types.c b/clang/test/Sema/types.c index c78f8de9e9e6..177e5fbd9704 100644 --- a/clang/test/Sema/types.c +++ b/clang/test/Sema/types.c @@ -47,7 +47,7 @@ int i[(short)1]; enum e { e_1 }; extern int j[sizeof(enum e)]; // expected-note {{previous declaration}} -int j[42]; // expected-error {{redefinition of 'j' with a different type: 'int[42]' vs 'int[4]'}} +int j[42]; // expected-error {{redefinition of 'j' with a different type: 'int [42]' vs 'int [4]'}} // rdar://6880104 _Decimal32 x; // expected-error {{GNU decimal type extension not supported}} diff --git a/clang/test/Sema/var-redecl.c b/clang/test/Sema/var-redecl.c index 1c254f504f56..024bfd436a42 100644 --- a/clang/test/Sema/var-redecl.c +++ b/clang/test/Sema/var-redecl.c @@ -67,4 +67,4 @@ void f(int x) { // expected-note {{previous definition is here}} extern int b[]; void g20() { extern int b[3]; } // expected-note{{previous declaration is here}} -void g21() { extern int b[4]; } // expected-error{{redeclaration of 'b' with a different type: 'int[4]' vs 'int[3]'}} +void g21() { extern int b[4]; } // expected-error{{redeclaration of 'b' with a different type: 'int [4]' vs 'int [3]'}} diff --git a/clang/test/Sema/vla.cpp b/clang/test/Sema/vla.cpp index f7d2669fb499..b4416a07cf0e 100644 --- a/clang/test/Sema/vla.cpp +++ b/clang/test/Sema/vla.cpp @@ -2,5 +2,5 @@ void f1(int n) { typedef int x[n]; - const x y; // expected-error {{default initialization of an object of const type 'const x' (aka 'const int[n]')}} + const x y; // expected-error {{default initialization of an object of const type 'const x' (aka 'const int [n]')}} } diff --git a/clang/test/Sema/warn-sizeof-array-decay.c b/clang/test/Sema/warn-sizeof-array-decay.c index 1bf33e20ecad..cc3ee1d0fc65 100644 --- a/clang/test/Sema/warn-sizeof-array-decay.c +++ b/clang/test/Sema/warn-sizeof-array-decay.c @@ -5,14 +5,14 @@ void f(int x) { int bar[20]; char qux[30]; - (void)sizeof(bar + 10); // expected-warning{{sizeof on pointer operation will return size of 'int *' instead of 'int[20]'}} - (void)sizeof(foo - 20); // expected-warning{{sizeof on pointer operation will return size of 'char *' instead of 'char[10]'}} - (void)sizeof(bar - x); // expected-warning{{sizeof on pointer operation will return size of 'int *' instead of 'int[20]'}} - (void)sizeof(foo + x); // expected-warning{{sizeof on pointer operation will return size of 'char *' instead of 'char[10]'}} + (void)sizeof(bar + 10); // expected-warning{{sizeof on pointer operation will return size of 'int *' instead of 'int [20]'}} + (void)sizeof(foo - 20); // expected-warning{{sizeof on pointer operation will return size of 'char *' instead of 'char [10]'}} + (void)sizeof(bar - x); // expected-warning{{sizeof on pointer operation will return size of 'int *' instead of 'int [20]'}} + (void)sizeof(foo + x); // expected-warning{{sizeof on pointer operation will return size of 'char *' instead of 'char [10]'}} // This is ptrdiff_t. (void)sizeof(foo - qux); // no-warning (void)sizeof(foo, x); // no-warning - (void)sizeof(x, foo); // expected-warning{{sizeof on pointer operation will return size of 'char *' instead of 'char[10]'}} + (void)sizeof(x, foo); // expected-warning{{sizeof on pointer operation will return size of 'char *' instead of 'char [10]'}} } diff --git a/clang/test/Sema/warn-sizeof-arrayarg.c b/clang/test/Sema/warn-sizeof-arrayarg.c index 7c1a9a282161..32fd2b4d3745 100644 --- a/clang/test/Sema/warn-sizeof-arrayarg.c +++ b/clang/test/Sema/warn-sizeof-arrayarg.c @@ -8,13 +8,13 @@ void f(int a[10], Arr arr) { // expected-note 4 {{declared here}} /* Should warn. */ (void)sizeof(a); // \ - // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'int[10]'}} + // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'int [10]'}} (void)sizeof((((a)))); // \ - // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'int[10]'}} + // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'int [10]'}} (void)sizeof a; // \ - // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'int[10]'}} + // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'int [10]'}} (void)sizeof arr; // \ - // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'Arr' (aka 'int[10]')}} + // expected-warning{{sizeof on array function parameter will return size of 'int *' instead of 'Arr' (aka 'int [10]')}} /* Shouldn't warn. */ int b[10]; diff --git a/clang/test/Sema/warn-write-strings.c b/clang/test/Sema/warn-write-strings.c index d8e31d95df0f..dee554cf6b57 100644 --- a/clang/test/Sema/warn-write-strings.c +++ b/clang/test/Sema/warn-write-strings.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -verify -fsyntax-only -fconst-strings %s // PR4804 -char* x = "foo"; // expected-warning {{initializing 'char *' with an expression of type 'const char[4]' discards qualifiers}} +char* x = "foo"; // expected-warning {{initializing 'char *' with an expression of type 'const char [4]' discards qualifiers}} // PR7192 #include diff --git a/clang/test/SemaCXX/MicrosoftExtensions.cpp b/clang/test/SemaCXX/MicrosoftExtensions.cpp index f1ba8afc221f..5dfadae3682a 100644 --- a/clang/test/SemaCXX/MicrosoftExtensions.cpp +++ b/clang/test/SemaCXX/MicrosoftExtensions.cpp @@ -96,7 +96,7 @@ void test_unaligned() { p3_aligned_type4 = p1_aligned_type4; __unaligned int a[10]; - int *b = a; // expected-error {{cannot initialize a variable of type 'int *' with an lvalue of type '__unaligned int[10]'}} + int *b = a; // expected-error {{cannot initialize a variable of type 'int *' with an lvalue of type '__unaligned int [10]'}} } // Test from PR27367 diff --git a/clang/test/SemaCXX/address-space-initialize.cpp b/clang/test/SemaCXX/address-space-initialize.cpp index bd5ee926f5b6..50913384c5cf 100644 --- a/clang/test/SemaCXX/address-space-initialize.cpp +++ b/clang/test/SemaCXX/address-space-initialize.cpp @@ -17,7 +17,7 @@ int nocv_iarray[10] = { 4 }; __attribute__((address_space(9999))) -int* as_ptr = nocv_iarray; // expected-error{{cannot initialize a variable of type '__attribute__((address_space(9999))) int *' with an lvalue of type '__attribute__((address_space(42))) int[10]'}} +int* as_ptr = nocv_iarray; // expected-error{{cannot initialize a variable of type '__attribute__((address_space(9999))) int *' with an lvalue of type '__attribute__((address_space(42))) int [10]'}} __attribute__((address_space(42))) int* __attribute__((address_space(42))) ptr_in_same_addr_space = nocv_iarray; diff --git a/clang/test/SemaCXX/alias-template.cpp b/clang/test/SemaCXX/alias-template.cpp index 0e5d9dae7bb7..f41c3aa8bca6 100644 --- a/clang/test/SemaCXX/alias-template.cpp +++ b/clang/test/SemaCXX/alias-template.cpp @@ -37,7 +37,7 @@ namespace VariableLengthArrays { const int m = 42; template using U = int[m]; template using U = int[42]; // expected-note {{previous definition}} - template using U = int; // expected-error {{type alias template redefinition with different types ('int' vs 'int[42]')}} + template using U = int; // expected-error {{type alias template redefinition with different types ('int' vs 'int [42]')}} } namespace RedeclFunc { diff --git a/clang/test/SemaCXX/array-bound-merge.cpp b/clang/test/SemaCXX/array-bound-merge.cpp index 02d1916f6ee7..a360d007c3b7 100644 --- a/clang/test/SemaCXX/array-bound-merge.cpp +++ b/clang/test/SemaCXX/array-bound-merge.cpp @@ -8,7 +8,7 @@ int b[]; extern int c[1]; int c[] = {1,2}; // expected-error {{excess elements in array initializer}} -int d[1][]; // expected-error {{array has incomplete element type 'int[]'}} +int d[1][]; // expected-error {{array has incomplete element type 'int []'}} extern const int e[2]; // expected-note {{previous declaration is here}} -int e[] = { 1 }; // expected-error {{redefinition of 'e' with a different type: 'int[]' vs 'const int[2]'}} +int e[] = { 1 }; // expected-error {{redefinition of 'e' with a different type: 'int []' vs 'const int [2]'}} diff --git a/clang/test/SemaCXX/attr-gnu.cpp b/clang/test/SemaCXX/attr-gnu.cpp index c257c2b02912..83e58bbcd5e2 100644 --- a/clang/test/SemaCXX/attr-gnu.cpp +++ b/clang/test/SemaCXX/attr-gnu.cpp @@ -13,10 +13,10 @@ void f() { void g(int a[static [[]] 5]); // expected-error {{static array size is a C99 feature, not permitted in C++}} template struct A { - int x[sizeof(T)] __attribute((vector_size(8))); // expected-error {{invalid vector element type 'int[sizeof(T)]'}} + int x[sizeof(T)] __attribute((vector_size(8))); // expected-error {{invalid vector element type 'int [sizeof(T)]'}} }; -typedef int myvect[4] __attribute__((vector_size(16))); // expected-error {{invalid vector element type 'int[4]'}} +typedef int myvect[4] __attribute__((vector_size(16))); // expected-error {{invalid vector element type 'int [4]'}} void foo(myvect *in, myvect *out) { (*out)[0] = (*in)[0]; } namespace { diff --git a/clang/test/SemaCXX/c99-variable-length-array-cxx11.cpp b/clang/test/SemaCXX/c99-variable-length-array-cxx11.cpp index 15757f52af8b..1360a20bfe8c 100644 --- a/clang/test/SemaCXX/c99-variable-length-array-cxx11.cpp +++ b/clang/test/SemaCXX/c99-variable-length-array-cxx11.cpp @@ -22,7 +22,7 @@ void vla(int N) { // expected-note 5{{here}} POD array2[N]; // expected-warning{{variable length arrays are a C99 feature}} expected-note {{parameter 'N'}} StillPOD array3[N]; // expected-warning{{variable length arrays are a C99 feature}} expected-note {{parameter 'N'}} StillPOD2 array4[N][3]; // expected-warning{{variable length arrays are a C99 feature}} expected-note {{parameter 'N'}} - NonPOD array5[N]; // expected-error{{no matching constructor for initialization of 'NonPOD[N]'}} + NonPOD array5[N]; // expected-error{{no matching constructor for initialization of 'NonPOD [N]'}} // expected-warning@-1{{variable length arrays are a C99 feature}} expected-note@-1 {{parameter 'N'}} // expected-note@-16{{candidate constructor not viable}} // expected-note@-18{{candidate constructor (the implicit copy constructor) not viable}} diff --git a/clang/test/SemaCXX/c99-variable-length-array.cpp b/clang/test/SemaCXX/c99-variable-length-array.cpp index 726187ed0763..5f6337e1db06 100644 --- a/clang/test/SemaCXX/c99-variable-length-array.cpp +++ b/clang/test/SemaCXX/c99-variable-length-array.cpp @@ -52,7 +52,7 @@ template struct X0 { }; // argument. void inst_with_vla(int N) { int array[N]; // expected-warning{{variable length arrays are a C99 feature}} - X0<__typeof__(array)> x0a; // expected-error{{variably modified type 'typeof (array)' (aka 'int[N]') cannot be used as a template argument}} + X0<__typeof__(array)> x0a; // expected-error{{variably modified type 'typeof (array)' (aka 'int [N]') cannot be used as a template argument}} } template @@ -70,7 +70,7 @@ X1 x1b; // expected-note{{in instantiation of}} // Template argument deduction does not allow deducing a size from a VLA. // FIXME: This diagnostic should make it clear that the two 'N's are different entities! template -void accept_array(T (&array)[N]); // expected-note{{candidate template ignored: could not match 'T[N]' against 'int[N]'}} +void accept_array(T (&array)[N]); // expected-note{{candidate template ignored: could not match 'T [N]' against 'int [N]'}} void test_accept_array(int N) { int array[N]; // expected-warning{{variable length arrays are a C99 feature}} diff --git a/clang/test/SemaCXX/compare-cxx2a.cpp b/clang/test/SemaCXX/compare-cxx2a.cpp index 61b8558ccc02..fdeb93153715 100644 --- a/clang/test/SemaCXX/compare-cxx2a.cpp +++ b/clang/test/SemaCXX/compare-cxx2a.cpp @@ -351,7 +351,7 @@ void test_array_conv() { int arr[5]; int *ap = arr + 2; int arr2[3]; - (void)(arr <=> arr); // expected-error {{invalid operands to binary expression ('int[5]' and 'int[5]')}} + (void)(arr <=> arr); // expected-error {{invalid operands to binary expression ('int [5]' and 'int [5]')}} (void)(+arr <=> arr); } diff --git a/clang/test/SemaCXX/constant-expression-cxx11.cpp b/clang/test/SemaCXX/constant-expression-cxx11.cpp index c338214b8231..8d7e460c4b1a 100644 --- a/clang/test/SemaCXX/constant-expression-cxx11.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx11.cpp @@ -2065,11 +2065,11 @@ namespace ZeroSizeTypes { constexpr int (*p1)[0] = 0, (*p2)[0] = 0; constexpr int k = p2 - p1; // expected-error@-1 {{constexpr variable 'k' must be initialized by a constant expression}} - // expected-note@-2 {{subtraction of pointers to type 'int[0]' of zero size}} + // expected-note@-2 {{subtraction of pointers to type 'int [0]' of zero size}} int arr[5][0]; constexpr int f() { // expected-error {{never produces a constant expression}} - return &arr[3] - &arr[0]; // expected-note {{subtraction of pointers to type 'int[0]' of zero size}} + return &arr[3] - &arr[0]; // expected-note {{subtraction of pointers to type 'int [0]' of zero size}} } } diff --git a/clang/test/SemaCXX/constant-expression-cxx2a.cpp b/clang/test/SemaCXX/constant-expression-cxx2a.cpp index 88c20c8d1bc6..caba03347669 100644 --- a/clang/test/SemaCXX/constant-expression-cxx2a.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx2a.cpp @@ -816,15 +816,15 @@ namespace dynamic_alloc { S *p = new T[3]{&a, &a, &a}; // expected-note 2{{heap allocation}} switch (mode) { case 0: - delete p; // expected-note {{non-array delete used to delete pointer to array object of type 'T[3]'}} + delete p; // expected-note {{non-array delete used to delete pointer to array object of type 'T [3]'}} break; case 1: // FIXME: This diagnosic isn't great; we should mention the cast to S* // somewhere in here. - delete[] p; // expected-note {{delete of pointer to subobject '&{*new T[3]#0}[0]'}} + delete[] p; // expected-note {{delete of pointer to subobject '&{*new T [3]#0}[0]'}} break; case 2: - delete (T*)p; // expected-note {{non-array delete used to delete pointer to array object of type 'T[3]'}} + delete (T*)p; // expected-note {{non-array delete used to delete pointer to array object of type 'T [3]'}} break; case 3: delete[] (T*)p; @@ -1033,7 +1033,7 @@ namespace delete_random_things { struct A { int n; }; static_assert((delete &(new A)->n, true)); // expected-error {{}} expected-note {{delete of pointer to subobject '&{*new delete_random_things::A#0}.n'}} static_assert((delete (new int + 1), true)); // expected-error {{}} expected-note {{delete of pointer '&{*new int#0} + 1' that does not point to complete object}} - static_assert((delete[] (new int[3] + 1), true)); // expected-error {{}} expected-note {{delete of pointer to subobject '&{*new int[3]#0}[1]'}} + static_assert((delete[] (new int[3] + 1), true)); // expected-error {{}} expected-note {{delete of pointer to subobject '&{*new int [3]#0}[1]'}} static_assert((delete &(int&)(int&&)0, true)); // expected-error {{}} expected-note {{delete of pointer '&0' that does not point to a heap-allocated object}} expected-note {{temporary created here}} } diff --git a/clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp b/clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp index cb1812905d3d..5b5d1cb7bc80 100644 --- a/clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp +++ b/clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp @@ -204,7 +204,7 @@ void backtrace() { }; struct B { - // expected-note@+1 {{invalid type 'A[10]' is a member of 'B'}} + // expected-note@+1 {{invalid type 'A [10]' is a member of 'B'}} A as[10]; }; diff --git a/clang/test/SemaCXX/constexpr-string.cpp b/clang/test/SemaCXX/constexpr-string.cpp index 401f64945ef5..f33627e812b2 100644 --- a/clang/test/SemaCXX/constexpr-string.cpp +++ b/clang/test/SemaCXX/constexpr-string.cpp @@ -661,7 +661,7 @@ namespace MemcpyEtc { constexpr int test_address_of_incomplete_array_type() { // expected-error {{never produces a constant}} extern int arr[]; __builtin_memmove(&arr, &arr, 4 * sizeof(arr[0])); - // expected-note@-1 2{{cannot constant evaluate 'memmove' between objects of incomplete type 'int[]'}} + // expected-note@-1 2{{cannot constant evaluate 'memmove' between objects of incomplete type 'int []'}} return arr[0] * 1000 + arr[1] * 100 + arr[2] * 10 + arr[3]; } static_assert(test_address_of_incomplete_array_type() == 1234); // expected-error {{constant}} expected-note {{in call}} diff --git a/clang/test/SemaCXX/coroutines.cpp b/clang/test/SemaCXX/coroutines.cpp index 9222066e8793..681af0a7f884 100644 --- a/clang/test/SemaCXX/coroutines.cpp +++ b/clang/test/SemaCXX/coroutines.cpp @@ -189,7 +189,7 @@ void coreturn(int n) { if (n == 1) co_return {4}; // expected-warning {{braces around scalar initializer}} if (n == 2) - co_return "foo"; // expected-error {{cannot initialize a parameter of type 'int' with an lvalue of type 'const char[4]'}} + co_return "foo"; // expected-error {{cannot initialize a parameter of type 'int' with an lvalue of type 'const char [4]'}} co_return 42; } diff --git a/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp b/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp index e25b2cb25ee6..94fee530aea6 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp @@ -127,7 +127,7 @@ namespace multidimensional_array { namespace array_addressof { using T = int[5]; - T *p = &T{1,2,3,4,5}; // expected-error {{taking the address of a temporary object of type 'array_addressof::T' (aka 'int[5]')}} + T *p = &T{1,2,3,4,5}; // expected-error {{taking the address of a temporary object of type 'array_addressof::T' (aka 'int [5]')}} } namespace PR24816 { diff --git a/clang/test/SemaCXX/cxx0x-type-convert-construct.cpp b/clang/test/SemaCXX/cxx0x-type-convert-construct.cpp index a58a82ac2aaf..25a43d7053cc 100644 --- a/clang/test/SemaCXX/cxx0x-type-convert-construct.cpp +++ b/clang/test/SemaCXX/cxx0x-type-convert-construct.cpp @@ -2,20 +2,20 @@ void f() { char *u8str; - u8str = u8"a UTF-8 string"; // expected-error {{assigning to 'char *' from incompatible type 'const char[15]'}} + u8str = u8"a UTF-8 string"; // expected-error {{assigning to 'char *' from incompatible type 'const char [15]'}} char16_t *ustr; - ustr = u"a UTF-16 string"; // expected-error {{assigning to 'char16_t *' from incompatible type 'const char16_t[16]'}} + ustr = u"a UTF-16 string"; // expected-error {{assigning to 'char16_t *' from incompatible type 'const char16_t [16]'}} char32_t *Ustr; - Ustr = U"a UTF-32 string"; // expected-error {{assigning to 'char32_t *' from incompatible type 'const char32_t[16]'}} + Ustr = U"a UTF-32 string"; // expected-error {{assigning to 'char32_t *' from incompatible type 'const char32_t [16]'}} char *Rstr; Rstr = R"foo(a raw string)foo"; // expected-warning{{ISO C++11 does not allow conversion from string literal to 'char *'}} wchar_t *LRstr; LRstr = LR"foo(a wide raw string)foo"; // expected-warning{{ISO C++11 does not allow conversion from string literal to 'wchar_t *'}} char *u8Rstr; - u8Rstr = u8R"foo(a UTF-8 raw string)foo"; // expected-error {{assigning to 'char *' from incompatible type 'const char[19]'}} + u8Rstr = u8R"foo(a UTF-8 raw string)foo"; // expected-error {{assigning to 'char *' from incompatible type 'const char [19]'}} char16_t *uRstr; - uRstr = uR"foo(a UTF-16 raw string)foo"; // expected-error {{assigning to 'char16_t *' from incompatible type 'const char16_t[20]'}} + uRstr = uR"foo(a UTF-16 raw string)foo"; // expected-error {{assigning to 'char16_t *' from incompatible type 'const char16_t [20]'}} char32_t *URstr; - URstr = UR"foo(a UTF-32 raw string)foo"; // expected-error {{assigning to 'char32_t *' from incompatible type 'const char32_t[20]'}} + URstr = UR"foo(a UTF-32 raw string)foo"; // expected-error {{assigning to 'char32_t *' from incompatible type 'const char32_t [20]'}} } diff --git a/clang/test/SemaCXX/cxx1z-decomposition.cpp b/clang/test/SemaCXX/cxx1z-decomposition.cpp index 26fbbadafdcb..1ce75fe48db3 100644 --- a/clang/test/SemaCXX/cxx1z-decomposition.cpp +++ b/clang/test/SemaCXX/cxx1z-decomposition.cpp @@ -10,13 +10,13 @@ void num_elems() { auto [] = a0; // expected-warning {{does not allow a decomposition group to be empty}} auto [v1] = a0; // expected-error {{type 'A0' decomposes into 0 elements, but 1 name was provided}} - auto [] = a1; // expected-error {{type 'int[1]' decomposes into 1 element, but no names were provided}} expected-warning {{empty}} + auto [] = a1; // expected-error {{type 'int [1]' decomposes into 1 element, but no names were provided}} expected-warning {{empty}} auto [v2] = a1; - auto [v3, v4] = a1; // expected-error {{type 'int[1]' decomposes into 1 element, but 2 names were provided}} - auto [] = a2; // expected-error {{type 'int[2]' decomposes into 2 elements, but no names were provided}} expected-warning {{empty}} - auto [v5] = a2; // expected-error {{type 'int[2]' decomposes into 2 elements, but only 1 name was provided}} + auto [v3, v4] = a1; // expected-error {{type 'int [1]' decomposes into 1 element, but 2 names were provided}} + auto [] = a2; // expected-error {{type 'int [2]' decomposes into 2 elements, but no names were provided}} expected-warning {{empty}} + auto [v5] = a2; // expected-error {{type 'int [2]' decomposes into 2 elements, but only 1 name was provided}} auto [v6, v7] = a2; - auto [v8, v9, v10] = a2; // expected-error {{type 'int[2]' decomposes into 2 elements, but 3 names were provided}} + auto [v8, v9, v10] = a2; // expected-error {{type 'int [2]' decomposes into 2 elements, but 3 names were provided}} } // As a Clang extension, _Complex can be decomposed. diff --git a/clang/test/SemaCXX/cxx2a-compat.cpp b/clang/test/SemaCXX/cxx2a-compat.cpp index 0e9eafdc9b70..de9d4442a45e 100644 --- a/clang/test/SemaCXX/cxx2a-compat.cpp +++ b/clang/test/SemaCXX/cxx2a-compat.cpp @@ -34,8 +34,8 @@ string u8str = u8"test" u8"test"; // expected-warning@-4 {{type of UTF-8 string literal will change}} expected-note@-4 {{remove 'u8' prefix}} #else // expected-error@-8 {{ISO C++20 does not permit initialization of char array with UTF-8 string literal}} -// expected-error@-8 {{cannot initialize a variable of type 'const char *' with an lvalue of type 'const char8_t[6]'}} -// expected-error@-8 {{no viable conversion from 'const char8_t[9]' to 'string'}} +// expected-error@-8 {{cannot initialize a variable of type 'const char *' with an lvalue of type 'const char8_t [6]'}} +// expected-error@-8 {{no viable conversion from 'const char8_t [9]' to 'string'}} #endif template diff --git a/clang/test/SemaCXX/dcl_init_aggr.cpp b/clang/test/SemaCXX/dcl_init_aggr.cpp index af04766c0e33..2b5149cf278f 100644 --- a/clang/test/SemaCXX/dcl_init_aggr.cpp +++ b/clang/test/SemaCXX/dcl_init_aggr.cpp @@ -176,4 +176,4 @@ u u1 = { 1 }; u u2 = u1; u u3 = 1; // expected-error{{no viable conversion}} u u4 = { 0, "asdf" }; // expected-error{{excess elements in union initializer}} -u u5 = { "asdf" }; // expected-error{{cannot initialize a member subobject of type 'int' with an lvalue of type 'const char[5]'}} +u u5 = { "asdf" }; // expected-error{{cannot initialize a member subobject of type 'int' with an lvalue of type 'const char [5]'}} diff --git a/clang/test/SemaCXX/decl-init-ref.cpp b/clang/test/SemaCXX/decl-init-ref.cpp index e0ff2daf0792..f515630d3f5e 100644 --- a/clang/test/SemaCXX/decl-init-ref.cpp +++ b/clang/test/SemaCXX/decl-init-ref.cpp @@ -26,10 +26,10 @@ int main() { } struct PR6139 { A (&x)[1]; }; -PR6139 x = {{A()}}; // expected-error{{non-const lvalue reference to type 'A[1]' cannot bind to an initializer list temporary}} +PR6139 x = {{A()}}; // expected-error{{non-const lvalue reference to type 'A [1]' cannot bind to an initializer list temporary}} struct PR6139b { A (&x)[1]; }; -PR6139b y = {A()}; // expected-error{{non-const lvalue reference to type 'A[1]' cannot bind to a temporary of type 'A'}} +PR6139b y = {A()}; // expected-error{{non-const lvalue reference to type 'A [1]' cannot bind to a temporary of type 'A'}} namespace PR16502 { struct A { int &&temporary; int x, y; }; @@ -39,7 +39,7 @@ namespace PR16502 { namespace IncompleteTest { struct String; - // expected-error@+1 {{reference to incomplete type 'const IncompleteTest::String' could not bind to an lvalue of type 'const char[1]'}} + // expected-error@+1 {{reference to incomplete type 'const IncompleteTest::String' could not bind to an lvalue of type 'const char [1]'}} void takeString(const String& = "") {} // expected-note {{passing argument to parameter here}} void test() { takeString(); diff --git a/clang/test/SemaCXX/exceptions.cpp b/clang/test/SemaCXX/exceptions.cpp index 61c3e4bccb2b..1e786adaa1b4 100644 --- a/clang/test/SemaCXX/exceptions.cpp +++ b/clang/test/SemaCXX/exceptions.cpp @@ -157,7 +157,7 @@ namespace Decay { C e; #if __cplusplus <= 199711L - // expected-note@-2 {{in instantiation of template class 'Decay::C' requested here}} + // expected-note@-2 {{in instantiation of template class 'Decay::C' requested here}} #endif } diff --git a/clang/test/SemaCXX/flexible-array-test.cpp b/clang/test/SemaCXX/flexible-array-test.cpp index 19f130288b61..f2105ca36130 100644 --- a/clang/test/SemaCXX/flexible-array-test.cpp +++ b/clang/test/SemaCXX/flexible-array-test.cpp @@ -67,7 +67,7 @@ union B { }; class C { - char c[]; // expected-error {{flexible array member 'c' with type 'char[]' is not at the end of class}} + char c[]; // expected-error {{flexible array member 'c' with type 'char []' is not at the end of class}} int s; // expected-note {{next field declaration is here}} }; @@ -93,7 +93,7 @@ struct NonTrivDtor { ~NonTrivDtor(); }; // FIXME: It's not clear whether we should disallow examples like this. GCC accepts. struct FlexNonTrivDtor { int n; - NonTrivDtor ntd[]; // expected-error {{flexible array member 'ntd' of type 'NonTrivDtor[]' with non-trivial destruction}} + NonTrivDtor ntd[]; // expected-error {{flexible array member 'ntd' of type 'NonTrivDtor []' with non-trivial destruction}} ~FlexNonTrivDtor() { for (int i = n; i != 0; --i) ntd[i-1].~NonTrivDtor(); diff --git a/clang/test/SemaCXX/for-range-examples.cpp b/clang/test/SemaCXX/for-range-examples.cpp index 5376f48ff8e7..5424b7a8ee79 100644 --- a/clang/test/SemaCXX/for-range-examples.cpp +++ b/clang/test/SemaCXX/for-range-examples.cpp @@ -196,7 +196,7 @@ namespace test5 { namespace test6 { void foo(int arr[]) { // expected-note {{declared here}} for (auto i : arr) { } - // expected-error@-1 {{cannot build range expression with array function parameter 'arr' since parameter with array type 'int[]' is treated as pointer type 'int *'}} + // expected-error@-1 {{cannot build range expression with array function parameter 'arr' since parameter with array type 'int []' is treated as pointer type 'int *'}} } struct vector { @@ -207,7 +207,7 @@ namespace test6 { void foo(vector arr[]) { // expected-note {{declared here}} // Don't suggest to dereference arr. for (auto i : arr) { } - // expected-error@-1 {{cannot build range expression with array function parameter 'arr' since parameter with array type 'test6::vector[]' is treated as pointer type 'test6::vector *'}} + // expected-error@-1 {{cannot build range expression with array function parameter 'arr' since parameter with array type 'test6::vector []' is treated as pointer type 'test6::vector *'}} } } diff --git a/clang/test/SemaCXX/new-delete.cpp b/clang/test/SemaCXX/new-delete.cpp index 52dbe00f7e00..b26aba1296eb 100644 --- a/clang/test/SemaCXX/new-delete.cpp +++ b/clang/test/SemaCXX/new-delete.cpp @@ -353,7 +353,7 @@ void h(unsigned i) { (void)new T(i); // expected-error {{array 'new' cannot have initialization arguments}} } template void h(unsigned); -template void h(unsigned); // expected-note {{in instantiation of function template specialization 'Test1::h' requested here}} +template void h(unsigned); // expected-note {{in instantiation of function template specialization 'Test1::h' requested here}} } diff --git a/clang/test/SemaCXX/no-wchar.cpp b/clang/test/SemaCXX/no-wchar.cpp index 93e17f29265b..040b46cdf5e5 100644 --- a/clang/test/SemaCXX/no-wchar.cpp +++ b/clang/test/SemaCXX/no-wchar.cpp @@ -18,9 +18,9 @@ void foo1(wchar_t * t = L""); #endif short *a = L""; -// expected-error@-1 {{cannot initialize a variable of type 'short *' with an lvalue of type 'const unsigned short[1]'}} +// expected-error@-1 {{cannot initialize a variable of type 'short *' with an lvalue of type 'const unsigned short [1]'}} char *b = L""; -// expected-error@-1 {{cannot initialize a variable of type 'char *' with an lvalue of type 'const unsigned short[1]'}} +// expected-error@-1 {{cannot initialize a variable of type 'char *' with an lvalue of type 'const unsigned short [1]'}} // NOTE: MSVC allows deprecated conversion in conditional expression if at least // one of the operand is a string literal but Clang doesn't allow it. diff --git a/clang/test/SemaCXX/nullability.cpp b/clang/test/SemaCXX/nullability.cpp index 978b90564a2a..91ecc447c534 100644 --- a/clang/test/SemaCXX/nullability.cpp +++ b/clang/test/SemaCXX/nullability.cpp @@ -126,11 +126,11 @@ void arraysInLambdas() { simple(nullptr); // expected-warning {{null passed to a callee that requires a non-null argument}} auto nested = [](void *_Nullable [_Nonnull 2]) {}; nested(nullptr); // expected-warning {{null passed to a callee that requires a non-null argument}} - auto nestedBad = [](int [2][_Nonnull 2]) {}; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int[2]'}} + auto nestedBad = [](int [2][_Nonnull 2]) {}; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int [2]'}} auto withTypedef = [](INTS _Nonnull) {}; withTypedef(nullptr); // expected-warning {{null passed to a callee that requires a non-null argument}} - auto withTypedefBad = [](INTS _Nonnull[2]) {}; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int[4]')}} + auto withTypedefBad = [](INTS _Nonnull[2]) {}; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int [4]')}} } void testNullabilityCompletenessWithTemplate() { diff --git a/clang/test/SemaCXX/overload-call.cpp b/clang/test/SemaCXX/overload-call.cpp index 0e5978e56f88..a34bce5014ab 100644 --- a/clang/test/SemaCXX/overload-call.cpp +++ b/clang/test/SemaCXX/overload-call.cpp @@ -339,8 +339,8 @@ namespace PR5756 { // Tests the exact text used to note the candidates namespace test1 { template -void foo(T t, unsigned N); // expected-note {{candidate function template not viable: no known conversion from 'const char[6]' to 'unsigned int' for 2nd argument}} -void foo(int n, char N); // expected-note {{candidate function not viable: no known conversion from 'const char[6]' to 'char' for 2nd argument}} +void foo(T t, unsigned N); // expected-note {{candidate function template not viable: no known conversion from 'const char [6]' to 'unsigned int' for 2nd argument}} +void foo(int n, char N); // expected-note {{candidate function not viable: no known conversion from 'const char [6]' to 'char' for 2nd argument}} void foo(int n, const char *s, int t); // expected-note {{candidate function not viable: requires 3 arguments, but 2 were provided}} void foo(int n, const char *s, int t, ...); // expected-note {{candidate function not viable: requires at least 3 arguments, but 2 were provided}} void foo(int n, const char *s, int t, int u = 0); // expected-note {{candidate function not viable: requires at least 3 arguments, but 2 were provided}} diff --git a/clang/test/SemaCXX/overload-member-call.cpp b/clang/test/SemaCXX/overload-member-call.cpp index 0cf32694a1ca..9d0fc519b0cc 100644 --- a/clang/test/SemaCXX/overload-member-call.cpp +++ b/clang/test/SemaCXX/overload-member-call.cpp @@ -71,8 +71,8 @@ void test_X2(X2 *x2p, const X2 *cx2p) { namespace test1 { class A { template - void foo(T t, unsigned N); // expected-note {{candidate function template not viable: no known conversion from 'const char[6]' to 'unsigned int' for 2nd argument}} - void foo(int n, char N); // expected-note {{candidate function not viable: no known conversion from 'const char[6]' to 'char' for 2nd argument}} + void foo(T t, unsigned N); // expected-note {{candidate function template not viable: no known conversion from 'const char [6]' to 'unsigned int' for 2nd argument}} + void foo(int n, char N); // expected-note {{candidate function not viable: no known conversion from 'const char [6]' to 'char' for 2nd argument}} void foo(int n, const char *s, int t); // expected-note {{candidate function not viable: requires 3 arguments, but 2 were provided}} void foo(int n, const char *s, int t, ...); // expected-note {{candidate function not viable: requires at least 3 arguments, but 2 were provided}} void foo(int n, const char *s, int t, int u = 0); // expected-note {{candidate function not viable: requires at least 3 arguments, but 2 were provided}} diff --git a/clang/test/SemaCXX/static-assert-cxx17.cpp b/clang/test/SemaCXX/static-assert-cxx17.cpp index ce9826795d5d..d5601839bdd3 100644 --- a/clang/test/SemaCXX/static-assert-cxx17.cpp +++ b/clang/test/SemaCXX/static-assert-cxx17.cpp @@ -46,7 +46,7 @@ template void foo3, int, float>(); template void foo4() { static_assert(S1::value, ""); - // expected-error@-1{{static_assert failed due to requirement 'S1::value'}} + // expected-error@-1{{static_assert failed due to requirement 'S1::value'}} }; template void foo4(); // expected-note@-1{{in instantiation of function template specialization 'foo4' requested here}} @@ -94,7 +94,7 @@ void foo6() { static_assert(static_cast *>(nullptr)); // expected-error@-1{{static_assert failed due to requirement 'static_cast *>(nullptr)'}} static_assert((const X[]){} == nullptr); - // expected-error@-1{{static_assert failed due to requirement '(const X[0]){} == nullptr'}} + // expected-error@-1{{static_assert failed due to requirement '(const X [0]){} == nullptr'}} static_assert(sizeof(X().X::~X())>) == 0); // expected-error@-1{{static_assert failed due to requirement 'sizeof(X) == 0'}} static_assert(constexpr_return_false()); diff --git a/clang/test/SemaCXX/typedef-redecl.cpp b/clang/test/SemaCXX/typedef-redecl.cpp index adeda317c1f7..06883ffd4b5e 100644 --- a/clang/test/SemaCXX/typedef-redecl.cpp +++ b/clang/test/SemaCXX/typedef-redecl.cpp @@ -68,7 +68,7 @@ namespace PR11630 { static void f() { typedef int q[C == 1 ? 1 : -1]; // expected-note{{previous definition is here}} - typedef int q[C >= 1 ? 2 : -2]; // expected-error{{typedef redefinition with different types ('int[2]' vs 'int[1]')}} + typedef int q[C >= 1 ? 2 : -2]; // expected-error{{typedef redefinition with different types ('int [2]' vs 'int [1]')}} typedef int n[C == 1 ? 1 : -1]; typedef int n[C >= 1 ? 1 : -1]; } @@ -80,7 +80,7 @@ namespace PR11630 { static void f() { typedef int q[1]; // expected-note{{previous definition is here}} - typedef int q[T]; // expected-error{{typedef redefinition with different types ('int[2]' vs 'int[1]')}} + typedef int q[T]; // expected-error{{typedef redefinition with different types ('int [2]' vs 'int [1]')}} } }; diff --git a/clang/test/SemaCXX/typeid.cpp b/clang/test/SemaCXX/typeid.cpp index 26cad1c88f4d..4e696deee131 100644 --- a/clang/test/SemaCXX/typeid.cpp +++ b/clang/test/SemaCXX/typeid.cpp @@ -24,8 +24,8 @@ void g1(X &x) { void h(int i) { char V[i]; - typeid(V); // expected-error{{'typeid' of variably modified type 'char[i]'}} - typeid(char [i]); // expected-error{{'typeid' of variably modified type 'char[i]'}} + typeid(V); // expected-error{{'typeid' of variably modified type 'char [i]'}} + typeid(char [i]); // expected-error{{'typeid' of variably modified type 'char [i]'}} } // expected-note@+1 {{read of object 'typeid(int).name' whose value is not known}} diff --git a/clang/test/SemaCXX/warn-string-conversion.cpp b/clang/test/SemaCXX/warn-string-conversion.cpp index 8a0042016532..b26126f6c72f 100644 --- a/clang/test/SemaCXX/warn-string-conversion.cpp +++ b/clang/test/SemaCXX/warn-string-conversion.cpp @@ -4,21 +4,21 @@ // An exception is made for this in logical and operators. void assert(bool condition); void test0() { - bool b0 = "hi"; // expected-warning{{implicit conversion turns string literal into bool: 'const char[3]' to 'bool'}} - b0 = ""; // expected-warning{{implicit conversion turns string literal into bool: 'const char[1]' to 'bool'}} - b0 = 0 || ""; // expected-warning{{implicit conversion turns string literal into bool: 'const char[1]' to 'bool'}} - b0 = "" || 0; // expected-warning{{implicit conversion turns string literal into bool: 'const char[1]' to 'bool'}} + bool b0 = "hi"; // expected-warning{{implicit conversion turns string literal into bool: 'const char [3]' to 'bool'}} + b0 = ""; // expected-warning{{implicit conversion turns string literal into bool: 'const char [1]' to 'bool'}} + b0 = 0 || ""; // expected-warning{{implicit conversion turns string literal into bool: 'const char [1]' to 'bool'}} + b0 = "" || 0; // expected-warning{{implicit conversion turns string literal into bool: 'const char [1]' to 'bool'}} b0 = 0 && ""; b0 = "" && 0; - assert("error"); // expected-warning{{implicit conversion turns string literal into bool: 'const char[6]' to 'bool'}} - assert(0 || "error"); // expected-warning{{implicit conversion turns string literal into bool: 'const char[6]' to 'bool'}} - assert("error" || 0); // expected-warning{{implicit conversion turns string literal into bool: 'const char[6]' to 'bool'}} + assert("error"); // expected-warning{{implicit conversion turns string literal into bool: 'const char [6]' to 'bool'}} + assert(0 || "error"); // expected-warning{{implicit conversion turns string literal into bool: 'const char [6]' to 'bool'}} + assert("error" || 0); // expected-warning{{implicit conversion turns string literal into bool: 'const char [6]' to 'bool'}} assert(0 && "error"); assert("error" && 0); - while("hi") {} // expected-warning{{implicit conversion turns string literal into bool: 'const char[3]' to 'bool'}} - do {} while("hi"); // expected-warning{{implicit conversion turns string literal into bool: 'const char[3]' to 'bool'}} - for (;"hi";); // expected-warning{{implicit conversion turns string literal into bool: 'const char[3]' to 'bool'}} - if("hi") {} // expected-warning{{implicit conversion turns string literal into bool: 'const char[3]' to 'bool'}} + while("hi") {} // expected-warning{{implicit conversion turns string literal into bool: 'const char [3]' to 'bool'}} + do {} while("hi"); // expected-warning{{implicit conversion turns string literal into bool: 'const char [3]' to 'bool'}} + for (;"hi";); // expected-warning{{implicit conversion turns string literal into bool: 'const char [3]' to 'bool'}} + if("hi") {} // expected-warning{{implicit conversion turns string literal into bool: 'const char [3]' to 'bool'}} } diff --git a/clang/test/SemaObjC/argument-checking.m b/clang/test/SemaObjC/argument-checking.m index 3639fcd51190..9019a0fb24e4 100644 --- a/clang/test/SemaObjC/argument-checking.m +++ b/clang/test/SemaObjC/argument-checking.m @@ -18,7 +18,7 @@ void test() { struct S sInst; charStarFunc(1); // expected-warning {{incompatible integer to pointer conversion passing 'int' to parameter of type 'char *'}} - charFunc("abc"); // expected-warning {{incompatible pointer to integer conversion passing 'char[4]' to parameter of type 'char'}} + charFunc("abc"); // expected-warning {{incompatible pointer to integer conversion passing 'char [4]' to parameter of type 'char'}} [obj charStarMeth:1]; // expected-warning {{incompatible integer to pointer conversion sending 'int'}} [obj structMeth:1]; // expected-error {{sending 'int'}} diff --git a/clang/test/SemaObjC/flexible-array.m b/clang/test/SemaObjC/flexible-array.m index ff3dc711e581..68e32d851f62 100644 --- a/clang/test/SemaObjC/flexible-array.m +++ b/clang/test/SemaObjC/flexible-array.m @@ -8,7 +8,7 @@ @end @interface NotLastIvar { - char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char[]' is not at the end of class}} + char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char []' is not at the end of class}} int last; // expected-note {{next instance variable declaration is here}} } @end @@ -17,28 +17,28 @@ @interface LastIvarInImpl @end @implementation LastIvarInImpl { - char flexible[]; // expected-warning {{field 'flexible' with variable sized type 'char[]' is not visible to subclasses and can conflict with their instance variables}} + char flexible[]; // expected-warning {{field 'flexible' with variable sized type 'char []' is not visible to subclasses and can conflict with their instance variables}} } @end @interface NotLastIvarInImpl @end @implementation NotLastIvarInImpl { - char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char[]' is not at the end of class}} - // expected-warning@-1 {{field 'flexible' with variable sized type 'char[]' is not visible to subclasses and can conflict with their instance variables}} + char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char []' is not at the end of class}} + // expected-warning@-1 {{field 'flexible' with variable sized type 'char []' is not visible to subclasses and can conflict with their instance variables}} int last; // expected-note {{next instance variable declaration is here}} } @end @implementation NotLastIvarInImplWithoutInterface { // expected-warning {{cannot find interface declaration for 'NotLastIvarInImplWithoutInterface'}} - char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char[]' is not at the end of class}} - // expected-warning@-1 {{field 'flexible' with variable sized type 'char[]' is not visible to subclasses and can conflict with their instance variables}} + char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char []' is not at the end of class}} + // expected-warning@-1 {{field 'flexible' with variable sized type 'char []' is not visible to subclasses and can conflict with their instance variables}} int last; // expected-note {{next instance variable declaration is here}} } @end @interface LastIvarInClass_OtherIvarInImpl { - char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char[]' is not at the end of class}} + char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char []' is not at the end of class}} } @end @implementation LastIvarInClass_OtherIvarInImpl { @@ -59,21 +59,21 @@ int nonIvar; @interface LastIvarInExtension @end @interface LastIvarInExtension() { - char flexible[]; // expected-warning {{field 'flexible' with variable sized type 'char[]' is not visible to subclasses and can conflict with their instance variables}} + char flexible[]; // expected-warning {{field 'flexible' with variable sized type 'char []' is not visible to subclasses and can conflict with their instance variables}} } @end @interface NotLastIvarInExtension @end @interface NotLastIvarInExtension() { - char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char[]' is not at the end of class}} - // expected-warning@-1 {{field 'flexible' with variable sized type 'char[]' is not visible to subclasses and can conflict with their instance variables}} + char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char []' is not at the end of class}} + // expected-warning@-1 {{field 'flexible' with variable sized type 'char []' is not visible to subclasses and can conflict with their instance variables}} int last; // expected-note {{next instance variable declaration is here}} } @end @interface LastIvarInClass_OtherIvarInExtension { - char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char[]' is not at the end of class}} + char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char []' is not at the end of class}} } @end @interface LastIvarInClass_OtherIvarInExtension() { @@ -91,16 +91,16 @@ int nonIvar; // Extension without ivars to test we see through such extensions. @end @interface LastIvarInExtension_OtherIvarInExtension() { - char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char[]' is not at the end of class}} - // expected-warning@-1 {{field 'flexible' with variable sized type 'char[]' is not visible to subclasses and can conflict with their instance variables}} + char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char []' is not at the end of class}} + // expected-warning@-1 {{field 'flexible' with variable sized type 'char []' is not visible to subclasses and can conflict with their instance variables}} } @end @interface LastIvarInExtension_OtherIvarInImpl @end @interface LastIvarInExtension_OtherIvarInImpl() { - char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char[]' is not at the end of class}} - // expected-warning@-1 {{field 'flexible' with variable sized type 'char[]' is not visible to subclasses and can conflict with their instance variables}} + char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char []' is not at the end of class}} + // expected-warning@-1 {{field 'flexible' with variable sized type 'char []' is not visible to subclasses and can conflict with their instance variables}} } @end @implementation LastIvarInExtension_OtherIvarInImpl { @@ -120,7 +120,7 @@ int nonIvar; @interface LastIvarAndProperty { char _flexible[]; } -@property char flexible[]; // expected-error {{property cannot have array or function type 'char[]'}} +@property char flexible[]; // expected-error {{property cannot have array or function type 'char []'}} @end // ## Synthesize other instance variables. @@ -145,7 +145,7 @@ int nonIvar; @end @interface NotLastIvar_ExplicitlyNamedPropertyBackingIvarLast { - char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char[]' is not at the end of class}} + char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char []' is not at the end of class}} } @property int count; @end @@ -154,7 +154,7 @@ int nonIvar; @end @interface NotLastIvar_ImplicitlyNamedPropertyBackingIvarLast { - char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char[]' is not at the end of class}} + char flexible[]; // expected-error {{flexible array member 'flexible' with type 'char []' is not at the end of class}} } @property int count; // expected-note {{next synthesized instance variable is here}} @end @@ -244,21 +244,21 @@ struct Packet { @end @interface AddedIvarInInterface : FlexibleArrayMemberBase { - int last; // expected-warning {{field 'last' can overwrite instance variable 'flexible' with variable sized type 'char[]' in superclass 'FlexibleArrayMemberBase'}} + int last; // expected-warning {{field 'last' can overwrite instance variable 'flexible' with variable sized type 'char []' in superclass 'FlexibleArrayMemberBase'}} } @end @interface AddedIvarInImplementation : FlexibleArrayMemberBase @end @implementation AddedIvarInImplementation { - int last; // expected-warning {{field 'last' can overwrite instance variable 'flexible' with variable sized type 'char[]' in superclass 'FlexibleArrayMemberBase'}} + int last; // expected-warning {{field 'last' can overwrite instance variable 'flexible' with variable sized type 'char []' in superclass 'FlexibleArrayMemberBase'}} } @end @interface AddedIvarInExtension : FlexibleArrayMemberBase @end @interface AddedIvarInExtension() { - int last; // expected-warning {{field 'last' can overwrite instance variable 'flexible' with variable sized type 'char[]' in superclass 'FlexibleArrayMemberBase'}} + int last; // expected-warning {{field 'last' can overwrite instance variable 'flexible' with variable sized type 'char []' in superclass 'FlexibleArrayMemberBase'}} } @end @@ -266,11 +266,11 @@ struct Packet { @property int count; @end @implementation SynthesizedIvar -@synthesize count; // expected-warning {{field 'count' can overwrite instance variable 'flexible' with variable sized type 'char[]' in superclass 'FlexibleArrayMemberBase'}} +@synthesize count; // expected-warning {{field 'count' can overwrite instance variable 'flexible' with variable sized type 'char []' in superclass 'FlexibleArrayMemberBase'}} @end @interface WarnInSubclassOnlyOnce : FlexibleArrayMemberBase { - int last; // expected-warning {{field 'last' can overwrite instance variable 'flexible' with variable sized type 'char[]' in superclass 'FlexibleArrayMemberBase'}} + int last; // expected-warning {{field 'last' can overwrite instance variable 'flexible' with variable sized type 'char []' in superclass 'FlexibleArrayMemberBase'}} } @end @interface WarnInSubclassOnlyOnce() { @@ -283,6 +283,6 @@ struct Packet { @end @interface AddedIvarInSubSubClass : NoIvarAdditions { - int last; // expected-warning {{field 'last' can overwrite instance variable 'flexible' with variable sized type 'char[]' in superclass 'FlexibleArrayMemberBase'}} + int last; // expected-warning {{field 'last' can overwrite instance variable 'flexible' with variable sized type 'char []' in superclass 'FlexibleArrayMemberBase'}} } @end diff --git a/clang/test/SemaObjC/ivar-sem-check-1.m b/clang/test/SemaObjC/ivar-sem-check-1.m index 9e28a380afbc..48e0a54b628b 100644 --- a/clang/test/SemaObjC/ivar-sem-check-1.m +++ b/clang/test/SemaObjC/ivar-sem-check-1.m @@ -6,7 +6,7 @@ typedef int FOO(); @interface INTF { struct F {} JJ; - int arr[]; // expected-error {{flexible array member 'arr' with type 'int[]' is not at the end of class}} + int arr[]; // expected-error {{flexible array member 'arr' with type 'int []' is not at the end of class}} struct S IC; // expected-error {{field has incomplete type}} // expected-note@-1 {{next instance variable declaration is here}} struct T { // expected-note {{previous definition is here}} diff --git a/clang/test/SemaObjC/method-bad-param.m b/clang/test/SemaObjC/method-bad-param.m index f70f2cf853e5..a7f0745ddbad 100644 --- a/clang/test/SemaObjC/method-bad-param.m +++ b/clang/test/SemaObjC/method-bad-param.m @@ -49,7 +49,7 @@ enum bogus; // expected-note {{forward declaration of 'enum bogus'}} @end @interface arrayfun -- (int[6])arrayRet; // expected-error {{function cannot return array type 'int[6]'}} +- (int[6])arrayRet; // expected-error {{function cannot return array type 'int [6]'}} - (int())funcRet; // expected-error {{function cannot return function type 'int ()'}} @end diff --git a/clang/test/SemaObjC/nullability.m b/clang/test/SemaObjC/nullability.m index 3817289a7990..93834942be79 100644 --- a/clang/test/SemaObjC/nullability.m +++ b/clang/test/SemaObjC/nullability.m @@ -274,13 +274,13 @@ typedef int INTS[4]; @interface ArraysInMethods - (void)simple:(int [_Nonnull 2])x; - (void)nested:(void *_Nullable [_Nonnull 2])x; -- (void)nestedBad:(int [2][_Nonnull 2])x; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int[2]'}} +- (void)nestedBad:(int [2][_Nonnull 2])x; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int [2]'}} - (void)withTypedef:(INTS _Nonnull)x; -- (void)withTypedefBad:(INTS _Nonnull[2])x; // expected-error{{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int[4]')}} +- (void)withTypedefBad:(INTS _Nonnull[2])x; // expected-error{{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int [4]')}} - (void)simpleSugar:(nonnull int [2])x; -- (void)nestedSugar:(nonnull void *_Nullable [2])x; // expected-error {{nullability keyword 'nonnull' cannot be applied to multi-level pointer type 'void * _Nullable[2]'}} expected-note {{use nullability type specifier '_Nonnull' to affect the innermost pointer type of 'void * _Nullable[2]'}} +- (void)nestedSugar:(nonnull void *_Nullable [2])x; // expected-error {{nullability keyword 'nonnull' cannot be applied to multi-level pointer type 'void * _Nullable [2]'}} expected-note {{use nullability type specifier '_Nonnull' to affect the innermost pointer type of 'void * _Nullable [2]'}} - (void)sugarWithTypedef:(nonnull INTS)x; @end diff --git a/clang/test/SemaObjC/rdr-6211479-array-property.m b/clang/test/SemaObjC/rdr-6211479-array-property.m index f81bc6ca8cd8..39c056c5ba61 100644 --- a/clang/test/SemaObjC/rdr-6211479-array-property.m +++ b/clang/test/SemaObjC/rdr-6211479-array-property.m @@ -4,5 +4,5 @@ typedef int T[2]; @interface A -@property(assign) T p2; // expected-error {{property cannot have array or function type 'T' (aka 'int[2]')}} +@property(assign) T p2; // expected-error {{property cannot have array or function type 'T' (aka 'int [2]')}} @end diff --git a/clang/test/SemaObjC/warn-write-strings.m b/clang/test/SemaObjC/warn-write-strings.m index c9361f0818b7..163c864257e9 100644 --- a/clang/test/SemaObjC/warn-write-strings.m +++ b/clang/test/SemaObjC/warn-write-strings.m @@ -1,4 +1,4 @@ // RUN: %clang_cc1 -verify -fsyntax-only -fconst-strings %s // PR4804 -char* x = "foo"; // expected-warning {{initializing 'char *' with an expression of type 'const char[4]' discards qualifiers}} +char* x = "foo"; // expected-warning {{initializing 'char *' with an expression of type 'const char [4]' discards qualifiers}} diff --git a/clang/test/SemaObjCXX/message.mm b/clang/test/SemaObjCXX/message.mm index 87421f94677f..aa364d521473 100644 --- a/clang/test/SemaObjCXX/message.mm +++ b/clang/test/SemaObjCXX/message.mm @@ -103,7 +103,7 @@ struct MutableString : public String { }; void test_I5(I5 *i5, String s) { [i5 method:"hello" other:s]; - [i5 method:s other:"world"]; // expected-error{{non-const lvalue reference to type 'String' cannot bind to a value of unrelated type 'const char[6]'}} + [i5 method:s other:"world"]; // expected-error{{non-const lvalue reference to type 'String' cannot bind to a value of unrelated type 'const char [6]'}} } // diff --git a/clang/test/SemaOpenCL/half.cl b/clang/test/SemaOpenCL/half.cl index e3e558995b21..50bbd745d2af 100644 --- a/clang/test/SemaOpenCL/half.cl +++ b/clang/test/SemaOpenCL/half.cl @@ -6,7 +6,7 @@ constant float f = 1.0h; // expected-error{{half precision constant requires cl_ half half_disabled(half *p, // expected-error{{declaring function return value of type 'half' is not allowed}} half h) // expected-error{{declaring function parameter of type '__private half' is not allowed}} { - half a[2]; // expected-error{{declaring variable of type '__private half[2]' is not allowed}} + half a[2]; // expected-error{{declaring variable of type '__private half [2]' is not allowed}} half b; // expected-error{{declaring variable of type '__private half' is not allowed}} *p; // expected-error{{loading directly from pointer to type '__private half' requires cl_khr_fp16. Use vector data load builtin functions instead}} *p = 0; // expected-error{{assigning directly to pointer to type 'half' requires cl_khr_fp16. Use vector data store builtin functions instead}} diff --git a/clang/test/SemaOpenCL/invalid-kernel-parameters.cl b/clang/test/SemaOpenCL/invalid-kernel-parameters.cl index de06b381605b..96e6f7886b73 100644 --- a/clang/test/SemaOpenCL/invalid-kernel-parameters.cl +++ b/clang/test/SemaOpenCL/invalid-kernel-parameters.cl @@ -207,6 +207,6 @@ kernel void array_of_ptr(struct ArrayOfPtr arr) {} // expected-error{{struct ker struct ArrayOfStruct // expected-note{{within field of type 'ArrayOfStruct' declared here}} { - struct ArrayOfPtr arr[3]; // expected-note{{within field of type 'struct ArrayOfPtr[3]' declared here}} + struct ArrayOfPtr arr[3]; // expected-note{{within field of type 'struct ArrayOfPtr [3]' declared here}} }; kernel void array_of_struct(struct ArrayOfStruct arr) {} // expected-error{{struct kernel parameters may not contain pointers}} diff --git a/clang/test/SemaOpenCL/predefined-expr.cl b/clang/test/SemaOpenCL/predefined-expr.cl index 5b219d3009f0..182c9bda657f 100644 --- a/clang/test/SemaOpenCL/predefined-expr.cl +++ b/clang/test/SemaOpenCL/predefined-expr.cl @@ -3,6 +3,6 @@ void f() { char *f1 = __func__; //expected-error-re{{initializing '{{__generic|__private}} char *__private' with an expression of type 'const __constant char *' changes address space of pointer}} - constant char *f2 = __func__; //expected-warning{{initializing '__constant char *__private' with an expression of type 'const __constant char[2]' discards qualifiers}} + constant char *f2 = __func__; //expected-warning{{initializing '__constant char *__private' with an expression of type 'const __constant char [2]' discards qualifiers}} constant const char *f3 = __func__; } diff --git a/clang/test/SemaOpenCLCXX/address-space-deduction.clcpp b/clang/test/SemaOpenCLCXX/address-space-deduction.clcpp index 15b3976930ab..1b757ca43687 100644 --- a/clang/test/SemaOpenCLCXX/address-space-deduction.clcpp +++ b/clang/test/SemaOpenCLCXX/address-space-deduction.clcpp @@ -51,7 +51,7 @@ struct x2 { void foo(x1* xx) { m[0] = *xx; } -//CHECK: -FieldDecl {{.*}} m 'x1[2]' +//CHECK: -FieldDecl {{.*}} m 'x1 [2]' x1 m[2]; }; diff --git a/clang/test/SemaTemplate/deduction-guide.cpp b/clang/test/SemaTemplate/deduction-guide.cpp index 3ec7e1922068..79418134d2fd 100644 --- a/clang/test/SemaTemplate/deduction-guide.cpp +++ b/clang/test/SemaTemplate/deduction-guide.cpp @@ -23,7 +23,7 @@ using AT = A; // CHECK: | |-ParmVarDecl {{.*}} 'X' // CHECK: | `-ParmVarDecl {{.*}} 'Ts (*)[Ns]...' pack // CHECK: `-CXXDeductionGuideDecl -// CHECK: |-TemplateArgument type 'int[3]' +// CHECK: |-TemplateArgument type 'int [3]' // CHECK: |-TemplateArgument pack // CHECK: | |-TemplateArgument type 'int' // CHECK: | |-TemplateArgument type 'int' @@ -34,9 +34,9 @@ using AT = A; // CHECK: | `-TemplateArgument integral 4 // CHECK: |-TemplateArgument pack // CHECK: | |-TemplateArgument decl -// CHECK: | | `-Var {{.*}} 'arr1' 'int[3]' +// CHECK: | | `-Var {{.*}} 'arr1' 'int [3]' // CHECK: | `-TemplateArgument decl -// CHECK: | `-Var {{.*}} 'arr2' 'int[3]' +// CHECK: | `-Var {{.*}} 'arr2' 'int [3]' // CHECK: |-ParmVarDecl {{.*}} 'X<&arr1, &arr2>':'X<&arr1, &arr2>' // CHECK: |-ParmVarDecl {{.*}} 'int (*)[3]' // CHECK: |-ParmVarDecl {{.*}} 'int (*)[3]' @@ -49,8 +49,8 @@ using AT = A; // CHECK: | `-DeclRefExpr {{.*}} 'T *' NonTypeTemplateParm {{.*}} 'Ps' 'T *' // CHECK: `-PackExpansionType {{.*}} 'Ts (*)[Ns]...' dependent // CHECK: `-PointerType {{.*}} 'Ts (*)[Ns]' dependent contains_unexpanded_pack -// CHECK: `-ParenType {{.*}} 'Ts[Ns]' sugar dependent contains_unexpanded_pack -// CHECK: `-DependentSizedArrayType {{.*}} 'Ts[Ns]' dependent contains_unexpanded_pack +// CHECK: `-ParenType {{.*}} 'Ts [Ns]' sugar dependent contains_unexpanded_pack +// CHECK: `-DependentSizedArrayType {{.*}} 'Ts [Ns]' dependent contains_unexpanded_pack // CHECK: |-TemplateTypeParmType {{.*}} 'Ts' dependent contains_unexpanded_pack depth 0 index 1 pack // CHECK: | `-TemplateTypeParm {{.*}} 'Ts' // CHECK: `-DeclRefExpr {{.*}} 'Ts' NonTypeTemplateParm {{.*}} 'Ns' 'Ts...' diff --git a/clang/test/SemaTemplate/instantiate-init.cpp b/clang/test/SemaTemplate/instantiate-init.cpp index 6db33a972f86..dee0f4422e91 100644 --- a/clang/test/SemaTemplate/instantiate-init.cpp +++ b/clang/test/SemaTemplate/instantiate-init.cpp @@ -86,7 +86,7 @@ namespace PR7985 { template struct integral_c { }; template - integral_c array_lengthof(T (&x)[N]) { return integral_c(); } // expected-note 2{{candidate template ignored: could not match 'T[N]' against 'const Data<}} + integral_c array_lengthof(T (&x)[N]) { return integral_c(); } // expected-note 2{{candidate template ignored: could not match 'T [N]' against 'const Data<}} template struct Data { diff --git a/clang/test/SemaTemplate/instantiate-local-class.cpp b/clang/test/SemaTemplate/instantiate-local-class.cpp index e51c7116ee74..ce986d98600e 100644 --- a/clang/test/SemaTemplate/instantiate-local-class.cpp +++ b/clang/test/SemaTemplate/instantiate-local-class.cpp @@ -460,7 +460,7 @@ namespace rdar23721638 { template void foo() { struct Inner { // expected-note {{in instantiation}} - void operator()(T a = "") {} // expected-error {{conversion function from 'const char[1]' to 'rdar23721638::A' invokes a deleted function}} + void operator()(T a = "") {} // expected-error {{conversion function from 'const char [1]' to 'rdar23721638::A' invokes a deleted function}} // expected-note@-1 {{passing argument to parameter 'a' here}} }; Inner()(); // expected-error {{type 'Inner' does not provide a call operator}} @@ -468,7 +468,7 @@ namespace rdar23721638 { template void foo(); // expected-note 2 {{in instantiation}} template void bar() { - auto lambda = [](T a = "") {}; // expected-error {{conversion function from 'const char[1]' to 'rdar23721638::A' invokes a deleted function}} + auto lambda = [](T a = "") {}; // expected-error {{conversion function from 'const char [1]' to 'rdar23721638::A' invokes a deleted function}} // expected-note@-1 {{passing argument to parameter 'a' here}} lambda(); } diff --git a/clang/test/SemaTemplate/instantiate-static-var.cpp b/clang/test/SemaTemplate/instantiate-static-var.cpp index 63d8366b617c..7a6de7896cba 100644 --- a/clang/test/SemaTemplate/instantiate-static-var.cpp +++ b/clang/test/SemaTemplate/instantiate-static-var.cpp @@ -154,8 +154,8 @@ namespace ArrayBound { static const char kMessage[]; // Here, kMessage is type-dependent, so we don't diagnose until // instantiation. - static void g1() { const char (&ref)[4] = kMessage; } // expected-error {{could not bind to an lvalue of type 'const char[5]'}} - static void g2() { const char (&ref)[5] = kMessage; } // expected-error {{could not bind to an lvalue of type 'const char[4]'}} + static void g1() { const char (&ref)[4] = kMessage; } // expected-error {{could not bind to an lvalue of type 'const char [5]'}} + static void g2() { const char (&ref)[5] = kMessage; } // expected-error {{could not bind to an lvalue of type 'const char [4]'}} }; template const char Bar::kMessage[] = "foo"; template void Bar::g1(); diff --git a/clang/test/SemaTemplate/pack-deduction.cpp b/clang/test/SemaTemplate/pack-deduction.cpp index e42709820e9c..6368f16ebe8b 100644 --- a/clang/test/SemaTemplate/pack-deduction.cpp +++ b/clang/test/SemaTemplate/pack-deduction.cpp @@ -141,7 +141,7 @@ namespace partial_full_mix { // expected-note@-1 {{[with U = ]: pack expansion contains parameter pack 'U' that has a different length (2 vs. 3) from outer parameter packs}} template static tuple h(tuple..., pair>); - // expected-note@-1 {{[with U = ]: pack expansion contains parameter pack 'U' that has a different length (2 vs. 1) from outer parameter packs}} + // expected-note@-1 {{[with U = ]: pack expansion contains parameter pack 'U' that has a different length (2 vs. 1) from outer parameter packs}} }; pair, tuple> k1 = A().f(pair(), pair()); diff --git a/clang/test/SemaTemplate/temp_arg_nontype.cpp b/clang/test/SemaTemplate/temp_arg_nontype.cpp index 4ad15ae20d85..a735e92a6c98 100644 --- a/clang/test/SemaTemplate/temp_arg_nontype.cpp +++ b/clang/test/SemaTemplate/temp_arg_nontype.cpp @@ -174,7 +174,7 @@ namespace pr6249 { namespace PR6723 { template void f(int (&a)[C]); // expected-note 3{{candidate template ignored: substitution failure [with C = '\x00']}} - // expected-note@-1 {{not viable: no known conversion from 'int[512]' to 'int (&)[0]'}} + // expected-note@-1 {{not viable: no known conversion from 'int [512]' to 'int (&)[0]'}} void g() { int arr512[512]; f(arr512); // expected-error{{no matching function for call}} diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp index 724de6c67f0f..3036b1c59d50 100644 --- a/clang/unittests/AST/ASTImporterTest.cpp +++ b/clang/unittests/AST/ASTImporterTest.cpp @@ -269,15 +269,15 @@ TEST_P(ImportExpr, ImportStringLiteral) { testImport("void declToImport() { (void)\"foo\"; }", Lang_CXX03, "", Lang_CXX03, Verifier, functionDecl(hasDescendant( - stringLiteral(hasType(asString("const char[4]")))))); + stringLiteral(hasType(asString("const char [4]")))))); testImport("void declToImport() { (void)L\"foo\"; }", Lang_CXX03, "", Lang_CXX03, Verifier, functionDecl(hasDescendant( - stringLiteral(hasType(asString("const wchar_t[4]")))))); + stringLiteral(hasType(asString("const wchar_t [4]")))))); testImport("void declToImport() { (void) \"foo\" \"bar\"; }", Lang_CXX03, "", Lang_CXX03, Verifier, functionDecl(hasDescendant( - stringLiteral(hasType(asString("const char[7]")))))); + stringLiteral(hasType(asString("const char [7]")))))); } TEST_P(ImportExpr, ImportChooseExpr) { @@ -508,8 +508,8 @@ TEST_P(ImportExpr, ImportPredefinedExpr) { testImport("void declToImport() { (void)__func__; }", Lang_CXX03, "", Lang_CXX03, Verifier, functionDecl(hasDescendant(predefinedExpr( - hasType(asString("const char[13]")), - has(stringLiteral(hasType(asString("const char[13]")))))))); + hasType(asString("const char [13]")), + has(stringLiteral(hasType(asString("const char [13]")))))))); } TEST_P(ImportExpr, ImportInitListExpr) { diff --git a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp index 022f6ef8e577..92fd5306deb1 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp @@ -1049,7 +1049,7 @@ TEST_P(ASTMatchersTest, StmtExpr) { TEST_P(ASTMatchersTest, PredefinedExpr) { // __func__ expands as StringLiteral("foo") EXPECT_TRUE(matches("void foo() { __func__; }", - predefinedExpr(hasType(asString("const char[4]")), + predefinedExpr(hasType(asString("const char [4]")), has(stringLiteral())))); } @@ -1367,7 +1367,7 @@ TEST_P(ASTMatchersTest, ExprWithCleanups_MatchesExprWithCleanups) { TEST_P(ASTMatchersTest, InitListExpr) { EXPECT_TRUE(matches("int a[] = { 1, 2 };", - initListExpr(hasType(asString("int[2]"))))); + initListExpr(hasType(asString("int [2]"))))); EXPECT_TRUE(matches("struct B { int x, y; }; struct B b = { 5, 6 };", initListExpr(hasType(recordDecl(hasName("B")))))); EXPECT_TRUE( diff --git a/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp index f39d5ecbb095..7746c82f7ec5 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp @@ -430,8 +430,8 @@ TEST(HasTypeLoc, MatchesClassTemplateSpecializationDecl) { TEST(HasTypeLoc, MatchesCompoundLiteralExpr) { EXPECT_TRUE( - matches("int* x = (int[2]) { 0, 1 };", - compoundLiteralExpr(hasTypeLoc(loc(asString("int[2]")))))); + matches("int* x = (int [2]) { 0, 1 };", + compoundLiteralExpr(hasTypeLoc(loc(asString("int [2]")))))); } TEST(HasTypeLoc, MatchesDeclaratorDecl) {