diff options
author | Florian Gross <fgross@noexcept.net> | 2017-08-04 19:01:56 +0000 |
---|---|---|
committer | Florian Gross <fgross@noexcept.net> | 2017-08-04 19:01:56 +0000 |
commit | fa857b174d912af8f5217b595d0170ead5c71a62 (patch) | |
tree | 5b3c2760026ba58a630dafaf988d60fc188d20d0 /clang-tools-extra/test/clang-tidy/performance-inefficient-string-concatenation.cpp | |
parent | 4a72b4db55a8ad711ef70d7b80ef60c822ab77f7 (diff) | |
download | bcm5719-llvm-fa857b174d912af8f5217b595d0170ead5c71a62.tar.gz bcm5719-llvm-fa857b174d912af8f5217b595d0170ead5c71a62.zip |
[clang-tidy] Added clang-tidy test cases related to rL310095
Differential Revision: https://reviews.llvm.org/D36308
llvm-svn: 310096
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.cpp | 4 |
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; |