diff options
author | Dan Gohman <gohman@apple.com> | 2010-11-17 17:21:47 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-11-17 17:21:47 +0000 |
commit | 4659e1e2e06983e4de77040315537aa86984cec8 (patch) | |
tree | 4b1e56655ea347c38dc4e8375138d398f421ad6f /lib/Sema/SemaDeclAttr.cpp | |
parent | 89629a746019a42797495b091711a1d68467e88a (diff) |
Drop the warning about __attribute__((may_alias)) being used
on a non-type declaration, as GCC permits it on variables too.
This fixes PR8635.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index d66ae0a554..11ab63ee9d 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -738,12 +738,6 @@ static void HandleMayAliasAttr(Decl *d, const AttributeList &Attr, Sema &S) { return; } - if (!isa<TypeDecl>(d)) { - S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type) - << Attr.getName() << 2 /*variable and function*/; - return; - } - d->addAttr(::new (S.Context) MayAliasAttr(Attr.getLoc(), S.Context)); } |