yaxunl marked 2 inline comments as done. yaxunl added inline comments.
================ Comment at: clang/test/SemaCUDA/constexpr-variables.cu:30-31 + static constexpr int c = sizeof(a); + a[0] = &b; + a[1] = &c; + foo(a); ---------------- tra wrote: > yaxunl wrote: > > tra wrote: > > > Can we verify the diags for bad cases, too? > > By bad cases you mean the constexpr var is not compile time constant? > It's a general suggestion. It's good to have some negative testing thrown in, > too to make sure we didn't do too much by mistake. E.g. allowing all > variables to become `__constant__` would be bad. :-) > > I'm not sure what exactly would be a good addition here. If you can't think > of something, I guess we can leave it as is. C++ is largely oblivoius of > `__constant__`, so we may not have much to work with. It's probably > observable, but may be an overkill for the test. > added tests where initializer is not compile time constant CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79237/new/ https://reviews.llvm.org/D79237 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits