[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 19 00:00:47 PST 2024


================
@@ -0,0 +1,220 @@
+// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field -Wreturn-stack-address -verify %s
+
+#include "Inputs/lifetime-analysis.h"
----------------
usx95 wrote:

> > I think it would be much more readable if we would have a namespace per use case or set of use cases where everything relevant to that use case would be declared/defined and used.
> 
> +1, I think the test can be improved by having a dedicated namespace per use case.

Done.
I will also incline towards not splitting it the test further.
Happy to address more suggestions to make this readable and organised.

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


More information about the cfe-commits mailing list