r173726 - Finish semantic analysis for [[carries_dependency]] attribute.

Michael Han fragmentshaders at gmail.com
Mon Jan 28 15:42:32 PST 2013


[dcl.attr.depend] also requires [[carries_dependency]] appear at most once
in an attribute list; same for [[noreturn]]. Should this be implemented as
part of semantic analysis for both attributes as well?

Michael

On Mon, Jan 28, 2013 at 2:42 PM, Richard Smith
<richard-llvm at metafoo.co.uk>wrote:

> Author: rsmith
> Date: Mon Jan 28 16:42:45 2013
> New Revision: 173726
>
> URL: http://llvm.org/viewvc/llvm-project?rev=173726&view=rev
> Log:
> Finish semantic analysis for [[carries_dependency]] attribute.
>
> This required plumbing through a new flag to determine whether a
> ParmVarDecl is
> actually a parameter of a function declaration (as opposed to a function
> typedef etc, where the attribute is prohibited). Weirdly, this attribute
> (just
> like [[noreturn]]) cannot be applied to a function type, just to a function
> declaration (and its parameters).
>
> Added:
>     cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp
> Modified:
>     cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
>     cfe/trunk/include/clang/Sema/DeclSpec.h
>     cfe/trunk/include/clang/Sema/Scope.h
>     cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
>     cfe/trunk/lib/Parse/ParseDecl.cpp
>     cfe/trunk/lib/Parse/ParseExprCXX.cpp
>     cfe/trunk/lib/Parse/ParseObjc.cpp
>     cfe/trunk/lib/Parse/Parser.cpp
>     cfe/trunk/lib/Sema/SemaDecl.cpp
>     cfe/trunk/lib/Sema/SemaDeclAttr.cpp
>     cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p1.cpp
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=173726&r1=173725&r2=173726&view=diff
>
> ==============================================================================
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130128/e386de3a/attachment.html>


More information about the cfe-commits mailing list