Skip to content

Commit

Permalink
[clang][Interp][NFC] Remove an unnecessary local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Oct 14, 2022
1 parent 1b731bd commit 11f3604
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions clang/lib/AST/Interp/ByteCodeExprGen.cpp
Expand Up @@ -1063,7 +1063,6 @@ bool ByteCodeExprGen<Emitter>::VisitUnaryOperator(const UnaryOperator *E) {
template <class Emitter>
bool ByteCodeExprGen<Emitter>::VisitDeclRefExpr(const DeclRefExpr *E) {
const auto *Decl = E->getDecl();
bool IsReference = Decl->getType()->isReferenceType();
bool FoundDecl = false;

if (auto It = Locals.find(Decl); It != Locals.end()) {
Expand Down Expand Up @@ -1094,7 +1093,7 @@ bool ByteCodeExprGen<Emitter>::VisitDeclRefExpr(const DeclRefExpr *E) {
// References are implemented using pointers, so when we get here,
// we have a pointer to a pointer, which we need to de-reference once.
if (FoundDecl) {
if (IsReference) {
if (Decl->getType()->isReferenceType()) {
if (!this->emitLoadPopPtr(E))
return false;
}
Expand Down

0 comments on commit 11f3604

Please sign in to comment.