[cfe-dev] getFunctionType in CXXMethodDecl

Richard Smith richard at metafoo.co.uk
Wed Feb 18 13:04:25 PST 2015


On Wed, Feb 18, 2015 at 12:14 PM, victor <pedretti_86 at hotmail.com> wrote:

> Hi,
>
> I want to know if a method is marked as "hasNoexceptExceptionSpec
> <http://clang.llvm.org/doxygen/classclang_1_1FunctionProtoType.html#ab97e6e11a5b6f6c33126e091d09d570e>"
> in FunctionProtoType. To that end, I was trying to call getFunctionType()
> on the method, but:
>
> "error: no member named 'getFunctionType
> <http://clang.llvm.org/doxygen/classclang_1_1Decl.html#af10c59874fe7dd00793fc4722c449d86>'
> in 'clang::CXXMethodDecl' "
>
> I'm using clang 3.4, is this method missing in this version? Is there
> another simpler way to know if a function is "noexcept"?
>

MD->getType()->castAs<FunctionProtoType>()->isNothrow(Ctx)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150218/51789439/attachment.html>


More information about the cfe-dev mailing list