<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Jul 3, 2018, at 9:01 PM, Richard Smith via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, 2 Jul 2018 at 11:09, George Karpenkov via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br class="">
<br class="">
Quite a bit of code in the static analyzer is either duplicated or is using roundabout constructs<br class="">
to deal in the same way with calls of different type: CallExpr, CXXConstructExpr, ObjCMessageExpr.<br class="">
<br class="">
What would be the objections against introducing a very simple abstract superclass for those?<br class="">
Only a few methods would be required:<br class="">
<br class="">
- arguments() and iterators over those<br class="">
- return type<br class="">
- source location<br class=""></blockquote><div class=""><br class=""></div><div class="">That seems reasonable to me (though as Artem points out, only arguments() seems relevant). Maybe InvokeExpr? (That matches the terminology the C++ standard uses, at least.)</div></div></div></div></blockquote><div><br class=""></div>I'd suggest avoiding "invoke" just because of the precedent of LLVM's call vs. invoke. AbstractCallExpr seems reasonable to me.</div><div><br class=""></div><div>John.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class=""></div><div class="">It'd probably be useful to have a getDirectCallee() member or similar too.</div></div></div>
_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></div></blockquote></div><br class=""></body></html>