[clang] [clang] Do not infer lifetimebound for functions with void return type (PR #131997)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 21 02:28:04 PDT 2025


================
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -std=c++20 -Wno-ignored-attributes -Wno-unused-value -verify %s
+// expected-no-diagnostics
+namespace std {
+template <class T>
+constexpr const T& as_const(T&) noexcept;
+
+// We need two declarations to see the error for some reason *shrug*
----------------
ilya-biryukov wrote:

NIT: could probably remove **shrug**

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


More information about the cfe-commits mailing list