[PATCH] D122249: [Clang] Add a compatibiliy warning for non-literals in constexpr.

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 23 08:54:40 PDT 2022


hubert.reinterpretcast added inline comments.


================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:1905-1907
+          CheckLiteralType(SemaRef, Kind, VD->getLocation(), VD->getType(),
+                           diag::warn_cxx20_compat_constexpr_var,
+                           isa<CXXConstructorDecl>(Dcl), 2);
----------------
Apply Aaron's suggestion (https://reviews.llvm.org/D122249?id=417358#inline-1168823) to the updated code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122249



More information about the cfe-commits mailing list