Skip to content

[clang][test] Fix filecheck annotation typos #93193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ void gronk::bar(void) {
// CHECK-MESSAGES: :[[@LINE-2]]:11: warning: {{.*}} in variable declaration
// CHECK-FIXES: {{^ }}void (gronk::*p5){{$}}
// CHECK-FIXES-NEXT: {{^ \($}}
// CHECK-FIXES-NExT: {{^ $}}
// CHECK-FIXES-NExT: {{^ \);$}}
// CHECK-FIXES-NEXT: {{^ $}}
// CHECK-FIXES-NEXT: {{^ \);$}}
}

// intentionally not LLVM style to check preservation of whitespace
Expand Down
2 changes: 1 addition & 1 deletion clang/test/AST/ast-crash-doc-function-template.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: rm -rf %t
// RUN: split-file %s %t

// RUN: %clang_cc1 -x c++ -Wdocumentation -ast-dump-all %t/t.cpp
// RUN: %clang_cc1 -x c++ -Wdocumentation -ast-dump-all %t/t.cpp | FileCheck %s

//--- t.h
/// MyClass in the header file
Expand Down
6 changes: 3 additions & 3 deletions clang/test/AST/ast-dump-attr-type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ using Ty1 = decltype(y);
// CHECK-NEXT: |-DeclRefExpr 0x{{[^ ]*}} <col:22> '__attribute__((address_space(3))) int *' lvalue Var 0x{{[^ ]*}} 'y' '__attribute__((address_space(3))) int *' non_odr_use_unevaluated
// CHECK-NEXT: `-PointerType 0x{{[^ ]*}} '__attribute__((address_space(3))) int *'
// CHECK-NEXT: `-AttributedType 0x{{[^ ]*}} '__attribute__((address_space(3))) int' sugar
// CHECK-NEXT |-BuiltinType 0x{{[^ ]*}} 'int'
// CHECK-NEXT `-QualType 0x{{[^ ]*}} '__attribute__((address_space(3))) int' __attribute__((address_space(3)))
// CHECK-NEXT `-BuiltinType 0x{{[^ ]*}} 'int'
// CHECK-NEXT: |-BuiltinType 0x{{[^ ]*}} 'int'
// CHECK-NEXT: `-QualType 0x{{[^ ]*}} '__attribute__((address_space(3))) int' __attribute__((address_space(3)))
// CHECK-NEXT: `-BuiltinType 0x{{[^ ]*}} 'int'
8 changes: 4 additions & 4 deletions clang/test/AST/ast-dump-decl.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ enum TestEnumDeclForward;
// CHECK: EnumDecl{{.*}} TestEnumDeclForward

__module_private__ enum TestEnumDeclPrivate;
// CHECK-MODULE: EnumDecl{{.*}} TestEnumDeclPrivate __module_private__
// CHECK-MODULES: EnumDecl{{.*}} TestEnumDeclPrivate __module_private__

