summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-24 17:30:51 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-24 17:30:51 +0100
commit09768d8ee4099907569bb27311eb35377fcde5cc (patch)
treea675b301101cda7bb68e4600fedf08fdfd95db2d
parente2eaaa8a578fff5770a99e3f8ee2a7c95c460891 (diff)
Use proper check for FunctionProtoType
...as at least MSVC SAL_CALL-annotated functions have an AttributeType wrapped around the FunctionProtoType. Change-Id: Ic085e2e3649e6b2fc8ca380047133a8edbe20589
-rw-r--r--compilerplugins/clang/dynexcspec.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/dynexcspec.cxx b/compilerplugins/clang/dynexcspec.cxx
index d92bf4f560dd..7ca7ba0ac576 100644
--- a/compilerplugins/clang/dynexcspec.cxx
+++ b/compilerplugins/clang/dynexcspec.cxx
@@ -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;
}