[clang][Interp][NFC] Clean up InterpState.cpp
authorTimm Bäder <tbaeder@redhat.com>
Mon, 6 Feb 2023 14:23:39 +0000 (15:23 +0100)
committerTimm Bäder <tbaeder@redhat.com>
Tue, 28 Feb 2023 15:36:16 +0000 (16:36 +0100)
Remove unused includes, an unused using alias and braces in single-line
if statements.

clang/lib/AST/Interp/InterpState.cpp

index 25684f3..6ae4ecd 100644 (file)
@@ -7,20 +7,14 @@
 //===----------------------------------------------------------------------===//
 
 #include "InterpState.h"
-#include <limits>
-#include "Function.h"
 #include "InterpFrame.h"
 #include "InterpStack.h"
-#include "Opcode.h"
-#include "PrimType.h"
 #include "Program.h"
 #include "State.h"
 
 using namespace clang;
 using namespace clang::interp;
 
-using APSInt = llvm::APSInt;
-
 InterpState::InterpState(State &Parent, Program &P, InterpStack &Stk,
                          Context &Ctx, SourceMapper *M)
     : Parent(Parent), M(M), P(P), Stk(Stk), Ctx(Ctx), Current(nullptr),
@@ -41,11 +35,9 @@ InterpState::~InterpState() {
 }
 
 Frame *InterpState::getCurrentFrame() {
-  if (Current && Current->Caller) {
+  if (Current && Current->Caller)
     return Current;
-  } else {
-    return Parent.getCurrentFrame();
-  }
+  return Parent.getCurrentFrame();
 }
 
 bool InterpState::reportOverflow(const Expr *E, const llvm::APSInt &Value) {