[clang] ff4dcee - Fix the compiler warnings: "-Winconsistent-missing-override", "-Wunused-variable"
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 9 08:10:01 PST 2019
Author: Haojian Wu
Date: 2019-12-09T17:09:07+01:00
New Revision: ff4dceef9201c5ae3924e92f6955977f243ac71d
URL: https://github.com/llvm/llvm-project/commit/ff4dceef9201c5ae3924e92f6955977f243ac71d
DIFF: https://github.com/llvm/llvm-project/commit/ff4dceef9201c5ae3924e92f6955977f243ac71d.diff
LOG: Fix the compiler warnings: "-Winconsistent-missing-override", "-Wunused-variable"
for d97b3e3e65cd77a81b39732af84a1a4229e95091
Added:
Modified:
clang/lib/CodeGen/CGBuiltin.cpp
clang/utils/TableGen/MveEmitter.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 94d10a1aedf2..7b5d691d26cf 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -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();
}
diff --git a/clang/utils/TableGen/MveEmitter.cpp b/clang/utils/TableGen/MveEmitter.cpp
index 37bf3220182a..643d2d598ba5 100644
--- a/clang/utils/TableGen/MveEmitter.cpp
+++ b/clang/utils/TableGen/MveEmitter.cpp
@@ -564,7 +564,7 @@ class BuiltinArgResult : public Result {
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())";
}
More information about the cfe-commits
mailing list