================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to