Skip to content

Commit 24ad1be

Browse files
committed
Fix bitfield initialization
1 parent 9ee0116 commit 24ad1be

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

clang/lib/AST/ByteCode/Function.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ Function::Function(Program &P, FunctionDeclTy Source, unsigned ArgSize,
2222
bool HasThisPointer, bool HasRVO, bool IsLambdaStaticInvoker)
2323
: P(P), Kind(FunctionKind::Normal), Source(Source), ArgSize(ArgSize),
2424
ParamTypes(std::move(ParamTypes)), Params(std::move(Params)),
25-
ParamOffsets(std::move(ParamOffsets)), HasThisPointer(HasThisPointer),
26-
HasRVO(HasRVO) {
25+
ParamOffsets(std::move(ParamOffsets)), IsValid(false),
26+
IsFullyCompiled(false), HasThisPointer(HasThisPointer), HasRVO(HasRVO),
27+
Defined(false) {
2728
if (const auto *F = dyn_cast<const FunctionDecl *>(Source)) {
2829
Variadic = F->isVariadic();
2930
Immediate = F->isImmediateFunction();
@@ -41,7 +42,13 @@ Function::Function(Program &P, FunctionDeclTy Source, unsigned ArgSize,
4142
Kind = FunctionKind::LambdaCallOperator;
4243
else if (MD->isCopyAssignmentOperator() || MD->isMoveAssignmentOperator())
4344
Kind = FunctionKind::CopyOrMoveOperator;
45+
} else {
46+
Virtual = false;
4447
}
48+
} else {
49+
Variadic = false;
50+
Virtual = false;
51+
Immediate = false;
4552
}
4653
}
4754

0 commit comments

Comments
 (0)