summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/performance-inefficient-string-concatenation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/performance-inefficient-string-concatenation.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/performance-inefficient-string-concatenation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/performance-inefficient-string-concatenation.cpp b/clang-tools-extra/test/clang-tidy/performance-inefficient-string-concatenation.cpp
index f4b293a04bf..1dbd56b3222 100644
--- a/clang-tools-extra/test/clang-tidy/performance-inefficient-string-concatenation.cpp
+++ b/clang-tools-extra/test/clang-tidy/performance-inefficient-string-concatenation.cpp
@@ -19,6 +19,8 @@ std::string g(std::string) {}
int main() {
std::string mystr1, mystr2;
std::wstring mywstr1, mywstr2;
+ auto myautostr1 = mystr1;
+ auto myautostr2 = mystr2;
for (int i = 0; i < 10; ++i) {
f(mystr1 + mystr2 + mystr1);
@@ -33,6 +35,8 @@ int main() {
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: string concatenation
mywstr1 = mywstr2 + mywstr2 + mywstr2;
// CHECK-MESSAGES: :[[@LINE-1]]:33: warning: string concatenation
+ myautostr1 = myautostr1 + myautostr2;
+ // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: string concatenation
mywstr1 = mywstr2 + mywstr2;
mystr1 = mystr2 + mystr2;
OpenPOWER on IntegriCloud