Skip to content
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

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

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 @@ -180,7 +180,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
40 changes: 20 additions & 20 deletions clang/test/Analysis/analyzer-checker-option-help.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@
//
// CHECK-STABLE: cplusplus.Move:WarnOn
// CHECK-STABLE-SAME: (string) In non-aggressive mode, only warn
// CHECK-STABLLE: on use-after-move of local variables (or
// CHECK-STABLLE: local rvalue references) and of STL objects.
// CHECK-STABLLE: The former is possible because local variables
// CHECK-STABLLE: (or local rvalue references) are not tempting
// CHECK-STABLLE: their user to re-use the storage. The latter
// CHECK-STABLLE: is possible because STL objects are known
// CHECK-STABLLE: to end up in a valid but unspecified state
// CHECK-STABLLE: after the move and their state-reset methods
// CHECK-STABLLE: are also known, which allows us to predict
// CHECK-STABLLE: precisely when use-after-move is invalid.
// CHECK-STABLLE: Some STL objects are known to conform to
// CHECK-STABLLE: additional contracts after move, so they
// CHECK-STABLLE: are not tracked. However, smart pointers
// CHECK-STABLLE: specifically are tracked because we can
// CHECK-STABLLE: perform extra checking over them. In aggressive
// CHECK-STABLLE: mode, warn on any use-after-move because
// CHECK-STABLLE: the user has intentionally asked us to completely
// CHECK-STABLLE: eliminate use-after-move in his code. Values:
// CHECK-STABLLE: "KnownsOnly", "KnownsAndLocals", "All".
// CHECK-STABLLE: (default: KnownsAndLocals)
// CHECK-STABLE: on use-after-move of local variables (or
// CHECK-STABLE: local rvalue references) and of STL objects.
// CHECK-STABLE: The former is possible because local variables
// CHECK-STABLE: (or local rvalue references) are not tempting
// CHECK-STABLE: their user to re-use the storage. The latter
// CHECK-STABLE: is possible because STL objects are known
// CHECK-STABLE: to end up in a valid but unspecified state
// CHECK-STABLE: after the move and their state-reset methods
// CHECK-STABLE: are also known, which allows us to predict
// CHECK-STABLE: precisely when use-after-move is invalid.
// CHECK-STABLE: Some STL objects are known to conform to
// CHECK-STABLE: additional contracts after move, so they
// CHECK-STABLE: are not tracked. However, smart pointers
// CHECK-STABLE: specifically are tracked because we can
// CHECK-STABLE: perform extra checking over them. In aggressive
// CHECK-STABLE: mode, warn on any use-after-move because
// CHECK-STABLE: the user has intentionally asked us to completely
// CHECK-STABLE: eliminate use-after-move in his code. Values:
// CHECK-STABLE: "KnownsOnly", "KnownsAndLocals", "All".
// CHECK-STABLE: (default: KnownsAndLocals)

// CHECK-STABLE-NOT: debug.AnalysisOrder:*
// CHECK-DEVELOPER: debug.AnalysisOrder:*
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 @@ -1002,7 +1002,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
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
Loading