diff options
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-init.cpp')
| -rw-r--r-- | clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-init.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-init.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-init.cpp index b88e4a0f4d6..76d1fe97e1b 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-init.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-init.cpp @@ -1,5 +1,4 @@ -// RUN: %check_clang_tidy -std=c++11,c++14 %s readability-redundant-string-init %t -// FIXME: Fix the checker to work in C++17 mode. +// RUN: %check_clang_tidy %s readability-redundant-string-init %t namespace std { template <typename T> @@ -131,6 +130,11 @@ void k() { // CHECK-FIXES: std::string a, b, c; std::string d = "u", e = "u", f = "u"; + + std::string g = "u", h = "", i = "uuu", j = "", k; + // CHECK-MESSAGES: [[@LINE-1]]:24: warning: redundant string initialization + // CHECK-MESSAGES: [[@LINE-2]]:43: warning: redundant string initialization + // CHECK-FIXES: std::string g = "u", h, i = "uuu", j, k; } // These cases should not generate warnings. |

