[clang] [clang] Output an error when [[lifetimebound]] attribute is applied on a function parameter while the function returns void (PR #113460)

Boaz Brickner via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 25 05:58:54 PDT 2024


================
@@ -31,6 +32,11 @@ namespace usage_ok {
     return *(int*)param;
   }
 
+  template <class T, class R = void> R dependent_void(const T& t [[clang::lifetimebound]]);
+  void dependent_void_instantiation() {
+    dependent_void<int>(1);
----------------
bricknerb wrote:

Done.

https://github.com/llvm/llvm-project/pull/113460


More information about the cfe-commits mailing list