Skip to content

Commit 19bb756

Browse files
committed
Address review feedback
1 parent df90df1 commit 19bb756

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

clang/lib/AST/Interp/ByteCodeExprGen.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3348,8 +3348,7 @@ bool ByteCodeExprGen<Emitter>::VisitCallExpr(const CallExpr *E) {
33483348
return false;
33493349
if (!this->emitGetMemberPtrBase(E))
33503350
return false;
3351-
} else {
3352-
if (!this->visit(MC->getImplicitObjectArgument()))
3351+
} else if (!this->visit(MC->getImplicitObjectArgument())) {
33533352
return false;
33543353
}
33553354
}

clang/lib/AST/Interp/MemberPointer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class MemberPointer final {
3434
MemberPointer(uint32_t Address, const Descriptor *D) {
3535
// This should be impossible to hit, at least I've been unable
3636
// to write a test for it.
37+
assert(false && "This constructor shouldn't be reachable for MemberPointers");
3738
}
3839

3940
MemberPointer(const Decl *D) : Dcl(D) {
@@ -42,8 +43,7 @@ class MemberPointer final {
4243
}
4344

4445
uint64_t getIntegerRepresentation() const {
45-
// This should be impossible to hit, at least I've been unable
46-
// to write a test for it.
46+
assert(false && "getIntegerRepresentation() shouldn't be reachable for MemberPointers");
4747
return 17;
4848
}
4949

0 commit comments

Comments
 (0)