Skip to content

Commit c3f1faf

Browse files
committed
[clang][Interp][NFC] Fix allocateLocalPrimitive parameter name
This is passed on to Program::createDescriptor, where it is used as a value for IsConst.
1 parent 632fa37 commit c3f1faf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/AST/Interp/ByteCodeExprGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ bool ByteCodeExprGen<Emitter>::VisitMaterializeTemporaryExpr(
831831
// For everyhing else, use local variables.
832832
if (SubExprT) {
833833
if (std::optional<unsigned> LocalIndex = allocateLocalPrimitive(
834-
SubExpr, *SubExprT, /*IsMutable=*/true, /*IsExtended=*/true)) {
834+
SubExpr, *SubExprT, /*IsConst=*/true, /*IsExtended=*/true)) {
835835
if (!this->visitInitializer(SubExpr))
836836
return false;
837837
this->emitSetLocal(*SubExprT, *LocalIndex, E);

clang/lib/AST/Interp/ByteCodeExprGen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class ByteCodeExprGen : public ConstStmtVisitor<ByteCodeExprGen<Emitter>, bool>,
185185
llvm::function_ref<bool(const Expr *)> V);
186186

187187
/// Creates a local primitive value.
188-
unsigned allocateLocalPrimitive(DeclTy &&Decl, PrimType Ty, bool IsMutable,
188+
unsigned allocateLocalPrimitive(DeclTy &&Decl, PrimType Ty, bool IsConst,
189189
bool IsExtended = false);
190190

191191
/// Allocates a space storing a local given its type.

0 commit comments

Comments
 (0)