<div dir="ltr">Can you add test cases here (at least for the 'mode' attribute)?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 28, 2013 at 4:13 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: aaronballman<br>
Date: Wed Aug 28 18:13:26 2013<br>
New Revision: 189532<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=189532&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=189532&view=rev</a><br>
Log:<br>
Mode is now handled as a non-inheritable attribute, and CUDADevice & CUDAHost are now handled as inheritable attributes. In all three cases, this makes the processing behavior more consistent with the declared behavior in Attr.td.<br>
<br>
Modified:<br>
cfe/trunk/lib/Sema/SemaDeclAttr.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=189532&r1=189531&r2=189532&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=189532&r1=189531&r2=189532&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Wed Aug 28 18:13:26 2013<br>
@@ -4678,9 +4678,8 @@ static void handleSelectAnyAttr(Sema &S,<br>
static void ProcessNonInheritableDeclAttr(Sema &S, Scope *scope, Decl *D,<br>
const AttributeList &Attr) {<br>
switch (Attr.getKind()) {<br>
- case AttributeList::AT_CUDADevice: handleDeviceAttr (S, D, Attr); break;<br>
- case AttributeList::AT_CUDAHost: handleHostAttr (S, D, Attr); break;<br>
case AttributeList::AT_Overloadable:handleOverloadableAttr(S, D, Attr); break;<br>
+ case AttributeList::AT_Mode: handleModeAttr (S, D, Attr); break;<br>
default:<br>
break;<br>
}<br>
@@ -4705,8 +4704,7 @@ static void ProcessInheritableDeclAttr(S<br>
// Ignore these, these are type attributes, handled by<br>
// ProcessTypeAttributes.<br>
break;<br>
- case AttributeList::AT_CUDADevice:<br>
- case AttributeList::AT_CUDAHost:<br>
+ case AttributeList::AT_Mode:<br>
case AttributeList::AT_Overloadable:<br>
// Ignore, this is a non-inheritable attribute, handled<br>
// by ProcessNonInheritableDeclAttr.<br>
@@ -4743,11 +4741,12 @@ static void ProcessInheritableDeclAttr(S<br>
case AttributeList::AT_Format: handleFormatAttr (S, D, Attr); break;<br>
case AttributeList::AT_FormatArg: handleFormatArgAttr (S, D, Attr); break;<br>
case AttributeList::AT_CUDAGlobal: handleGlobalAttr (S, D, Attr); break;<br>
+ case AttributeList::AT_CUDADevice: handleDeviceAttr (S, D, Attr); break;<br>
+ case AttributeList::AT_CUDAHost: handleHostAttr (S, D, Attr); break;<br>
case AttributeList::AT_GNUInline: handleGNUInlineAttr (S, D, Attr); break;<br>
case AttributeList::AT_CUDALaunchBounds:<br>
handleLaunchBoundsAttr(S, D, Attr);<br>
break;<br>
- case AttributeList::AT_Mode: handleModeAttr (S, D, Attr); break;<br>
case AttributeList::AT_Malloc: handleMallocAttr (S, D, Attr); break;<br>
case AttributeList::AT_MayAlias: handleMayAliasAttr (S, D, Attr); break;<br>
case AttributeList::AT_NoCommon: handleNoCommonAttr (S, D, Attr); break;<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>