summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-29 01:24:26 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-29 01:24:26 +0000
commit0cdcc98200b8b2c0dea21bae433677f88aae597c (patch)
tree76a13eca3ee3776405ecde8c75ba15be76d1f8bc /clang/lib/Sema/SemaDeclAttr.cpp
parent3c94737fb71acdc3dc91255d11c3ccba496aba8a (diff)
downloadbcm5719-llvm-0cdcc98200b8b2c0dea21bae433677f88aae597c.tar.gz
bcm5719-llvm-0cdcc98200b8b2c0dea21bae433677f88aae597c.zip
Replace AS_MSTypespec with AS_Keyword, for representing any attribute spelled
as a keyword. Rationalize existing attributes to use it as appropriate, and to not lie about some __declspec attributes being GNU attributes. In passing, remove a gross hack which was discarding attributes which we could handle. This results in us actually respecting the __pascal keyword again. llvm-svn: 173746
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index adeb8e690f2..12483a34e02 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -4759,11 +4759,11 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
if (Attr.isInvalid())
return;
- // Type attributes are still treated as declaration attributes by
- // ParseMicrosoftTypeAttributes and ParseBorlandTypeAttributes. We don't
- // want to process them, however, because we will simply warn about ignoring
- // them. So instead, we will bail out early.
- if (Attr.isMSTypespecAttribute())
+ // FIXME: Ignore unknown keyword attributes for now. We see this in the case
+ // of some Borland attributes, like __pascal.
+ // FIXME: Add these attributes to Attr.td and mark as ignored!
+ if (Attr.isKeywordAttribute() &&
+ Attr.getKind() == AttributeList::UnknownAttribute)
return;
// Ignore C++11 attributes on declarator chunks: they appertain to the type
OpenPOWER on IntegriCloud