[cfe-dev] Superclass for CallExpr | CXXConstructExpr | ObjCMessageExpr
Richard Smith via cfe-dev
cfe-dev at lists.llvm.org
Tue Jul 3 18:01:21 PDT 2018
On Mon, 2 Jul 2018 at 11:09, George Karpenkov via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Quite a bit of code in the static analyzer is either duplicated or is
> using roundabout constructs
> to deal in the same way with calls of different type: CallExpr,
> CXXConstructExpr, ObjCMessageExpr.
> What would be the objections against introducing a very simple abstract
> superclass for those?
> Only a few methods would be required:
> - arguments() and iterators over those
> - return type
> - source location
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.)
It'd probably be useful to have a getDirectCallee() member or similar too.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev