Fix the compiler warnings: "-Winconsistent-missing-override", "-Wunused-variable"
authorHaojian Wu <hokein.wu@gmail.com>
Mon, 9 Dec 2019 16:07:52 +0000 (17:07 +0100)
committerHaojian Wu <hokein.wu@gmail.com>
Mon, 9 Dec 2019 16:09:07 +0000 (17:09 +0100)
for d97b3e3e65cd77a81b39732af84a1a4229e95091

clang/lib/CodeGen/CGBuiltin.cpp
clang/utils/TableGen/MveEmitter.cpp

index 94d10a1..7b5d691 100644 (file)
@@ -6804,8 +6804,8 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,
 template<typename Integer>
 static Integer GetIntegerConstantValue(const Expr *E, ASTContext &Context) {
   llvm::APSInt IntVal;
-  bool IsConst = E->isIntegerConstantExpr(IntVal, Context);
-  assert(IsConst && "Sema should have checked this was a constant");
+  assert(E->isIntegerConstantExpr(IntVal, Context) &&
+         "Sema should have checked this was a constant");
   return IntVal.getExtValue();
 }
 
index 37bf322..643d2d5 100644 (file)
@@ -564,7 +564,7 @@ public:
     return Result::asValue();
   }
   bool hasIntegerValue() const override { return Immediate; }
-  virtual std::string getIntegerValue(const std::string &IntType) {
+  std::string getIntegerValue(const std::string &IntType) override {
     return "GetIntegerConstantValue<" + IntType + ">(E->getArg(" +
            utostr(ArgNum) + "), getContext())";
   }