Skip to content

Commit 09680dc

Browse files
authored
[NFC][clang-tidy] Remove {{^}} clauses in some tests (3/N) (#135826)
`check_clang_tidy` now matches full lines only, so `{{^}}` clauses are no longer necessary. I am splitting those changes over multiple PRs to make review easier. Numbering them but the actual order doesn't matter.
1 parent d56afce commit 09680dc

10 files changed

+139
-139
lines changed

Diff for: clang-tools-extra/test/clang-tidy/checkers/abseil/string-find-startswith.cpp

+16-16
Original file line numberDiff line numberDiff line change
@@ -29,67 +29,67 @@ std::string bar();
2929
void tests(std::string s, global_string s2, std::string_view sv) {
3030
s.find("a") == 0;
3131
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith instead of find() == 0 [abseil-string-find-startswith]
32-
// CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s, "a");{{$}}
32+
// CHECK-FIXES: absl::StartsWith(s, "a");
3333

3434
s.find(s) == 0;
3535
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith
36-
// CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s, s);{{$}}
36+
// CHECK-FIXES: absl::StartsWith(s, s);
3737

3838
s.find("aaa") != 0;
3939
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith
40-
// CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, "aaa");{{$}}
40+
// CHECK-FIXES: !absl::StartsWith(s, "aaa");
4141

4242
s.find(foo(foo(bar()))) != 0;
4343
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith
44-
// CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, foo(foo(bar())));{{$}}
44+
// CHECK-FIXES: !absl::StartsWith(s, foo(foo(bar())));
4545

4646
if (s.find("....") == 0) { /* do something */ }
4747
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use absl::StartsWith
48-
// CHECK-FIXES: {{^[[:space:]]*}}if (absl::StartsWith(s, "....")) { /* do something */ }{{$}}
48+
// CHECK-FIXES: if (absl::StartsWith(s, "....")) { /* do something */ }
4949

5050
0 != s.find("a");
5151
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith
52-
// CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, "a");{{$}}
52+
// CHECK-FIXES: !absl::StartsWith(s, "a");
5353

5454
s2.find("a") == 0;
5555
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith
56-
// CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s2, "a");{{$}}
56+
// CHECK-FIXES: absl::StartsWith(s2, "a");
5757

5858
s.rfind("a", 0) == 0;
5959
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith instead of rfind() == 0 [abseil-string-find-startswith]
60-
// CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s, "a");{{$}}
60+
// CHECK-FIXES: absl::StartsWith(s, "a");
6161

6262
s.rfind(s, 0) == 0;
6363
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith
64-
// CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s, s);{{$}}
64+
// CHECK-FIXES: absl::StartsWith(s, s);
6565

6666
s.rfind("aaa", 0) != 0;
6767
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith
68-
// CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, "aaa");{{$}}
68+
// CHECK-FIXES: !absl::StartsWith(s, "aaa");
6969

7070
s.rfind(foo(foo(bar())), 0) != 0;
7171
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith
72-
// CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, foo(foo(bar())));{{$}}
72+
// CHECK-FIXES: !absl::StartsWith(s, foo(foo(bar())));
7373

7474
if (s.rfind("....", 0) == 0) { /* do something */ }
7575
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use absl::StartsWith
76-
// CHECK-FIXES: {{^[[:space:]]*}}if (absl::StartsWith(s, "....")) { /* do something */ }{{$}}
76+
// CHECK-FIXES: if (absl::StartsWith(s, "....")) { /* do something */ }
7777

7878
0 != s.rfind("a", 0);
7979
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith
80-
// CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, "a");{{$}}
80+
// CHECK-FIXES: !absl::StartsWith(s, "a");
8181

8282
s2.rfind("a", 0) == 0;
8383
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith
84-
// CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s2, "a");{{$}}
84+
// CHECK-FIXES: absl::StartsWith(s2, "a");
8585

8686
sv.find("a") == 0;
8787
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith
88-
// CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(sv, "a");{{$}}
88+
// CHECK-FIXES: absl::StartsWith(sv, "a");
8989

9090
sv.rfind("a", 0) != 0;
9191
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith
92-
// CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(sv, "a");{{$}}
92+
// CHECK-FIXES: !absl::StartsWith(sv, "a");
9393

9494
// expressions that don't trigger the check are here.
9595
A_MACRO(s.find("a"), 0);

Diff for: clang-tools-extra/test/clang-tidy/checkers/bugprone/reserved-identifier-c.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ void f__o__o(void);
77
void f_________oo(void);
88
void __foo(void);
99
// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: declaration uses identifier '__foo', which is a reserved identifier [bugprone-reserved-identifier]
10-
// CHECK-FIXES: {{^}}void foo(void);{{$}}
10+
// CHECK-FIXES: void foo(void);

Diff for: clang-tools-extra/test/clang-tidy/checkers/bugprone/reserved-identifier.cpp

+36-36
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,35 @@
88

99
#define _MACRO(m) int m = 0
1010
// CHECK-MESSAGES: :[[@LINE-1]]:9: warning: declaration uses identifier '_MACRO', which is a reserved identifier [bugprone-reserved-identifier]
11-
// CHECK-FIXES: {{^}}#define MACRO(m) int m = 0{{$}}
11+
// CHECK-FIXES: #define MACRO(m) int m = 0
1212

1313
namespace _Ns {
1414
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: declaration uses identifier '_Ns', which is a reserved identifier [bugprone-reserved-identifier]
15-
// CHECK-FIXES: {{^}}namespace Ns {{{$}}
15+
// CHECK-FIXES: namespace Ns {
1616

1717
class _Object {
1818
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier '_Object', which is a reserved identifier [bugprone-reserved-identifier]
19-
// CHECK-FIXES: {{^}}class Object {{{$}}
19+
// CHECK-FIXES: class Object {
2020
int _Member;
2121
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier '_Member', which is a reserved identifier [bugprone-reserved-identifier]
22-
// CHECK-FIXES: {{^}} int Member;{{$}}
22+
// CHECK-FIXES: int Member;
2323
};
2424

2525
float _Global;
2626
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier '_Global', which is a reserved identifier [bugprone-reserved-identifier]
27-
// CHECK-FIXES: {{^}}float Global;{{$}}
27+
// CHECK-FIXES: float Global;
2828

2929
void _Function() {}
3030
// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: declaration uses identifier '_Function', which is a reserved identifier [bugprone-reserved-identifier]
31-
// CHECK-FIXES: {{^}}void Function() {}{{$}}
31+
// CHECK-FIXES: void Function() {}
3232

3333
using _Alias = int;
3434
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier '_Alias', which is a reserved identifier [bugprone-reserved-identifier]
35-
// CHECK-FIXES: {{^}}using Alias = int;{{$}}
35+
// CHECK-FIXES: using Alias = int;
3636

3737
template <typename _TemplateParam>
3838
// CHECK-MESSAGES: :[[@LINE-1]]:20: warning: declaration uses identifier '_TemplateParam', which is a reserved identifier [bugprone-reserved-identifier]
39-
// CHECK-FIXES: {{^}}template <typename TemplateParam>{{$}}
39+
// CHECK-FIXES: template <typename TemplateParam>
4040
struct S {};
4141

4242
} // namespace _Ns
@@ -45,34 +45,34 @@ struct S {};
4545

4646
#define __macro(m) int m = 0
4747
// CHECK-MESSAGES: :[[@LINE-1]]:9: warning: declaration uses identifier '__macro', which is a reserved identifier [bugprone-reserved-identifier]
48-
// CHECK-FIXES: {{^}}#define _macro(m) int m = 0{{$}}
48+
// CHECK-FIXES: #define _macro(m) int m = 0
4949

5050
namespace __ns {
5151
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: declaration uses identifier '__ns', which is a reserved identifier [bugprone-reserved-identifier]
52-
// CHECK-FIXES: {{^}}namespace ns {{{$}}
52+
// CHECK-FIXES: namespace ns {
5353
class __object {
5454
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier '__object', which is a reserved identifier [bugprone-reserved-identifier]
55-
// CHECK-FIXES: {{^}}class _object {{{$}}
55+
// CHECK-FIXES: class _object {
5656
int __member;
5757
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier '__member', which is a reserved identifier [bugprone-reserved-identifier]
58-
// CHECK-FIXES: {{^}} int _member;{{$}}
58+
// CHECK-FIXES: int _member;
5959
};
6060

6161
float __global;
6262
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier '__global', which is a reserved identifier [bugprone-reserved-identifier]
63-
// CHECK-FIXES: {{^}}float _global;{{$}}
63+
// CHECK-FIXES: float _global;
6464

6565
void __function() {}
6666
// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: declaration uses identifier '__function', which is a reserved identifier [bugprone-reserved-identifier]
67-
// CHECK-FIXES: {{^}}void _function() {}{{$}}
67+
// CHECK-FIXES: void _function() {}
6868

6969
using __alias = int;
7070
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier '__alias', which is a reserved identifier [bugprone-reserved-identifier]
71-
// CHECK-FIXES: {{^}}using _alias = int;{{$}}
71+
// CHECK-FIXES: using _alias = int;
7272

7373
template <typename __templateParam>
7474
// CHECK-MESSAGES: :[[@LINE-1]]:20: warning: declaration uses identifier '__templateParam', which is a reserved identifier [bugprone-reserved-identifier]
75-
// CHECK-FIXES: {{^}}template <typename _templateParam>{{$}}
75+
// CHECK-FIXES: template <typename _templateParam>
7676
struct S {};
7777

7878
} // namespace __ns
@@ -81,34 +81,34 @@ struct S {};
8181

8282
#define macro___m(m) int m = 0
8383
// CHECK-MESSAGES: :[[@LINE-1]]:9: warning: declaration uses identifier 'macro___m', which is a reserved identifier [bugprone-reserved-identifier]
84-
// CHECK-FIXES: {{^}}#define macro_m(m) int m = 0{{$}}
84+
// CHECK-FIXES: #define macro_m(m) int m = 0
8585

8686
namespace ns___n {
8787
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: declaration uses identifier 'ns___n', which is a reserved identifier [bugprone-reserved-identifier]
88-
// CHECK-FIXES: {{^}}namespace ns_n {{{$}}
88+
// CHECK-FIXES: namespace ns_n {
8989
class object___o {
9090
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier 'object___o', which is a reserved identifier [bugprone-reserved-identifier]
91-
// CHECK-FIXES: {{^}}class object_o {{{$}}
91+
// CHECK-FIXES: class object_o {
9292
int member___m;
9393
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier 'member___m', which is a reserved identifier [bugprone-reserved-identifier]
94-
// CHECK-FIXES: {{^}} int member_m;{{$}}
94+
// CHECK-FIXES: int member_m;
9595
};
9696

9797
float global___g;
9898
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier 'global___g', which is a reserved identifier [bugprone-reserved-identifier]
99-
// CHECK-FIXES: {{^}}float global_g;{{$}}
99+
// CHECK-FIXES: float global_g;
100100

101101
void function___f() {}
102102
// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: declaration uses identifier 'function___f', which is a reserved identifier [bugprone-reserved-identifier]
103-
// CHECK-FIXES: {{^}}void function_f() {}{{$}}
103+
// CHECK-FIXES: void function_f() {}
104104

105105
using alias___a = int;
106106
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier 'alias___a', which is a reserved identifier [bugprone-reserved-identifier]
107-
// CHECK-FIXES: {{^}}using alias_a = int;{{$}}
107+
// CHECK-FIXES: using alias_a = int;
108108

109109
template <typename templateParam___t>
110110
// CHECK-MESSAGES: :[[@LINE-1]]:20: warning: declaration uses identifier 'templateParam___t', which is a reserved identifier [bugprone-reserved-identifier]
111-
// CHECK-FIXES: {{^}}template <typename templateParam_t>{{$}}
111+
// CHECK-FIXES: template <typename templateParam_t>
112112
struct S {};
113113

114114
} // namespace ns___n
@@ -121,55 +121,55 @@ struct S {};
121121

122122
namespace _ns {
123123
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: declaration uses identifier '_ns', which is reserved in the global namespace [bugprone-reserved-identifier]
124-
// CHECK-FIXES: {{^}}namespace ns {{{$}}
124+
// CHECK-FIXES: namespace ns {
125125
int _i;
126126
// no warning
127127
} // namespace _ns
128128
class _object {
129129
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier '_object', which is reserved in the global namespace [bugprone-reserved-identifier]
130-
// CHECK-FIXES: {{^}}class object {{{$}}
130+
// CHECK-FIXES: class object {
131131
int _member;
132132
// no warning
133133
};
134134
float _global;
135135
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier '_global', which is reserved in the global namespace [bugprone-reserved-identifier]
136-
// CHECK-FIXES: {{^}}float global;{{$}}
136+
// CHECK-FIXES: float global;
137137
void _function() {}
138138
// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: declaration uses identifier '_function', which is reserved in the global namespace [bugprone-reserved-identifier]
139-
// CHECK-FIXES: {{^}}void function() {}{{$}}
139+
// CHECK-FIXES: void function() {}
140140
using _alias = int;
141141
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration uses identifier '_alias', which is reserved in the global namespace [bugprone-reserved-identifier]
142-
// CHECK-FIXES: {{^}}using alias = int;{{$}}
142+
// CHECK-FIXES: using alias = int;
143143
template <typename _templateParam> // no warning, template params are not in the global namespace
144144
struct S {};
145145

146146
void _float() {}
147147
// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: declaration uses identifier '_float', which is reserved in the global namespace; cannot be fixed because 'float' would conflict with a keyword [bugprone-reserved-identifier]
148-
// CHECK-FIXES: {{^}}void _float() {}{{$}}
148+
// CHECK-FIXES: void _float() {}
149149

150150
#define SOME_MACRO
151151
int SOME__MACRO;
152152
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: declaration uses identifier 'SOME__MACRO', which is a reserved identifier; cannot be fixed because 'SOME_MACRO' would conflict with a macro definition [bugprone-reserved-identifier]
153-
// CHECK-FIXES: {{^}}int SOME__MACRO;{{$}}
153+
// CHECK-FIXES: int SOME__MACRO;
154154

155155
void _TWO__PROBLEMS() {}
156156
// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: declaration uses identifier '_TWO__PROBLEMS', which is a reserved identifier [bugprone-reserved-identifier]
157-
// CHECK-FIXES: {{^}}void TWO_PROBLEMS() {}{{$}}
157+
// CHECK-FIXES: void TWO_PROBLEMS() {}
158158
void _two__problems() {}
159159
// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: declaration uses identifier '_two__problems', which is a reserved identifier [bugprone-reserved-identifier]
160-
// CHECK-FIXES: {{^}}void two_problems() {}{{$}}
160+
// CHECK-FIXES: void two_problems() {}
161161

162162
int __;
163163
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: declaration uses identifier '__', which is a reserved identifier; cannot be fixed automatically [bugprone-reserved-identifier]
164-
// CHECK-FIXES: {{^}}int __;{{$}}
164+
// CHECK-FIXES: int __;
165165

166166
int _________;
167167
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: declaration uses identifier '_________', which is a reserved identifier; cannot be fixed automatically [bugprone-reserved-identifier]
168-
// CHECK-FIXES: {{^}}int _________;{{$}}
168+
// CHECK-FIXES: int _________;
169169

170170
int _;
171171
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: declaration uses identifier '_', which is reserved in the global namespace; cannot be fixed automatically [bugprone-reserved-identifier]
172-
// CHECK-FIXES: {{^}}int _;{{$}}
172+
// CHECK-FIXES: int _;
173173

174174
// This should not trigger a warning
175175
// https://github.com/llvm/llvm-project/issues/52895

Diff for: clang-tools-extra/test/clang-tidy/checkers/google/readability-casting.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,32 @@ void f(int a, double b, const char *cpc, const void *cpv, X *pX) {
1616
Typedef1 t1;
1717
(Typedef2)t1;
1818
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting]
19-
// CHECK-FIXES: {{^}} static_cast<Typedef2>(t1);
19+
// CHECK-FIXES: static_cast<Typedef2>(t1);
2020
(const char*)t1;
2121
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: {{.*}}; use static_cast (if needed
22-
// CHECK-FIXES: {{^}} static_cast<const char*>(t1);
22+
// CHECK-FIXES: static_cast<const char*>(t1);
2323
(Typedef1)cpc;
2424
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: {{.*}}; use static_cast (if needed
25-
// CHECK-FIXES: {{^}} static_cast<Typedef1>(cpc);
25+
// CHECK-FIXES: static_cast<Typedef1>(cpc);
2626
(Typedef1)t1;
2727
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: redundant cast to the same type
28-
// CHECK-FIXES: {{^}} t1;
28+
// CHECK-FIXES: t1;
2929

3030
char *pc = (char*)cpc;
3131
// CHECK-MESSAGES: :[[@LINE-1]]:14: warning: C-style casts are discouraged; use const_cast [google-readability-casting]
3232
// CHECK-FIXES: char *pc = const_cast<char*>(cpc);
3333
typedef char Char;
3434
Char *pChar = (Char*)pc;
3535
// CHECK-MESSAGES: :[[@LINE-1]]:17: warning: {{.*}}; use static_cast (if needed
36-
// CHECK-FIXES: {{^}} Char *pChar = static_cast<Char*>(pc);
36+
// CHECK-FIXES: Char *pChar = static_cast<Char*>(pc);
3737

3838
(Char)*cpc;
3939
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: {{.*}}; use static_cast (if needed
40-
// CHECK-FIXES: {{^}} static_cast<Char>(*cpc);
40+
// CHECK-FIXES: static_cast<Char>(*cpc);
4141

4242
(char)*pChar;
4343
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: {{.*}}; use static_cast (if needed
44-
// CHECK-FIXES: {{^}} static_cast<char>(*pChar);
44+
// CHECK-FIXES: static_cast<char>(*pChar);
4545

4646
(const char*)cpv;
4747
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: {{.*}}; use static_cast [
@@ -124,24 +124,24 @@ void f(int a, double b, const char *cpc, const void *cpv, X *pX) {
124124

125125
e = (Enum)Enum1;
126126
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: redundant cast to the same type
127-
// CHECK-FIXES: {{^}} e = Enum1;
127+
// CHECK-FIXES: e = Enum1;
128128

129129
e = (Enum)e;
130130
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: redundant cast to the same type
131-
// CHECK-FIXES: {{^}} e = e;
131+
// CHECK-FIXES: e = e;
132132

133133
e = (Enum) e;
134134
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: redundant cast to the same type
135-
// CHECK-FIXES: {{^}} e = e;
135+
// CHECK-FIXES: e = e;
136136

137137
e = (Enum) (e);
138138
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: redundant cast to the same type
139-
// CHECK-FIXES: {{^}} e = (e);
139+
// CHECK-FIXES: e = (e);
140140

141141
static const int kZero = 0;
142142
(int)kZero;
143143
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: redundant cast to the same type
144-
// CHECK-FIXES: {{^}} kZero;
144+
// CHECK-FIXES: kZero;
145145

146146
int b2 = static_cast<double>(b);
147147
int b3 = b;

Diff for: clang-tools-extra/test/clang-tidy/checkers/llvm/qualified-auto.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ const int *getCIntPtr();
1010
void foo() {
1111
auto NakedPtr = getIntPtr();
1212
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: 'auto NakedPtr' can be declared as 'auto *NakedPtr'
13-
// CHECK-FIXES: {{^}} auto *NakedPtr = getIntPtr();
13+
// CHECK-FIXES: auto *NakedPtr = getIntPtr();
1414
auto NakedConstPtr = getCIntPtr();
1515
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: 'auto NakedConstPtr' can be declared as 'const auto *NakedConstPtr'
16-
// CHECK-FIXES: {{^}} const auto *NakedConstPtr = getCIntPtr();
16+
// CHECK-FIXES: const auto *NakedConstPtr = getCIntPtr();
1717
auto *Ptr = getIntPtr();
1818
auto *ConstPtr = getCIntPtr();
1919
auto &NakedRef = *getIntPtr();

0 commit comments

Comments
 (0)