From: Stephen Kelly Date: Mon, 1 Mar 2021 00:33:03 +0000 (+0000) Subject: Add tests which include brace initialization X-Git-Tag: llvmorg-14-init~13815 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40cee381c1779256e039d66ea5d01ad7d344efb7;p=platform%2Fupstream%2Fllvm.git Add tests which include brace initialization --- 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 d637806..3428d45 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(); templ();