================
@@ -1260,13 +1278,17 @@ void test() {
 
     // Templated tests (generic templates)
     const auto ptrTA = StringTemplateA<char>().data();  // Declaration-only 
attribute // expected-warning {{temporary whose address is used}}
-    // FIXME: Definition is not instantiated until the end of TU. The 
attribute is not merged when this call is processed.
-    const auto ptrTB = StringTemplateB<char>().data();  // Definition-only 
attribute
+    const auto ptrTB = StringTemplateB<char>().data();  // Definition-only 
attribute  // expected-warning {{temporary whose address is used}}
     const auto ptrTC = StringTemplateC<char>().data();  // Both have attribute 
       // expected-warning {{temporary whose address is used}}
 
     // Template specialization tests
     const auto ptrTSA = StringTemplateSpecA<char>().data();  // 
Declaration-only attribute  // expected-warning {{temporary whose address is 
used}}
     const auto ptrTSB = StringTemplateSpecB<char>().data();  // 
Definition-only attribute   // expected-warning {{temporary whose address is 
used}}
     const auto ptrTSC = StringTemplateSpecC<char>().data();  // Both have 
attribute         // expected-warning {{temporary whose address is used}}
+
+    MemberFuncsTpl<int> mtf;
+    const int* pTMA = mtf.memberA(1);  // Declaration-only attribute  // 
expected-warning {{temporary whose address is used}}
+    const int* pTMB = mtf.memberB(2);  // Definition-only attribute   // 
FIXME: Definition-only attribute
----------------
vbvictor wrote:

I can make another issue for it and research later.

https://github.com/llvm/llvm-project/pull/178000
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to