Commit 3420ef7e authored by Kevin Modzelewski's avatar Kevin Modzelewski

Turn on -Winconsistent-missing-override

parent 923df348
...@@ -138,7 +138,6 @@ COMMON_CXXFLAGS += -fexceptions -fno-rtti ...@@ -138,7 +138,6 @@ COMMON_CXXFLAGS += -fexceptions -fno-rtti
COMMON_CXXFLAGS += -Wno-invalid-offsetof # allow the use of "offsetof", and we'll just have to make sure to only use it legally. COMMON_CXXFLAGS += -Wno-invalid-offsetof # allow the use of "offsetof", and we'll just have to make sure to only use it legally.
COMMON_CXXFLAGS += -DENABLE_INTEL_JIT_EVENTS=$(ENABLE_INTEL_JIT_EVENTS) COMMON_CXXFLAGS += -DENABLE_INTEL_JIT_EVENTS=$(ENABLE_INTEL_JIT_EVENTS)
COMMON_CXXFLAGS += -I$(DEPS_DIR)/pypa-install/include COMMON_CXXFLAGS += -I$(DEPS_DIR)/pypa-install/include
COMMON_CXXFLAGS += -Wno-inconsistent-missing-override
ifeq ($(ENABLE_VALGRIND),0) ifeq ($(ENABLE_VALGRIND),0)
COMMON_CXXFLAGS += -DNVALGRIND COMMON_CXXFLAGS += -DNVALGRIND
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -165,9 +165,9 @@ template <class V> class ValuedCompilerType : public _ValuedCompilerType<V> { pu ...@@ -165,9 +165,9 @@ template <class V> class ValuedCompilerType : public _ValuedCompilerType<V> { pu
template <> class ValuedCompilerType<llvm::Value*> : public _ValuedCompilerType<llvm::Value*> { template <> class ValuedCompilerType<llvm::Value*> : public _ValuedCompilerType<llvm::Value*> {
public: public:
virtual llvm::Type* llvmType() = 0; virtual llvm::Type* llvmType() = 0;
virtual std::string debugName(); std::string debugName() override;
void assertMatches(llvm::Value* v) override final { void assertMatches(llvm::Value* v) override {
if (v->getType() != llvmType()) { if (v->getType() != llvmType()) {
v->getType()->dump(); v->getType()->dump();
llvmType()->dump(); llvmType()->dump();
...@@ -181,13 +181,13 @@ public: ...@@ -181,13 +181,13 @@ public:
abort(); abort();
} }
virtual CompilerVariable* dup(ConcreteCompilerVariable* v, DupCache& cache); CompilerVariable* dup(ConcreteCompilerVariable* v, DupCache& cache) override;
virtual ConcreteCompilerType* getConcreteType() { return this; } ConcreteCompilerType* getConcreteType() override { return this; }
virtual bool canConvertTo(ConcreteCompilerType* other_type) { return other_type == this || other_type == UNKNOWN; } bool canConvertTo(ConcreteCompilerType* other_type) override { return other_type == this || other_type == UNKNOWN; }
virtual ConcreteCompilerVariable* makeConverted(IREmitter& emitter, ConcreteCompilerVariable* var, ConcreteCompilerVariable* makeConverted(IREmitter& emitter, ConcreteCompilerVariable* var,
ConcreteCompilerType* other_type); ConcreteCompilerType* other_type) override;
void serializeToFrame(VAR* var, std::vector<llvm::Value*>& stackmap_args) override final; void serializeToFrame(VAR* var, std::vector<llvm::Value*>& stackmap_args) override;
int numFrameArgs() override final { return 1; } int numFrameArgs() override { return 1; }
}; };
class CompilerVariable { class CompilerVariable {
...@@ -273,8 +273,8 @@ private: ...@@ -273,8 +273,8 @@ private:
V value; V value;
protected: protected:
virtual void drop(IREmitter& emitter) { type->drop(emitter, this); } void drop(IREmitter& emitter) override { type->drop(emitter, this); }
virtual void grab(IREmitter& emmitter) { type->grab(emmitter, this); } void grab(IREmitter& emmitter) override { type->grab(emmitter, this); }
public: public:
ValuedCompilerVariable(T* type, V value, bool grabbed) : CompilerVariable(grabbed), type(type), value(value) { ValuedCompilerVariable(T* type, V value, bool grabbed) : CompilerVariable(grabbed), type(type), value(value) {
...@@ -282,8 +282,8 @@ public: ...@@ -282,8 +282,8 @@ public:
type->assertMatches(value); type->assertMatches(value);
#endif #endif
} }
virtual T* getType() { return type; } T* getType() override { return type; }
virtual V getValue() { return value; } V getValue() { return value; }
ConcreteCompilerType* getConcreteType() override { return type->getConcreteType(); } ConcreteCompilerType* getConcreteType() override { return type->getConcreteType(); }
ConcreteCompilerType* getBoxType() override { return type->getBoxType(); } ConcreteCompilerType* getBoxType() override { return type->getBoxType(); }
...@@ -315,20 +315,20 @@ public: ...@@ -315,20 +315,20 @@ public:
ConcreteCompilerVariable* nonzero(IREmitter& emitter, const OpInfo& info) override { ConcreteCompilerVariable* nonzero(IREmitter& emitter, const OpInfo& info) override {
return type->nonzero(emitter, info, this); return type->nonzero(emitter, info, this);
} }
virtual CompilerVariable* getattr(IREmitter& emitter, const OpInfo& info, const std::string* attr, bool cls_only) { CompilerVariable* getattr(IREmitter& emitter, const OpInfo& info, const std::string* attr, bool cls_only) override {
return type->getattr(emitter, info, this, attr, cls_only); return type->getattr(emitter, info, this, attr, cls_only);
} }
virtual void setattr(IREmitter& emitter, const OpInfo& info, const std::string* attr, CompilerVariable* v) { void setattr(IREmitter& emitter, const OpInfo& info, const std::string* attr, CompilerVariable* v) override {
type->setattr(emitter, info, this, attr, v); type->setattr(emitter, info, this, attr, v);
} }
virtual void delattr(IREmitter& emitter, const OpInfo& info, const std::string* attr) { void delattr(IREmitter& emitter, const OpInfo& info, const std::string* attr) override {
type->delattr(emitter, info, this, attr); type->delattr(emitter, info, this, attr);
} }
virtual CompilerVariable* callattr(IREmitter& emitter, const OpInfo& info, const std::string* attr, bool clsonly, CompilerVariable* callattr(IREmitter& emitter, const OpInfo& info, const std::string* attr, bool clsonly,
struct ArgPassSpec argspec, const std::vector<CompilerVariable*>& args, struct ArgPassSpec argspec, const std::vector<CompilerVariable*>& args,
const std::vector<const std::string*>* keyword_names) { const std::vector<const std::string*>* keyword_names) override {
return type->callattr(emitter, info, this, attr, clsonly, argspec, args, keyword_names); return type->callattr(emitter, info, this, attr, clsonly, argspec, args, keyword_names);
} }
CompilerVariable* call(IREmitter& emitter, const OpInfo& info, struct ArgPassSpec argspec, CompilerVariable* call(IREmitter& emitter, const OpInfo& info, struct ArgPassSpec argspec,
......
...@@ -2244,7 +2244,7 @@ private: ...@@ -2244,7 +2244,7 @@ private:
} }
public: public:
void addFrameStackmapArgs(PatchpointInfo* pp, std::vector<llvm::Value*>& stackmap_args) { void addFrameStackmapArgs(PatchpointInfo* pp, std::vector<llvm::Value*>& stackmap_args) override {
int initial_args = stackmap_args.size(); int initial_args = stackmap_args.size();
if (ENABLE_FRAME_INTROSPECTION) { if (ENABLE_FRAME_INTROSPECTION) {
// TODO: don't need to use a sorted symbol table if we're explicitly recording the names! // TODO: don't need to use a sorted symbol table if we're explicitly recording the names!
......
...@@ -221,7 +221,7 @@ public: ...@@ -221,7 +221,7 @@ public:
return MayAlias; return MayAlias;
} }
virtual AliasResult alias(const Location& LocA, const Location& LocB) { AliasResult alias(const Location& LocA, const Location& LocB) override {
if (VERBOSITY("opt.aa") >= 2 && depth == 0) { if (VERBOSITY("opt.aa") >= 2 && depth == 0) {
cast<Instruction>(LocA.Ptr)->getParent()->dump(); cast<Instruction>(LocA.Ptr)->getParent()->dump();
} }
...@@ -245,7 +245,7 @@ public: ...@@ -245,7 +245,7 @@ public:
// There are multiple (overloaded) "getModRefInfo" functions in AliasAnalysis, and apparently // There are multiple (overloaded) "getModRefInfo" functions in AliasAnalysis, and apparently
// this means you need to add this line: // this means you need to add this line:
using AliasAnalysis::getModRefInfo; using AliasAnalysis::getModRefInfo;
virtual ModRefResult getModRefInfo(ImmutableCallSite CS, const Location& Loc) { ModRefResult getModRefInfo(ImmutableCallSite CS, const Location& Loc) override {
ModRefResult base = AliasAnalysis::getModRefInfo(CS, Loc); ModRefResult base = AliasAnalysis::getModRefInfo(CS, Loc);
if (!CS.getCalledFunction()) if (!CS.getCalledFunction())
return base; return base;
...@@ -308,7 +308,7 @@ public: ...@@ -308,7 +308,7 @@ public:
return ModRefResult(mask & base); return ModRefResult(mask & base);
} }
virtual void* getAdjustedAnalysisPointer(const void* ID) { void* getAdjustedAnalysisPointer(const void* ID) override {
if (ID == &AliasAnalysis::ID) if (ID == &AliasAnalysis::ID)
return (AliasAnalysis*)this; return (AliasAnalysis*)this;
return this; return this;
......
...@@ -1088,7 +1088,7 @@ public: ...@@ -1088,7 +1088,7 @@ public:
curblock = normal_dest; curblock = normal_dest;
} }
virtual bool visit_classdef(AST_ClassDef* node) { bool visit_classdef(AST_ClassDef* node) override {
// Remap in place: see note in visit_functiondef for why. // Remap in place: see note in visit_functiondef for why.
// Decorators are evaluated before the defaults: // Decorators are evaluated before the defaults:
...@@ -1104,7 +1104,7 @@ public: ...@@ -1104,7 +1104,7 @@ public:
return true; return true;
} }
virtual bool visit_functiondef(AST_FunctionDef* node) { bool visit_functiondef(AST_FunctionDef* node) override {
// As much as I don't like it, for now we're remapping these in place. // As much as I don't like it, for now we're remapping these in place.
// This is because we do certain analyses pre-remapping, and associate the // This is because we do certain analyses pre-remapping, and associate the
// results with the node. We can either do some refactoring and have a way // results with the node. We can either do some refactoring and have a way
...@@ -1128,7 +1128,7 @@ public: ...@@ -1128,7 +1128,7 @@ public:
return true; return true;
} }
virtual bool visit_global(AST_Global* node) { bool visit_global(AST_Global* node) override {
push_back(node); push_back(node);
return true; return true;
} }
...@@ -1142,7 +1142,7 @@ public: ...@@ -1142,7 +1142,7 @@ public:
} }
} }
virtual bool visit_import(AST_Import* node) { bool visit_import(AST_Import* node) override {
for (AST_alias* a : node->names) { for (AST_alias* a : node->names) {
AST_LangPrimitive* import = new AST_LangPrimitive(AST_LangPrimitive::IMPORT_NAME); AST_LangPrimitive* import = new AST_LangPrimitive(AST_LangPrimitive::IMPORT_NAME);
import->args.push_back(new AST_Num()); import->args.push_back(new AST_Num());
...@@ -1182,7 +1182,7 @@ public: ...@@ -1182,7 +1182,7 @@ public:
return true; return true;
} }
virtual bool visit_importfrom(AST_ImportFrom* node) { bool visit_importfrom(AST_ImportFrom* node) override {
RELEASE_ASSERT(node->level == 0, ""); RELEASE_ASSERT(node->level == 0, "");
AST_LangPrimitive* import = new AST_LangPrimitive(AST_LangPrimitive::IMPORT_NAME); AST_LangPrimitive* import = new AST_LangPrimitive(AST_LangPrimitive::IMPORT_NAME);
...@@ -1227,7 +1227,7 @@ public: ...@@ -1227,7 +1227,7 @@ public:
return true; return true;
} }
virtual bool visit_pass(AST_Pass* node) { return true; } bool visit_pass(AST_Pass* node) override { return true; }
bool visit_assert(AST_Assert* node) override { bool visit_assert(AST_Assert* node) override {
AST_Branch* br = new AST_Branch(); AST_Branch* br = new AST_Branch();
...@@ -1280,7 +1280,7 @@ public: ...@@ -1280,7 +1280,7 @@ public:
return true; return true;
} }
virtual bool visit_assign(AST_Assign* node) { bool visit_assign(AST_Assign* node) override {
AST_expr* remapped_value = remapExpr(node->value); AST_expr* remapped_value = remapExpr(node->value);
for (AST_expr* target : node->targets) { for (AST_expr* target : node->targets) {
...@@ -1289,7 +1289,7 @@ public: ...@@ -1289,7 +1289,7 @@ public:
return true; return true;
} }
virtual bool visit_augassign(AST_AugAssign* node) { bool visit_augassign(AST_AugAssign* node) override {
// augassign is pretty tricky; "x" += "y" mostly textually maps to // augassign is pretty tricky; "x" += "y" mostly textually maps to
// "x" = "x" =+ "y" (using "=+" to represent an augbinop) // "x" = "x" =+ "y" (using "=+" to represent an augbinop)
// except that "x" only gets evaluated once. So it's something like // except that "x" only gets evaluated once. So it's something like
...@@ -1382,7 +1382,7 @@ public: ...@@ -1382,7 +1382,7 @@ public:
return true; return true;
} }
virtual bool visit_delete(AST_Delete* node) { bool visit_delete(AST_Delete* node) override {
for (auto t : node->targets) { for (auto t : node->targets) {
AST_Delete* astdel = new AST_Delete(); AST_Delete* astdel = new AST_Delete();
astdel->lineno = node->lineno; astdel->lineno = node->lineno;
...@@ -1418,7 +1418,7 @@ public: ...@@ -1418,7 +1418,7 @@ public:
return true; return true;
} }
virtual bool visit_expr(AST_Expr* node) { bool visit_expr(AST_Expr* node) override {
AST_Expr* remapped = new AST_Expr(); AST_Expr* remapped = new AST_Expr();
remapped->lineno = node->lineno; remapped->lineno = node->lineno;
remapped->col_offset = node->col_offset; remapped->col_offset = node->col_offset;
...@@ -1427,7 +1427,7 @@ public: ...@@ -1427,7 +1427,7 @@ public:
return true; return true;
} }
virtual bool visit_print(AST_Print* node) { bool visit_print(AST_Print* node) override {
AST_expr* dest = remapExpr(node->dest); AST_expr* dest = remapExpr(node->dest);
int i = 0; int i = 0;
...@@ -1464,7 +1464,7 @@ public: ...@@ -1464,7 +1464,7 @@ public:
return true; return true;
} }
virtual bool visit_return(AST_Return* node) { bool visit_return(AST_Return* node) override {
if (root_type != AST_TYPE::FunctionDef && root_type != AST_TYPE::Lambda) { if (root_type != AST_TYPE::FunctionDef && root_type != AST_TYPE::Lambda) {
raiseExcHelper(SyntaxError, "'return' outside function"); raiseExcHelper(SyntaxError, "'return' outside function");
} }
...@@ -1476,7 +1476,7 @@ public: ...@@ -1476,7 +1476,7 @@ public:
return true; return true;
} }
virtual bool visit_if(AST_If* node) { bool visit_if(AST_If* node) override {
if (!curblock) if (!curblock)
return true; return true;
...@@ -1531,7 +1531,7 @@ public: ...@@ -1531,7 +1531,7 @@ public:
return true; return true;
} }
virtual bool visit_break(AST_Break* node) { bool visit_break(AST_Break* node) override {
if (!curblock) if (!curblock)
return true; return true;
...@@ -1549,7 +1549,7 @@ public: ...@@ -1549,7 +1549,7 @@ public:
return true; return true;
} }
virtual bool visit_continue(AST_Continue* node) { bool visit_continue(AST_Continue* node) override {
if (!curblock) if (!curblock)
return true; return true;
...@@ -1568,7 +1568,7 @@ public: ...@@ -1568,7 +1568,7 @@ public:
return true; return true;
} }
virtual bool visit_while(AST_While* node) { bool visit_while(AST_While* node) override {
if (!curblock) if (!curblock)
return true; return true;
...@@ -1629,7 +1629,7 @@ public: ...@@ -1629,7 +1629,7 @@ public:
return true; return true;
} }
virtual bool visit_for(AST_For* node) { bool visit_for(AST_For* node) override {
if (!curblock) if (!curblock)
return true; return true;
...@@ -1867,7 +1867,7 @@ public: ...@@ -1867,7 +1867,7 @@ public:
return true; return true;
} }
virtual bool visit_with(AST_With* node) { bool visit_with(AST_With* node) override {
char ctxmgrname_buf[80]; char ctxmgrname_buf[80];
snprintf(ctxmgrname_buf, 80, "#ctxmgr_%p", node); snprintf(ctxmgrname_buf, 80, "#ctxmgr_%p", node);
char exitname_buf[80]; char exitname_buf[80];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment