diff options
Diffstat (limited to 'lib/Sema/TargetAttributesSema.cpp')
-rw-r--r-- | lib/Sema/TargetAttributesSema.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Sema/TargetAttributesSema.cpp b/lib/Sema/TargetAttributesSema.cpp index 597a027696..76cff1f315 100644 --- a/lib/Sema/TargetAttributesSema.cpp +++ b/lib/Sema/TargetAttributesSema.cpp @@ -79,14 +79,12 @@ static void HandleX86ForceAlignArgPointerAttr(Decl *D, return; } - // If we try to apply it to a function pointer, warn. This is a special - // instance of the warn_attribute_ignored warning that can be turned - // off with -Wno-force-align-arg-pointer. + // If we try to apply it to a function pointer, don't warn, but don't + // do anything, either. It doesn't matter anyway, because there's nothing + // special about calling a force_align_arg_pointer function. ValueDecl* VD = dyn_cast<ValueDecl>(D); - if (VD && VD->getType()->isFunctionPointerType()) { - S.Diag(Attr.getLoc(), diag::warn_faap_attribute_ignored); + if (VD && VD->getType()->isFunctionPointerType()) return; - } // Attribute can only be applied to function types. if (!isa<FunctionDecl>(D)) { S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type) |