aaron.ballman added inline comments.

================
Comment at: clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp:53-62
+consteval T *make_t() { return new T; }
+
+void func() {
+  (void)typeid(*null_s());
+  (void)typeid(*make_s());
+  (void)typeid(*null_t()); // expected-warning {{expression with side effects 
will be evaluated despite being used as an operand to 'typeid'}}
+  (void)typeid(*make_t()); // expected-error {{call to consteval function 
'unevaluated::make_t' is not a constant expression}}
----------------
Cleaning up the test a bit to not use relative locations, should be NFC.


================
Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:11
 
-consteval constexpr int f2(int i) { 
+consteval constexpr int f2(int i) {
   //expected-error@-1 {{cannot combine}}
----------------
Looks like a bunch of unintended whitespace changes snuck in.


================
Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:608-609
+
+auto e = g(f()); // expected-error {{is not a constant expression}}
+                 // expected-note@-1 {{non-constexpr function 'f' cannot be 
used in a constant expression}}
+
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106302

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

Reply via email to