Use proper check for FunctionProtoType

...as at least MSVC SAL_CALL-annotated functions have an AttributeType wrapped
around the FunctionProtoType.

Change-Id: Ic085e2e3649e6b2fc8ca380047133a8edbe20589
This commit is contained in:
Stephan Bergmann
2017-01-24 17:30:51 +01:00
parent e2eaaa8a57
commit 09768d8ee4

View File

@@ -47,7 +47,7 @@ public:
if (ignoreLocation(decl)) {
return true;
}
auto proto = dyn_cast<FunctionProtoType>(decl->getType());
auto proto = decl->getType()->getAs<FunctionProtoType>();
if (proto == nullptr || proto->getExceptionSpecType() != EST_Dynamic) {
return true;
}