aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: clang/test/ParserHLSL/group_shared_202x.hlsl:5-6
+
+// expected-error@+1 {{return type cannot be qualified with address space}}
+auto l = []() -> groupshared void {};
+// expected-error@+1 {{expected a type}}
----------------
python3kgae wrote:
> aaron.ballman wrote:
> > One test I think we need in SemaCXX for this is what happens when the 
> > lambda return type (or function return type) is deduced. e.g.,
> > ```
> > extern groupshared float f;
> > 
> > auto func() {
> >   return f;
> > }
> > 
> > void other() {
> >   [&]() { return f; };
> > }
> > ```
> > Does use of `return f` cause us to deduce a return type that's annotated 
> > with `groupshared` or does that get stripped off thanks to lvalue to rvalue 
> > conversions and so we deduce `float`?
> groupshared is stripped because of lvalue to rvalue conversions.
> 
> And even hlsl202x not enable CXX14 :( .
Excellent, thank you!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135060/new/

https://reviews.llvm.org/D135060

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to