diff options
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index d63151ef6759..849e978e2d86 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -5399,9 +5399,11 @@ Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, // that the callee might not preserve them. This is easy to diagnose here, // but can be very challenging to debug. if (auto *Caller = getCurFunctionDecl()) - if (Caller->hasAttr<ARMInterruptAttr>()) - if (!FDecl || !FDecl->hasAttr<ARMInterruptAttr>()) + if (Caller->hasAttr<ARMInterruptAttr>()) { + bool VFP = Context.getTargetInfo().hasFeature("vfp"); + if (VFP && (!FDecl || !FDecl->hasAttr<ARMInterruptAttr>())) Diag(Fn->getExprLoc(), diag::warn_arm_interrupt_calling_convention); + } // Promote the function operand. // We special-case function promotion here because we only allow promoting |