Skip to content

Commit 3dbc0e0

Browse files
authored
merge main into amd-staging (llvm#1723)
2 parents 10590e8 + 7673145 commit 3dbc0e0

File tree

176 files changed

+3863
-1220
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+3863
-1220
lines changed

clang-tools-extra/pp-trace/PPCallbacksTracker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,8 @@ void PPCallbacksTracker::appendArgument(const char *Name, ModuleIdPath Value) {
547547
if (I)
548548
SS << ", ";
549549
SS << "{"
550-
<< "Name: " << Value[I].first->getName() << ", "
551-
<< "Loc: " << getSourceLocationString(PP, Value[I].second) << "}";
550+
<< "Name: " << Value[I].getIdentifierInfo()->getName() << ", "
551+
<< "Loc: " << getSourceLocationString(PP, Value[I].getLoc()) << "}";
552552
}
553553
SS << "]";
554554
appendArgument(Name, SS.str());

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

Lines changed: 16 additions & 16 deletions
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);

clang-tools-extra/test/clang-tidy/checkers/bugprone/misplaced-operator-in-strlen-in-alloc.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,43 +19,43 @@ size_t wcsnlen_s(const wchar_t *, size_t);
1919
void bad_malloc(char *name) {
2020
char *new_name = (char *)malloc(strlen(name + 1));
2121
// CHECK-MESSAGES: :[[@LINE-1]]:28: warning: addition operator is applied to the argument of strlen
22-
// CHECK-FIXES: {{^ char \*new_name = \(char \*\)malloc\(}}strlen(name) + 1{{\);$}}
22+
// CHECK-FIXES: char *new_name = (char *)malloc(strlen(name) + 1);
2323
new_name = (char *)malloc(strnlen(name + 1, 10));
2424
// CHECK-MESSAGES: :[[@LINE-1]]:22: warning: addition operator is applied to the argument of strnlen
25-
// CHECK-FIXES: {{^ new_name = \(char \*\)malloc\(}}strnlen(name, 10) + 1{{\);$}}
25+
// CHECK-FIXES: new_name = (char *)malloc(strnlen(name, 10) + 1);
2626
new_name = (char *)malloc(strnlen_s(name + 1, 10));
2727
// CHECK-MESSAGES: :[[@LINE-1]]:22: warning: addition operator is applied to the argument of strnlen_s
28-
// CHECK-FIXES: {{^ new_name = \(char \*\)malloc\(}}strnlen_s(name, 10) + 1{{\);$}}
28+
// CHECK-FIXES: new_name = (char *)malloc(strnlen_s(name, 10) + 1);
2929
}
3030

3131
void bad_malloc_wide(wchar_t *name) {
3232
wchar_t *new_name = (wchar_t *)malloc(wcslen(name + 1));
3333
// CHECK-MESSAGES: :[[@LINE-1]]:34: warning: addition operator is applied to the argument of wcslen
34-
// CHECK-FIXES: {{^ wchar_t \*new_name = \(wchar_t \*\)malloc\(}}wcslen(name) + 1{{\);$}}
34+
// CHECK-FIXES: wchar_t *new_name = (wchar_t *)malloc(wcslen(name) + 1);
3535
new_name = (wchar_t *)malloc(wcsnlen(name + 1, 10));
3636
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: addition operator is applied to the argument of wcsnlen
37-
// CHECK-FIXES: {{^ new_name = \(wchar_t \*\)malloc\(}}wcsnlen(name, 10) + 1{{\);$}}
37+
// CHECK-FIXES: new_name = (wchar_t *)malloc(wcsnlen(name, 10) + 1);
3838
new_name = (wchar_t *)malloc(wcsnlen_s(name + 1, 10));
3939
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: addition operator is applied to the argument of wcsnlen_s
40-
// CHECK-FIXES: {{^ new_name = \(wchar_t \*\)malloc\(}}wcsnlen_s(name, 10) + 1{{\);$}}
40+
// CHECK-FIXES: new_name = (wchar_t *)malloc(wcsnlen_s(name, 10) + 1);
4141
}
4242

4343
void bad_alloca(char *name) {
4444
char *new_name = (char *)alloca(strlen(name + 1));
4545
// CHECK-MESSAGES: :[[@LINE-1]]:28: warning: addition operator is applied to the argument of strlen
46-
// CHECK-FIXES: {{^ char \*new_name = \(char \*\)alloca\(}}strlen(name) + 1{{\);$}}
46+
// CHECK-FIXES: char *new_name = (char *)alloca(strlen(name) + 1);
4747
}
4848

4949
void bad_calloc(char *name) {
5050
char *new_names = (char *)calloc(2, strlen(name + 1));
5151
// CHECK-MESSAGES: :[[@LINE-1]]:29: warning: addition operator is applied to the argument of strlen
52-
// CHECK-FIXES: {{^ char \*new_names = \(char \*\)calloc\(2, }}strlen(name) + 1{{\);$}}
52+
// CHECK-FIXES: char *new_names = (char *)calloc(2, strlen(name) + 1);
5353
}
5454

5555
void bad_realloc(char *old_name, char *name) {
5656
char *new_name = (char *)realloc(old_name, strlen(name + 1));
5757
// CHECK-MESSAGES: :[[@LINE-1]]:28: warning: addition operator is applied to the argument of strlen
58-
// CHECK-FIXES: {{^ char \*new_name = \(char \*\)realloc\(old_name, }}strlen(name) + 1{{\);$}}
58+
// CHECK-FIXES: char *new_name = (char *)realloc(old_name, strlen(name) + 1);
5959
}
6060

6161
void intentional1(char *name) {
@@ -81,5 +81,5 @@ void (*(*const alloc_ptr)(size_t)) = malloc;
8181
void bad_indirect_alloc(char *name) {
8282
char *new_name = (char *)alloc_ptr(strlen(name + 1));
8383
// CHECK-MESSAGES: :[[@LINE-1]]:28: warning: addition operator is applied to the argument of strlen
84-
// CHECK-FIXES: {{^ char \*new_name = \(char \*\)alloc_ptr\(}}strlen(name) + 1{{\);$}}
84+
// CHECK-FIXES: char *new_name = (char *)alloc_ptr(strlen(name) + 1);
8585
}

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

Lines changed: 1 addition & 1 deletion
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);

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

Lines changed: 36 additions & 36 deletions
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

0 commit comments

Comments
 (0)