aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaUtil.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaUtil.h')
-rw-r--r--lib/Sema/SemaUtil.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaUtil.h b/lib/Sema/SemaUtil.h
index 35452b18e6..5c64c76e29 100644
--- a/lib/Sema/SemaUtil.h
+++ b/lib/Sema/SemaUtil.h
@@ -24,8 +24,9 @@ static inline bool isCallBuiltin(CallExpr* cexp) {
Expr* sub = cexp->getCallee()->IgnoreParenCasts();
if (DeclRefExpr* E = dyn_cast<DeclRefExpr>(sub))
- if (E->getDecl()->getIdentifier()->getBuiltinID() > 0)
- return true;
+ if (FunctionDecl *Fn = dyn_cast<FunctionDecl>(E->getDecl()))
+ if (Fn->getBuiltinID() > 0)
+ return true;
return false;
}