[PATCH] D25103: [CUDA] Handle attributes on CUDA lambdas appearing between [...] and (...).

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 30 09:45:02 PDT 2016


rnk added inline comments.


> ParseExprCXX.cpp:1135
> +    // "[...]", even if there is no "(...)" before the lambda body.
> +    MaybeParseGNUAttributes(Attr, &DeclEndLoc);
> +  }

Does nvcc support __declspec style attributes? Maybe we should check for those too?

> ParseExprCXX.cpp:1280
>      SourceLocation NoLoc;
>      D.AddTypeInfo(DeclaratorChunk::getFunction(/*hasProto=*/true,
>                                                 /*isAmbiguous=*/false,

Let's not duplicate this amazingly long type info thingy. I think you can avoid it if you hoist MutableLoc and add a bool like `NeedFuncDeclaratorChunk`. Also, maybe we shouldn't be hallucinating a function declarator chunk in CUDA when there are no attributes?

https://reviews.llvm.org/D25103





More information about the cfe-commits mailing list