On Mon, Jul 6, 2015 at 4:57 PM Aaron Ballman <[email protected]> wrote:
> On Mon, Jul 6, 2015 at 7:52 PM, Eric Christopher <[email protected]> > wrote: > > Author: echristo > > Date: Mon Jul 6 18:52:01 2015 > > New Revision: 241526 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=241526&view=rev > > Log: > > Update target attribute support for post-commit feedback. > > > > Use const auto rather than duplicating the type name and fix the > > error message when the attribute is applied to an incorrect entity. > > Thank you for this (one comment below)! > > > > > Modified: > > cfe/trunk/include/clang/Basic/Attr.td > > cfe/trunk/lib/CodeGen/CGCall.cpp > > > > Modified: cfe/trunk/include/clang/Basic/Attr.td > > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=241526&r1=241525&r2=241526&view=diff > > > ============================================================================== > > --- cfe/trunk/include/clang/Basic/Attr.td (original) > > +++ cfe/trunk/include/clang/Basic/Attr.td Mon Jul 6 18:52:01 2015 > > @@ -1277,7 +1277,7 @@ def Target : InheritableAttr { > > let Spellings = [GCC<"target">]; > > let Args = [StringArgument<"features">]; > > let Subjects = > > - SubjectList<[Function], ErrorDiag, > "ExpectedFunctionMethodOrClass">; > > + SubjectList<[Function], ErrorDiag, "ExpectedFunction">; > > You can actually elide the ExpectedFunction part as well. The tablegen > smarts handle the easy cases for you. > > Hey, cool, thanks :) Done thusly: dzur:~/sources/llvm/tools/clang> git svn dcommit Committing to https://llvm.org/svn/llvm-project/cfe/trunk ... M include/clang/Basic/Attr.td Committed r241529 -eric > ~Aaron > > > let Documentation = [Undocumented]; > > } > > > > > > Modified: cfe/trunk/lib/CodeGen/CGCall.cpp > > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=241526&r1=241525&r2=241526&view=diff > > > ============================================================================== > > --- cfe/trunk/lib/CodeGen/CGCall.cpp (original) > > +++ cfe/trunk/lib/CodeGen/CGCall.cpp Mon Jul 6 18:52:01 2015 > > @@ -1506,7 +1506,7 @@ void CodeGenModule::ConstructAttributeLi > > > > const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(TargetDecl); > > if (FD) { > > - if (const TargetAttr *TD = FD->getAttr<TargetAttr>()) { > > + if (const auto *TD = FD->getAttr<TargetAttr>()) { > > StringRef FeaturesStr = TD->getFeatures(); > > SmallVector<StringRef, 1> AttrFeatures; > > FeaturesStr.split(AttrFeatures, ","); > > > > > > _______________________________________________ > > cfe-commits mailing list > > [email protected] > > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
