[clang] [NFC][analyzer] Spread use of 'Expr*' instead of 'Stmt*' (PR #188319)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 2 04:40:53 PDT 2026
================
@@ -259,7 +259,10 @@ class CallEvent {
virtual RuntimeDefinition getRuntimeDefinition() const = 0;
/// Returns the expression whose value will be the result of this call.
- /// May be null.
+ /// As of now, returns null if and only if 'this' is a CXXDestructorCall.
+ /// This virtual method is overridden in derived classes to cast the origin
+ /// expression to a more specific type (e.g. in ObjCMethodCall it returns
+ /// 'cast<ObjCMessageExpr>(CallEvent::getOriginExpr)').
----------------
NagyDonat wrote:
I shortened it to `Null if and only if 'this' is a CXXDestructorCall.` in https://github.com/llvm/llvm-project/pull/188319/commits/2a391aea54aaa44ded6ca9d0b870a4107e77333c
I still prefer my original, longer comment, because without those three extra lines, the reader needs to "jump to references" and check a dozen overrides to understand the behavior of this `virtual` method; but this is the minimum that I find useful.
https://github.com/llvm/llvm-project/pull/188319
More information about the cfe-commits
mailing list