[InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X,...
[llvm-project.git] / clang / test / CodeGenCXX / consteval-cleanup.cpp
blobe6fdd50df6cb04486892ea57b2b0525244ee2bd4
1 // RUN: %clang_cc1 -std=c++20 -Wno-unused-value -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s
3 struct P {
4 consteval P() {}
5 };
7 struct A {
8 A(int v) { this->data = new int(v); }
9 ~A() { delete data; }
10 private:
11 int *data;
14 void foo() {
15 for (;A(1), P(), false;);
16 // CHECK: foo
17 // CHECK: for.cond:
18 // CHECK: call void @_ZN1AC1Ei
19 // CHECK: call void @_ZN1AD1Ev
20 // CHECK: for.body