aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/TargetAttributesSema.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/TargetAttributesSema.cpp')
-rw-r--r--lib/Sema/TargetAttributesSema.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/TargetAttributesSema.cpp b/lib/Sema/TargetAttributesSema.cpp
index 1ea0299103..35e42fb696 100644
--- a/lib/Sema/TargetAttributesSema.cpp
+++ b/lib/Sema/TargetAttributesSema.cpp
@@ -87,7 +87,8 @@ static void HandleX86ForceAlignArgPointerAttr(Decl *D,
return;
// Also don't warn on function pointer typedefs.
TypedefDecl *TD = dyn_cast<TypedefDecl>(D);
- if (TD && TD->getUnderlyingType()->isFunctionPointerType())
+ if (TD && (TD->getUnderlyingType()->isFunctionPointerType() ||
+ TD->getUnderlyingType()->isFunctionType()))
return;
// Attribute can only be applied to function types.
if (!isa<FunctionDecl>(D)) {