barannikov88 added inline comments.

================
Comment at: clang/include/clang/Sema/Sema.h:3883
+                                  ///< message.
+    CCEK_StaticAssertMessageData, ///< Call to data() in a static assert
+                                  ///< message.
----------------
Appears unused.


================
Comment at: clang/lib/AST/ExprConstant.cpp:16413
+    APSInt C = Char.getInt();
+    Result.push_back(static_cast<char>(C.getExtValue()));
+    if (!HandleLValueArrayAdjustment(Info, PtrExpression, String, CharTy, 1))
----------------
This relies on host's CHAR_BIT >= target's CHAR_BIT, which isn't true for my 
target. Could you add an assertion?



================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16960
+  ExprResult EvaluatedData = BuildConvertedConstantExpression(
+      DataE.get(), ConstCharPtr, CCEK_StaticAssertMessageSize);
+  if (EvaluatedData.isInvalid()) {
----------------



================
Comment at: clang/test/SemaCXX/static-assert-cxx26.cpp:127
+};
+static_assert(false, RAII{}); // expected-error {{static assertion failed: ok}}
----------------
Should there be (negative?) tests with non-const data/size members and 
incorrect number of parameters? These conditions are checked in FindMember.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154290

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

Reply via email to