Author: Stephen Kelly
Date: 2021-03-01T00:34:58Z
New Revision: 40cee381c1779256e039d66ea5d01ad7d344efb7

URL: 
https://github.com/llvm/llvm-project/commit/40cee381c1779256e039d66ea5d01ad7d344efb7
DIFF: 
https://github.com/llvm/llvm-project/commit/40cee381c1779256e039d66ea5d01ad7d344efb7.diff

LOG: Add tests which include brace initialization

Added: 
    

Modified: 
    clang-tools-extra/test/clang-tidy/checkers/bugprone-unused-raii.cpp

Removed: 
    


################################################################################
diff  --git 
a/clang-tools-extra/test/clang-tidy/checkers/bugprone-unused-raii.cpp 
b/clang-tools-extra/test/clang-tidy/checkers/bugprone-unused-raii.cpp
index d637806ba20a..3428d453c63d 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone-unused-raii.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone-unused-raii.cpp
@@ -64,6 +64,13 @@ void test() {
 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: object destroyed immediately after 
creation; did you mean to name the object?
 // CHECK-FIXES: FooBar give_me_a_name;
 
+  Foo{42};
+  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: object destroyed immediately 
after creation; did you mean to name the object?
+  // CHECK-FIXES: Foo give_me_a_name{42};
+  FooBar{};
+  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: object destroyed immediately 
after creation; did you mean to name the object?
+  // CHECK-FIXES: FooBar give_me_a_name;
+
   templ<FooBar>();
   templ<Bar>();
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to