Author: Timm Bäder Date: 2022-10-14T13:33:04+02:00 New Revision: 11f360469599e5c7c470b2071692fc6647cf3280
URL: https://github.com/llvm/llvm-project/commit/11f360469599e5c7c470b2071692fc6647cf3280 DIFF: https://github.com/llvm/llvm-project/commit/11f360469599e5c7c470b2071692fc6647cf3280.diff LOG: [clang][Interp][NFC] Remove an unnecessary local variable Added: Modified: clang/lib/AST/Interp/ByteCodeExprGen.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp index 448bea9ab267..d504ff36bb99 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -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()) { @@ -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; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits