[clang-tools-extra] af39a17 - [clang-tidy] Enable `modernize-return-braced-init-list`'s tests in C++11 (#158196)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 17 08:55:03 PDT 2025
Author: Victor Chernyakin
Date: 2025-09-17T09:55:00-06:00
New Revision: af39a17a699eb0688782cb5f21412cd391bd44a0
URL: https://github.com/llvm/llvm-project/commit/af39a17a699eb0688782cb5f21412cd391bd44a0
DIFF: https://github.com/llvm/llvm-project/commit/af39a17a699eb0688782cb5f21412cd391bd44a0.diff
LOG: [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.
Added:
Modified:
clang-tools-extra/test/clang-tidy/checkers/modernize/return-braced-init-list.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/return-braced-init-list.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/return-braced-init-list.cpp
index 02e95e15499dc..ae33d25d49152 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/return-braced-init-list.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/return-braced-init-list.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++14-or-later %s modernize-return-braced-init-list %t
+// RUN: %check_clang_tidy -std=c++11-or-later %s modernize-return-braced-init-list %t
namespace std {
typedef decltype(sizeof(int)) size_t;
@@ -80,10 +80,12 @@ Foo f2() {
return {b2};
}
+#if __cplusplus >= 201402L
auto f3() {
Bar b3;
return Foo(b3);
}
+#endif
#define A(b) Foo(b)
More information about the cfe-commits
mailing list