This is ugh, but it makes us compatible with NVCC. Fixes bug 26341.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
clang/lib/Parse/ParseExprCXX.cpp | ||
---|---|---|
1135 ↗ | (On Diff #73071) | Does nvcc support __declspec style attributes? Maybe we should check for those too? |
1280 ↗ | (On Diff #73071) | 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? |
Don't hallucinate a function declarator.
clang/lib/Parse/ParseExprCXX.cpp | ||
---|---|---|
1135 ↗ | (On Diff #73071) | 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.) |
1280 ↗ | (On Diff #73071) | 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. |
lgtm
clang/lib/Parse/ParseExprCXX.cpp | ||
---|---|---|
1135 ↗ | (On Diff #73071) | Nope, let's leave declspec alone then. :) |