File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1468,7 +1468,7 @@ bool ByteCodeExprGen<Emitter>::VisitCompoundAssignOperator(
1468
1468
std::optional<PrimType> LHSComputationT =
1469
1469
classify (E->getComputationLHSType ());
1470
1470
std::optional<PrimType> LT = classify (LHS->getType ());
1471
- std::optional<PrimType> RT = classify (E-> getComputationResultType ());
1471
+ std::optional<PrimType> RT = classify (RHS-> getType ());
1472
1472
std::optional<PrimType> ResultT = classify (E->getType ());
1473
1473
1474
1474
if (!LT || !RT || !ResultT || !LHSComputationT)
Original file line number Diff line number Diff line change @@ -188,3 +188,12 @@ namespace shifts {
188
188
// ref-cxx17-error {{not an integral constant expression}} \
189
189
// ref-cxx17-note {{in call to 'foo(2)'}}
190
190
};
191
+
192
+ namespace LongInt {
193
+ constexpr int f () {
194
+ int a = 1 ;
195
+ a <<= (long )0 ;
196
+ return 1 ;
197
+ }
198
+ static_assert (f() == 1 , " " );
199
+ };
You can’t perform that action at this time.
0 commit comments