[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 9 02:29:14 PST 2024


================
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify %s
-// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify -std=gnu++11 %s
+// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify -std=gnu++17 %s
----------------
cor3ntin wrote:

I agree with @Endilll.
We should understand _why_ the behavior in older language modes is different.
I would recommend trying to use a debugger to try to see why we are not passing in that code path.
The difference in behavior across language modes looks like a bug that should be fixed, rather than a change in expected behavior

(in all language modes, if a constructor is called, that constructor might have side effects)

https://github.com/llvm/llvm-project/pull/81127


More information about the cfe-commits mailing list