struct TestRecordDecl {
int i;
Expand Down Expand Up @@ -103,7 +103,7 @@ struct TestRecordDeclForward;
// CHECK: RecordDecl{{.*}} struct TestRecordDeclForward

__module_private__ struct TestRecordDeclPrivate;
// CHECK-MODULE: RecordDecl{{.*}} struct TestRecordDeclPrivate __module_private__
// CHECK-MODULES: RecordDecl{{.*}} struct TestRecordDeclPrivate __module_private__

enum testEnumConstantDecl {
TestEnumConstantDecl,
Expand Down Expand Up @@ -163,7 +163,7 @@ struct testFieldDecl {
// CHECK-NEXT: ConstantExpr
// CHECK-NEXT: value: Int 1
// CHECK-NEXT: IntegerLiteral
// CHECK-MODULE: FieldDecl{{.*}} TestFieldDeclPrivate 'int' __module_private__
// CHECK-MODULES: FieldDecl{{.*}} TestFieldDeclPrivate 'int' __module_private__

int TestVarDecl;
// CHECK: VarDecl{{.*}} TestVarDecl 'int'
Expand All @@ -175,7 +175,7 @@ __thread int TestVarDeclThread;
// CHECK: VarDecl{{.*}} TestVarDeclThread 'int' tls{{$}}

__module_private__ int TestVarDeclPrivate;
// CHECK-MODULE: VarDecl{{.*}} TestVarDeclPrivate 'int' __module_private__
// CHECK-MODULES: VarDecl{{.*}} TestVarDeclPrivate 'int' __module_private__

int TestVarDeclInit = 0;
// CHECK: VarDecl{{.*}} TestVarDeclInit 'int'
Expand Down
2 changes: 1 addition & 1 deletion clang/test/AST/ast-dump-recovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void InvalidInitalizer(int x) {
// CHECK: `-VarDecl {{.*}} a3 'Bar'
// CHECK-NEXT: `-RecoveryExpr {{.*}} contains-errors
// CHECK-NEXT: `-InitListExpr
// CHECK-NEDT: `-DeclRefExpr {{.*}} 'x'
// CHECK-NEXT: `-DeclRefExpr {{.*}} 'x'
Bar a3{x};
// CHECK: `-VarDecl {{.*}} a4 'Bar'
// CHECK-NEXT: `-ParenListExpr {{.*}} 'NULL TYPE' contains-errors
Expand Down
4 changes: 2 additions & 2 deletions clang/test/AST/ast-dump-using-template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ using A = S<T>;
// CHECK-NEXT: `-ElaboratedType {{.*}} 'S<T>' sugar dependent
// CHECK-NEXT: `-TemplateSpecializationType {{.*}} 'S<T>' dependent
// CHECK-NEXT: |-name: 'S':'ns::S' qualified
// CHECk-NEXT: | |-UsingShadowDecl {{.+}} ClassTemplate {{.+}} 'S'
// CHECK-NEXT: | |-UsingShadowDecl {{.+}} ClassTemplate {{.+}} 'S'

// TemplateName in TemplateArgument.
template <template <typename> class T> class X {};
Expand Down Expand Up @@ -55,4 +55,4 @@ using D = decltype(DeducedTemplateSpecializationT2);
// CHECK-NEXT: `-ElaboratedType {{.*}} 'S2<int>' sugar
// CHECK-NEXT: `-DeducedTemplateSpecializationType {{.*}} 'S2<int>' sugar
// CHECK-NEXT: |-name: 'S2':'ns::S2' qualified
//CHECk-NEXT: | |-UsingShadowDecl {{.+}} ClassTemplate {{.+}} 'S2'
// CHECK-NEXT: | |-UsingShadowDecl {{.+}} ClassTemplate {{.+}} 'S2'
74 changes: 37 additions & 37 deletions clang/test/AST/conditionally-trivial-smfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,61 +222,61 @@ template struct CopyAssignmentCheck<1>;
// CHECK: "definitionData": {
// CHECK-NEXT: "canConstDefaultInit": true,
// CHECK-NEXT: "canPassInRegisters": true,
// CHECK-NEXT "copyAssign": {
// CHECK-NEXT "hasConstParam": true,
// CHECK-NEXT "implicitHasConstParam": true,
// CHECK-NEXT "trivial": true,
// CHECK-NEXT "userDeclared": true
// CHECK-NEXT },
// CHECK-NEXT: "copyAssign": {
// CHECK-NEXT: "hasConstParam": true,
// CHECK-NEXT: "implicitHasConstParam": true,
// CHECK-NEXT: "trivial": true,
// CHECK-NEXT: "userDeclared": true
// CHECK-NEXT: },

// CHECK: "hasConstexprNonCopyMoveConstructor": true,
// CHECK-NEXT "isAggregate": true,
// CHECK-NEXT "isEmpty": true,
// CHECK-NEXT "isLiteral": true,
// CHECK-NEXT "isStandardLayout": true,
// CHECK-NEXT "isTrivial": true,
// CHECK-NEXT "isTriviallyCopyable": true,
// CHECK-NEXT "moveAssign": {},
// CHECK-NEXT: "isAggregate": true,
// CHECK-NEXT: "isEmpty": true,
// CHECK-NEXT: "isLiteral": true,
// CHECK-NEXT: "isStandardLayout": true,
// CHECK-NEXT: "isTrivial": true,
// CHECK-NEXT: "isTriviallyCopyable": true,
// CHECK-NEXT: "moveAssign": {},

template struct CopyAssignmentCheck<2>;
// CHECK: "kind": "ClassTemplateSpecializationDecl",
// CHECK: "definitionData": {
// CHECK-NEXT: "canConstDefaultInit": true,
// CHECK-NEXT: "canPassInRegisters": true,
// CHECK-NEXT "copyAssign": {
// CHECK-NEXT "hasConstParam": true,
// CHECK-NEXT "implicitHasConstParam": true,
// CHECK-NEXT "trivial": true,
// CHECK-NEXT "userDeclared": true
// CHECK-NEXT },
// CHECK-NEXT: "copyAssign": {
// CHECK-NEXT: "hasConstParam": true,
// CHECK-NEXT: "implicitHasConstParam": true,
// CHECK-NEXT: "trivial": true,
// CHECK-NEXT: "userDeclared": true
// CHECK-NEXT: },

// CHECK: "hasConstexprNonCopyMoveConstructor": true,
// CHECK-NEXT "isAggregate": true,
// CHECK-NEXT "isEmpty": true,
// CHECK-NEXT "isLiteral": true,
// CHECK-NEXT "isStandardLayout": true,
// CHECK-NEXT "isTrivial": true,
// CHECK-NEXT "isTriviallyCopyable": true,
// CHECK-NEXT "moveAssign": {},
// CHECK-NEXT: "isAggregate": true,
// CHECK-NEXT: "isEmpty": true,
// CHECK-NEXT: "isLiteral": true,
// CHECK-NEXT: "isStandardLayout": true,
// CHECK-NEXT: "isTrivial": true,
// CHECK-NEXT: "isTriviallyCopyable": true,
// CHECK-NEXT: "moveAssign": {},

template struct CopyAssignmentCheck<3>;
// CHECK: "kind": "ClassTemplateSpecializationDecl",
// CHECK: "definitionData": {
// CHECK-NEXT: "canConstDefaultInit": true,
// CHECK-NEXT: "canPassInRegisters": true,
// CHECK-NEXT "copyAssign": {
// CHECK-NEXT "hasConstParam": true,
// CHECK-NEXT "implicitHasConstParam": true,
// CHECK-NEXT "trivial": true,
// CHECK-NEXT "userDeclared": true
// CHECK-NEXT },
// CHECK-NEXT: "copyAssign": {
// CHECK-NEXT: "hasConstParam": true,
// CHECK-NEXT: "implicitHasConstParam": true,
// CHECK-NEXT: "trivial": true,
// CHECK-NEXT: "userDeclared": true
// CHECK-NEXT: },

// CHECK: "hasConstexprNonCopyMoveConstructor": true,
// CHECK-NEXT "isAggregate": true,
// CHECK-NEXT "isEmpty": true,
// CHECK-NEXT "isLiteral": true,
// CHECK-NEXT "isStandardLayout": true,
// CHECK-NEXT "moveAssign": {},
// CHECK-NEXT: "isAggregate": true,
// CHECK-NEXT: "isEmpty": true,
// CHECK-NEXT: "isLiteral": true,
// CHECK-NEXT: "isStandardLayout": true,
// CHECK-NEXT: "moveAssign": {},

template <int N>
struct MoveAssignmentCheck {
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Analysis/cast-value-notes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ void evalReferences(const Shape &S) {
// expected-note@-2 {{Dereference of null pointer}}
// expected-warning@-3 {{Dereference of null pointer}}
clang_analyzer_printState();
// XX86-CHECK: "dynamic_types": [
// XX86-CHECK-NEXT: { "region": "SymRegion{reg_$0<const struct clang::Shape & S>}", "dyn_type": "const class clang::Circle &", "sub_classable": true }
// X86-CHECK: "dynamic_types": [
// X86-CHECK-NEXT: { "region": "SymRegion{reg_$0<const Shape & S>}", "dyn_type": "const class clang::Circle &", "sub_classable": true }
(void)C;
}
#if defined(SUPPRESSED)
Expand Down
2 changes: 1 addition & 1 deletion clang/test/C/C11/n1311.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -emit-llvm -o - %s
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s

/* WG14 N1311: Yes
* Initializing static or external variables
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeCompletion/function-overloads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void test_adl() {
// RUN: FileCheck -check-prefix=CHECK-CC1 %s
// CHECK-CC1: OVERLOAD: [#int#]f(<#float x#>, float y)
// CHECK-CC1: OVERLOAD: [#int#]f(<#int i#>)
// CHECK-CC1-NOT, CHECK-CC2-NOT: OVERLOAD: A(
// CHECK-CC1-NOT: CHECK-CC2-NOT: OVERLOAD: A(
// CHECK-CC2: OVERLOAD: [#int#]f(float x, float y)
// CHECK-CC2-NOT: OVERLOAD: [#int#]f(int i)
// CHECK-CC3: OVERLOAD: A(<#int#>, int, int)
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/64bit-swiftcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ typedef struct {
TEST(padded_alloc_size_vector)
// X86-64-LABEL: take_padded_alloc_size_vector(<3 x i32> %0, i64 %1)
// X86-64-NOT: [4 x i8]
// x86-64: ret void
// X86-64: ret void

typedef union {
float f1;
Expand Down
6 changes: 3 additions & 3 deletions clang/test/CodeGen/AArch64/sve2-intrinsics/acle_sve2_hadd.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ svuint16_t test_svhadd_u16_m(svbool_t pg, svuint16_t op1, svuint16_t op2)
//
svuint32_t test_svhadd_u32_m(svbool_t pg, svuint32_t op1, svuint32_t op2)
{
// CHECKA-LABEL: test_svhadd_u32_m
// CHECK-LABEL: test_svhadd_u32_m
return SVE_ACLE_FUNC(svhadd,_u32,_m,)(pg, op1, op2);
}

Expand Down Expand Up @@ -438,7 +438,7 @@ svuint16_t test_svhadd_u16_z(svbool_t pg, svuint16_t op1, svuint16_t op2)
//
svuint32_t test_svhadd_u32_z(svbool_t pg, svuint32_t op1, svuint32_t op2)
{
// CHECKA-LABEL: test_svhadd_u32_z
// CHECK-LABEL: test_svhadd_u32_z
return SVE_ACLE_FUNC(svhadd,_u32,_z,)(pg, op1, op2);
}

Expand Down Expand Up @@ -753,7 +753,7 @@ svuint16_t test_svhadd_u16_x(svbool_t pg, svuint16_t op1, svuint16_t op2)
//
svuint32_t test_svhadd_u32_x(svbool_t pg, svuint32_t op1, svuint32_t op2)
{
// CHECKA-LABEL: test_svhadd_u32_x
// CHECK-LABEL: test_svhadd_u32_x
return SVE_ACLE_FUNC(svhadd,_u32,_x,)(pg, op1, op2);
}

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/PowerPC/builtins-ppc-altivec.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ void test1() {

res_vi = vec_and(vbi, vi);
// CHECK: and <4 x i32>
// CHECK-le: and <4 x i32>
// CHECK-LE: and <4 x i32>

res_vi = vec_and(vi, vbi);
// CHECK: and <4 x i32>
Expand Down
10 changes: 5 additions & 5 deletions clang/test/CodeGen/PowerPC/builtins-ppc-int128.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@ unsigned long long aull[2] = { 1L, 2L };

void testVectorInt128Pack(){
// CHECK-LABEL: testVectorInt128Pack
// CHECK-LABEL-LE: testVectorInt128Pack
// CHECK-LE-LABEL: testVectorInt128Pack
res_vslll = __builtin_pack_vector_int128(aull[0], aull[1]);
// CHECK: %[[V1:[0-9]+]] = insertelement <2 x i64> poison, i64 %{{[0-9]+}}, i64 0
// CHECK-NEXT: %[[V2:[0-9]+]] = insertelement <2 x i64> %[[V1]], i64 %{{[0-9]+}}, i64 1

// CHECK-LE: %[[V1:[0-9]+]] = insertelement <2 x i64> poison, i64 %{{[0-9]+}}, i64 1
// CHECK-NEXT-LE: %[[V2:[0-9]+]] = insertelement <2 x i64> %[[V1]], i64 %{{[0-9]+}}, i64 0
// CHECK-NEXT-LE: bitcast <2 x i64> %[[V2]] to <1 x i128>
// CHECK-LE-NEXT: %[[V2:[0-9]+]] = insertelement <2 x i64> %[[V1]], i64 %{{[0-9]+}}, i64 0
// CHECK-LE-NEXT: bitcast <2 x i64> %[[V2]] to <1 x i128>

__builtin_unpack_vector_int128(res_vslll, 0);
// CHECK: %[[V1:[0-9]+]] = bitcast <1 x i128> %{{[0-9]+}} to <2 x i64>
// CHECK-NEXT: %{{[0-9]+}} = extractelement <2 x i64> %[[V1]], i32 0

// CHECK-LE: %[[V1:[0-9]+]] = bitcast <1 x i128> %{{[0-9]+}} to <2 x i64>
// CHECK-NEXT-LE: %{{[0-9]+}} = extractelement <2 x i64> %[[V1]], i32 1
// CHECK-LE-NEXT: %{{[0-9]+}} = extractelement <2 x i64> %[[V1]], i32 1

__builtin_unpack_vector_int128(res_vslll, 1);
// CHECK: %[[V1:[0-9]+]] = bitcast <1 x i128> %{{[0-9]+}} to <2 x i64>
// CHECK-NEXT: %{{[0-9]+}} = extractelement <2 x i64> %[[V1]], i32 1

// CHECK-LE: %[[V1:[0-9]+]] = bitcast <1 x i128> %{{[0-9]+}} to <2 x i64>
// CHECK-NEXT-LE: %{{[0-9]+}} = extractelement <2 x i64> %[[V1]], i32 0
// CHECK-LE-NEXT: %{{[0-9]+}} = extractelement <2 x i64> %[[V1]], i32 0
}

2 changes: 1 addition & 1 deletion clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ void test1() {
res_vsll = vec_neg(vsll);
// CHECK: sub <2 x i64> zeroinitializer, {{%[0-9]+}}
// CHECK-LE: sub <2 x i64> zeroinitializer, {{%[0-9]+}}
// CHECK_PPC: call to 'vec_neg' is ambiguous
// CHECK-PPC: call to 'vec_neg' is ambiguous


}
Expand Down
Loading