Skip to content

Commit af39a17

Browse files
authored
[clang-tidy] Enable modernize-return-braced-init-list's tests in C++11 (#158196)
The check supports C++11, but isn't tested in it.
1 parent 57d67be commit af39a17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang-tools-extra/test/clang-tidy/checkers/modernize/return-braced-init-list.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++14-or-later %s modernize-return-braced-init-list %t
1+
// RUN: %check_clang_tidy -std=c++11-or-later %s modernize-return-braced-init-list %t
22

33
namespace std {
44
typedef decltype(sizeof(int)) size_t;
@@ -80,10 +80,12 @@ Foo f2() {
8080
return {b2};
8181
}
8282

83+
#if __cplusplus >= 201402L
8384
auto f3() {
8485
Bar b3;
8586
return Foo(b3);
8687
}
88+
#endif
8789

8890
#define A(b) Foo(b)
8991

0 commit comments

Comments
 (0)