================
@@ -1239,6 +1245,60 @@ class CXXDeallocatorCall : public AnyFunctionCall {
}
};
+/// Represents an implicit call to a cleanup function, triggered by a
+/// `__attribute__((cleanup(f)))` variable going out of scope.
+///
+/// The call has no syntactic representation: like \c CXXDestructorCall it is
+/// Decl-origin, and its single argument, the address of the annotated
+/// variable, is not written in the source.
+class CleanupFunctionCall : public AnyFunctionCall {
----------------
necto wrote:
Sure, "result" of a "cleanup" is not very clear. I'm just worried that it might
lead to another surprise and another crash. I remember fixing a crash related
to `getResultType` for a non-void function missing a `return`.
To make it more prominent, let's at least have a test case in the file with all
checkers that would have a non-void cleanup function
https://github.com/llvm/llvm-project/pull/221110
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits