================
@@ -3,25 +3,25 @@
// RUN: %clang_analyze_cc1
-analyzer-checker=alpha.cplusplus.LifetimeAnnotations \
// RUN: -analyzer-config c++-container-inlining=false -verify %s
-void clang_analyzer_dump(...);
+struct A {};
-// These are the cases when the result of function calls are MemRegions.
+void clang_analyzer_lifetime_bound(int*);
----------------
benedekaibas wrote:
The variadic function declaration would be cleaner, but I implemented the
`clang_analyzer_lifetime_bound` helper function via `CallDescriptionMap` which
does need the specific type declared otherwise the function does not emit the
warning. I have looked at how `clang_analyzer_dump` is implemented and it works
as a variadic function because the `FnCheck Handler`'s logic uses StringSwitch.
It is possible to rewrite the `CallDescriptionMap` to what `ExprInspection`
checker has in the long term.
https://github.com/llvm/llvm-project/pull/200145
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits