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

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 30 10:19:37 PDT 2016


jlebar added inline comments.


> rnk wrote in ParseExprCXX.cpp:1135
> Does nvcc support __declspec style attributes? Maybe we should check for those too?

nvcc doesn't seem to support __declspec attributes.

I have no strong opinion on whether or not we should add them ourselves, though I guess I have a weak aversion to mucking with the parsing rules more than is necessary.  (I put off this patch for as long as I could while I tried to get nvcc to put the attributes in the right place.)

> rnk wrote in ParseExprCXX.cpp:1280
> 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?

Oh, I didn't look closely enough at the API to realize that I could add attributes without creating a new function declarator chunk.  New patch is a much smaller change.

https://reviews.llvm.org/D25103





More information about the cfe-commits mailing list