From: Anders Carlsson Date: Fri, 13 Feb 2009 08:16:43 +0000 (+0000) Subject: Add a new Ignored attribute type, and use it for may_alias. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05f8e471aae971c9867dbac148eba1275a570814;p=clang Add a new Ignored attribute type, and use it for may_alias. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64446 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Parse/AttributeList.h b/include/clang/Parse/AttributeList.h index e5384ddbcd..2295c30c90 100644 --- a/include/clang/Parse/AttributeList.h +++ b/include/clang/Parse/AttributeList.h @@ -81,6 +81,7 @@ public: AT_nsobject, AT_cleanup, AT_nodebug, + IgnoredAttribute, UnknownAttribute }; diff --git a/lib/Parse/AttributeList.cpp b/lib/Parse/AttributeList.cpp index 71712b646f..7f18a2c325 100644 --- a/lib/Parse/AttributeList.cpp +++ b/lib/Parse/AttributeList.cpp @@ -89,6 +89,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) { case 9: if (!memcmp(Str, "dllimport", 9)) return AT_dllimport; if (!memcmp(Str, "dllexport", 9)) return AT_dllexport; + if (!memcmp(Str, "may_alias", 9)) return IgnoredAttribute; break; case 10: if (!memcmp(Str, "deprecated", 10)) return AT_deprecated; diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 833a52b815..b585bd544b 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -1372,6 +1372,9 @@ static void ProcessDeclAttribute(Decl *D, const AttributeList &Attr, Sema &S) { case AttributeList::AT_pure: HandlePureAttr (D, Attr, S); break; case AttributeList::AT_cleanup: HandleCleanupAttr (D, Attr, S); break; case AttributeList::AT_nodebug: HandleNodebugAttr (D, Attr, S); break; + case AttributeList::IgnoredAttribute: + // Just ignore + break; default: #if 0 // TODO: when we have the full set of attributes, warn about unknown ones.