================
@@ -0,0 +1,12 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=debug.DebugLifetimeAnnotations \
+// RUN: -verify %s
+
+void clang_analyzer_lifetime_bound(int);
+
+// Verify that the DebugLifetimeAnnotations checkre can be used without
+// the LifetimeAnnotations checker being enabled and it does not cause
+// crash.
+void test() {
+ int x = 5;
+ clang_analyzer_lifetime_bound(x); // expected-no-diagnostics
----------------
steakhal wrote:
I'd recommend moving this `expected-no-diagnostics` to the top of this file
because it has global effect - thus not bound to a single line where it sits.
The convention is to have `no-warning: comment...` there to express this.
https://github.com/llvm/llvm-project/pull/200145
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits