diff options
author | Charles Davis <cdavis@mines.edu> | 2010-02-18 04:56:59 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2010-02-18 04:56:59 +0000 |
commit | e01c063874fa762abfba03b920bca16e1a1f10b4 (patch) | |
tree | d694805faf39df408c04a64c51e97ba731c34dd9 /lib/Sema/TargetAttributesSema.cpp | |
parent | beaf5edfb22dd36b3d0e526291fd3a074404dd3e (diff) |
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.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/TargetAttributesSema.cpp')
-rw-r--r-- | lib/Sema/TargetAttributesSema.cpp | 3 |
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)) { |