summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2010-02-18 04:56:59 +0000
committerCharles Davis <cdavis@mines.edu>2010-02-18 04:56:59 +0000
commit9fcead75eefdc7b359012610d73197015f0a0dd8 (patch)
tree8a7e10169d637cf641ff9ff049dc337bd3868c36 /clang/lib
parentc451027db973e6906112e698f1cfc1540453e807 (diff)
downloadbcm5719-llvm-9fcead75eefdc7b359012610d73197015f0a0dd8.tar.gz
bcm5719-llvm-9fcead75eefdc7b359012610d73197015f0a0dd8.zip
Also don't warn about force_align_arg_pointer on function typedefs. (This will
break if you declare an actual function using that typedef. Come to think of it, maybe I should make this part of the type.) llvm-svn: 96570
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