[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 18 14:27:28 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"
----------------
hokein wrote:
In my experience, a single and well-organized test file works effectively, as it simplifies adding new test cases.
Having multiple files can add overhead, requiring extra effort to determine the right file for each new case. I generally prefer a workflow where new test cases are appended to one main file.
> 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.
https://github.com/llvm/llvm-project/pull/115921
More information about the cfe-commits
mailing list