summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/lambda-attr.cu
Commit message (Collapse)AuthorAgeFilesLines
* [CUDA] Emit deferred diagnostics during Sema rather than during codegen.Justin Lebar2016-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Emitting deferred diagnostics during codegen was a hack. It did work, but usability was poor, both for us as compiler devs and for users. We don't codegen if there are any sema errors, so for users this meant that they wouldn't see deferred errors if there were any non-deferred errors. For devs, this meant that we had to carefully split up our tests so that when we tested deferred errors, we didn't emit any non-deferred errors. This change moves checking for deferred errors into Sema. See the big comment in SemaCUDA.cpp for an overview of the idea. This checking adds overhead to compilation, because we have to maintain a partial call graph. As a result, this change makes deferred errors a CUDA-only concept (whereas before they were a general concept). If anyone else wants to use this framework for something other than CUDA, we can generalize at that time. This patch makes the minimal set of test changes -- after this lands, I'll go back through and do a cleanup of the tests that we no longer have to split up. Reviewers: rnk Subscribers: cfe-commits, rsmith, tra Differential Revision: https://reviews.llvm.org/D25541 llvm-svn: 284158
* [CUDA] Emit a warning if a CUDA host/device/global attribute is placed after ↵Justin Lebar2016-09-301-2/+11
| | | | | | | | | | | | | | | | | | | | | | | '(...)'. Summary: This is probably the sane place for the attribute to go, but nvcc specifically rejects it. Other GNU-style attributes are allowed in this position (although judging from the warning it emits for host/device/global, those attributes are applied to the lambda's anonymous struct, not to the function itself). It would be nice to have a FixIt message here, but doing so, or even just getting the correct range for the attribute, including its '((' and '))'s, is apparently Hard. Reviewers: rnk Subscribers: cfe-commits, tra Differential Revision: https://reviews.llvm.org/D25115 llvm-svn: 282911
* [CUDA] Handle attributes on CUDA lambdas appearing between [...] and (...).Justin Lebar2016-09-301-0/+33
Summary: This is ugh, but it makes us compatible with NVCC. Fixes bug 26341. Reviewers: rnk Subscribers: cfe-commits, tra Differential Revision: https://reviews.llvm.org/D25103 llvm-svn: 282879
OpenPOWER on IntegriCloud