summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/TargetAttributesSema.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/TargetAttributesSema.cpp b/clang/lib/Sema/TargetAttributesSema.cpp
index 1ea02991034..35e42fb696b 100644
--- a/clang/lib/Sema/TargetAttributesSema.cpp
+++ b/clang/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)) {
OpenPOWER on IntegriCloud