[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 15 05:19:44 PDT 2024


================
@@ -107,6 +107,39 @@ namespace std {
 using std::operator""s;
 using std::operator""sv;
 
+namespace default_args {
+  using IntArray = int[];
+  const int *defaultparam1(const int &def1 [[clang::lifetimebound]] = 0); // #def1
----------------
usx95 wrote:

These look like source markers (instead of comment) which are referred by the error messages.

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


More information about the cfe-commits mailing list