summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-02-07 08:33:35 +0100
committerMiklos Vajna <vmiklos@collabora.com>2024-07-31 08:33:14 +0200
commitb24e920c6dc00ce39decee2596217e99f798a95c (patch)
tree4e57f47761c1310a4a1a3d8d75c23b225571b2e8
parent6eef1dbd3b4508daabc49d429da2430e3244d83e (diff)
MSVC 2022 Preview: One HAVE_CPP_CONSTEVAL blocker down, one up
While the previously known issue appears to be fixed in VS 2022 Preview 17.9.0 Preview 5.0, a new one showed up that now caused > sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx(63): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'rtl::OUStringLiteral<2>' > sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx(63): note: Invalid aggregate initialization > sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx(63): note: too many initializers etc. Change-Id: Ia74a8d6454bb5f15c0af4d3cf29989342f2eef7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163072 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170423 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--configure.ac19
1 files changed, 17 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index e1d6f25419f0..7f0ccc560913 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14801,11 +14801,14 @@ dnl expression' with consteval constructor", <https://bugs.llvm.org/show_bug.cgi
dnl using consteval: 'clang/lib/CodeGen/Address.h:38: llvm::Value*
dnl clang::CodeGen::Address::getPointer() const: Assertion `isValid()' failed.'" (which should be
dnl fixed since Clang 14), <https://developercommunity.visualstudio.com/t/1581879> "Bogus error
-dnl C7595 with consteval constructor in ternary expression (/std:c++latest)", or
+dnl C7595 with consteval constructor in ternary expression (/std:c++latest)" (which appears to be
+dnl fixed at least in Visual Studio Community 2022 Preview 17.9.0 Preview 5.0),
dnl <https://github.com/llvm/llvm-project/issues/54612> "C++20, consteval, anonymous union:
dnl llvm/lib/IR/Instructions.cpp:1491: void llvm::StoreInst::AssertOK(): Assertion
dnl `cast<PointerType>(getOperand(1)->getType())->isOpaqueOrPointeeTypeMatches(getOperand(0)->getType())
-dnl && "Ptr must be a pointer to Val type!"' failed." (which should be fixed since Clang 17):
+dnl && "Ptr must be a pointer to Val type!"' failed." (which should be fixed since Clang 17), or
+dnl <https://developercommunity.visualstudio.com/t/Bogus-error-C2440-with-consteval-constru/10579616>
+dnl "Bogus error C2440 with consteval constructor (/std:c++20)":
AC_LANG_PUSH([C++])
save_CXX=$CXX
if test "$COM" = MSC && test "$COM_IS_CLANG" != TRUE; then
@@ -14850,6 +14853,18 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([
};
};
auto s5 = S5().f();
+
+ struct S6 {
+ consteval S6(char const (&lit)[2]) {
+ buf[0] = lit[0];
+ buf[1] = lit[1];
+ }
+ union {
+ int x;
+ char buf[2];
+ };
+ };
+ void f6() { S6("a"); }
], [
return (s.i == 1) ? 0 : 1;
])], [