From 4a655e706453ba6fcf1db555437e3725eed6703b Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 4 Mar 2014 06:24:11 +0000 Subject: [C+11] Add 'override' keyword to methods in the support library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202791 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/FoldingSet.h | 21 +++---- include/llvm/IR/InstrTypes.h | 2 +- include/llvm/Support/CommandLine.h | 108 +++++++++++++++++---------------- include/llvm/Support/Format.h | 10 +-- include/llvm/Support/FormattedStream.h | 18 +++--- include/llvm/Support/Process.h | 8 +-- include/llvm/Support/YAMLParser.h | 12 ++-- include/llvm/Support/YAMLTraits.h | 96 ++++++++++++++--------------- 8 files changed, 139 insertions(+), 136 deletions(-) (limited to 'include/llvm') diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index a056d667c6..9228ec555c 100644 --- a/include/llvm/ADT/FoldingSet.h +++ b/include/llvm/ADT/FoldingSet.h @@ -396,20 +396,20 @@ template class FoldingSet : public FoldingSetImpl { private: /// GetNodeProfile - Each instantiatation of the FoldingSet needs to provide a /// way to convert nodes into a unique specifier. - virtual void GetNodeProfile(Node *N, FoldingSetNodeID &ID) const { + void GetNodeProfile(Node *N, FoldingSetNodeID &ID) const override { T *TN = static_cast(N); FoldingSetTrait::Profile(*TN, ID); } /// NodeEquals - Instantiations may optionally provide a way to compare a /// node with a specified ID. - virtual bool NodeEquals(Node *N, const FoldingSetNodeID &ID, unsigned IDHash, - FoldingSetNodeID &TempID) const { + bool NodeEquals(Node *N, const FoldingSetNodeID &ID, unsigned IDHash, + FoldingSetNodeID &TempID) const override { T *TN = static_cast(N); return FoldingSetTrait::Equals(*TN, ID, IDHash, TempID); } /// ComputeNodeHash - Instantiations may optionally provide a way to compute a /// hash value directly from a node. - virtual unsigned ComputeNodeHash(Node *N, FoldingSetNodeID &TempID) const { + unsigned ComputeNodeHash(Node *N, FoldingSetNodeID &TempID) const override { T *TN = static_cast(N); return FoldingSetTrait::ComputeHash(*TN, TempID); } @@ -473,20 +473,19 @@ private: /// GetNodeProfile - Each instantiatation of the FoldingSet needs to provide a /// way to convert nodes into a unique specifier. - virtual void GetNodeProfile(FoldingSetImpl::Node *N, - FoldingSetNodeID &ID) const { + void GetNodeProfile(FoldingSetImpl::Node *N, + FoldingSetNodeID &ID) const override { T *TN = static_cast(N); ContextualFoldingSetTrait::Profile(*TN, ID, Context); } - virtual bool NodeEquals(FoldingSetImpl::Node *N, - const FoldingSetNodeID &ID, unsigned IDHash, - FoldingSetNodeID &TempID) const { + bool NodeEquals(FoldingSetImpl::Node *N, const FoldingSetNodeID &ID, + unsigned IDHash, FoldingSetNodeID &TempID) const override { T *TN = static_cast(N); return ContextualFoldingSetTrait::Equals(*TN, ID, IDHash, TempID, Context); } - virtual unsigned ComputeNodeHash(FoldingSetImpl::Node *N, - FoldingSetNodeID &TempID) const { + unsigned ComputeNodeHash(FoldingSetImpl::Node *N, + FoldingSetNodeID &TempID) const override { T *TN = static_cast(N); return ContextualFoldingSetTrait::ComputeHash(*TN, TempID, Context); } diff --git a/include/llvm/IR/InstrTypes.h b/include/llvm/IR/InstrTypes.h index cbf6fee506..4e247e9c9c 100644 --- a/include/llvm/IR/InstrTypes.h +++ b/include/llvm/IR/InstrTypes.h @@ -51,7 +51,7 @@ protected: virtual BasicBlock *getSuccessorV(unsigned idx) const = 0; virtual unsigned getNumSuccessorsV() const = 0; virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0; - virtual TerminatorInst *clone_impl() const = 0; + TerminatorInst *clone_impl() const override = 0; public: /// getNumSuccessors - Return the number of successors that this terminator diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 0267db817a..b7d1592f13 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -380,7 +380,9 @@ struct OptionValueBase : public GenericOptionValue { bool compare(const DataType &/*V*/) const { return false; } - virtual bool compare(const GenericOptionValue& /*V*/) const { return false; } + bool compare(const GenericOptionValue& /*V*/) const override { + return false; + } }; // Simple copy of the option value. @@ -404,7 +406,7 @@ public: return Valid && (Value != V); } - virtual bool compare(const GenericOptionValue &V) const { + bool compare(const GenericOptionValue &V) const override { const OptionValueCopy &VC = static_cast< const OptionValueCopy& >(V); if (!VC.hasValue()) return false; @@ -450,7 +452,7 @@ struct OptionValue : OptionValueCopy { return *this; } private: - virtual void anchor(); + void anchor() override; }; template<> @@ -467,7 +469,7 @@ struct OptionValue : OptionValueCopy { return *this; } private: - virtual void anchor(); + void anchor() override; }; //===----------------------------------------------------------------------===// @@ -646,14 +648,14 @@ public: typedef DataType parser_data_type; // Implement virtual functions needed by generic_parser_base - unsigned getNumOptions() const { return unsigned(Values.size()); } - const char *getOption(unsigned N) const { return Values[N].Name; } - const char *getDescription(unsigned N) const { + unsigned getNumOptions() const override { return unsigned(Values.size()); } + const char *getOption(unsigned N) const override { return Values[N].Name; } + const char *getDescription(unsigned N) const override { return Values[N].HelpStr; } // getOptionValue - Return the value of option name N. - virtual const GenericOptionValue &getOptionValue(unsigned N) const { + const GenericOptionValue &getOptionValue(unsigned N) const override { return Values[N].V; } @@ -762,13 +764,13 @@ public: } // getValueName - Do not print = at all. - virtual const char *getValueName() const { return 0; } + const char *getValueName() const override { return 0; } void printOptionDiff(const Option &O, bool V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. - virtual void anchor(); + void anchor() override; }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); @@ -786,13 +788,13 @@ public: } // getValueName - Do not print = at all. - virtual const char *getValueName() const { return 0; } + const char *getValueName() const override { return 0; } void printOptionDiff(const Option &O, boolOrDefault V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. - virtual void anchor(); + void anchor() override; }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); @@ -807,13 +809,13 @@ public: bool parse(Option &O, StringRef ArgName, StringRef Arg, int &Val); // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "int"; } + const char *getValueName() const override { return "int"; } void printOptionDiff(const Option &O, int V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. - virtual void anchor(); + void anchor() override; }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); @@ -829,13 +831,13 @@ public: bool parse(Option &O, StringRef ArgName, StringRef Arg, unsigned &Val); // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "uint"; } + const char *getValueName() const override { return "uint"; } void printOptionDiff(const Option &O, unsigned V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. - virtual void anchor(); + void anchor() override; }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); @@ -851,13 +853,13 @@ public: unsigned long long &Val); // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "uint"; } + const char *getValueName() const override { return "uint"; } void printOptionDiff(const Option &O, unsigned long long V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. - virtual void anchor(); + void anchor() override; }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); @@ -872,13 +874,13 @@ public: bool parse(Option &O, StringRef ArgName, StringRef Arg, double &Val); // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "number"; } + const char *getValueName() const override { return "number"; } void printOptionDiff(const Option &O, double V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. - virtual void anchor(); + void anchor() override; }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); @@ -893,13 +895,13 @@ public: bool parse(Option &O, StringRef ArgName, StringRef Arg, float &Val); // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "number"; } + const char *getValueName() const override { return "number"; } void printOptionDiff(const Option &O, float V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. - virtual void anchor(); + void anchor() override; }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); @@ -917,13 +919,13 @@ public: } // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "string"; } + const char *getValueName() const override { return "string"; } void printOptionDiff(const Option &O, StringRef V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. - virtual void anchor(); + void anchor() override; }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); @@ -941,13 +943,13 @@ public: } // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "char"; } + const char *getValueName() const override { return "char"; } void printOptionDiff(const Option &O, char V, OptVal Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. - virtual void anchor(); + void anchor() override; }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); @@ -1157,8 +1159,8 @@ class opt : public Option, is_class::value> { ParserClass Parser; - virtual bool handleOccurrence(unsigned pos, StringRef ArgName, - StringRef Arg) { + bool handleOccurrence(unsigned pos, StringRef ArgName, + StringRef Arg) override { typename ParserClass::parser_data_type Val = typename ParserClass::parser_data_type(); if (Parser.parse(*this, ArgName, Arg, Val)) @@ -1168,20 +1170,20 @@ class opt : public Option, return false; } - virtual enum ValueExpected getValueExpectedFlagDefault() const { + enum ValueExpected getValueExpectedFlagDefault() const override { return Parser.getValueExpectedFlagDefault(); } - virtual void getExtraOptionNames(SmallVectorImpl &OptionNames) { + void getExtraOptionNames(SmallVectorImpl &OptionNames) override { return Parser.getExtraOptionNames(OptionNames); } // Forward printing stuff to the parser... - virtual size_t getOptionWidth() const {return Parser.getOptionWidth(*this);} - virtual void printOptionInfo(size_t GlobalWidth) const { + size_t getOptionWidth() const override {return Parser.getOptionWidth(*this);} + void printOptionInfo(size_t GlobalWidth) const override { Parser.printOptionInfo(*this, GlobalWidth); } - virtual void printOptionValue(size_t GlobalWidth, bool Force) const { + void printOptionValue(size_t GlobalWidth, bool Force) const override { if (Force || this->getDefault().compare(this->getValue())) { cl::printOptionDiff( *this, Parser, this->getValue(), this->getDefault(), GlobalWidth); @@ -1328,14 +1330,15 @@ class list : public Option, public list_storage { std::vector Positions; ParserClass Parser; - virtual enum ValueExpected getValueExpectedFlagDefault() const { + enum ValueExpected getValueExpectedFlagDefault() const override { return Parser.getValueExpectedFlagDefault(); } - virtual void getExtraOptionNames(SmallVectorImpl &OptionNames) { + void getExtraOptionNames(SmallVectorImpl &OptionNames) override { return Parser.getExtraOptionNames(OptionNames); } - virtual bool handleOccurrence(unsigned pos, StringRef ArgName, StringRef Arg){ + bool handleOccurrence(unsigned pos, StringRef ArgName, + StringRef Arg) override { typename ParserClass::parser_data_type Val = typename ParserClass::parser_data_type(); if (Parser.parse(*this, ArgName, Arg, Val)) @@ -1347,13 +1350,14 @@ class list : public Option, public list_storage { } // Forward printing stuff to the parser... - virtual size_t getOptionWidth() const {return Parser.getOptionWidth(*this);} - virtual void printOptionInfo(size_t GlobalWidth) const { + size_t getOptionWidth() const override {return Parser.getOptionWidth(*this);} + void printOptionInfo(size_t GlobalWidth) const override { Parser.printOptionInfo(*this, GlobalWidth); } // Unimplemented: list options don't currently store their default value. - virtual void printOptionValue(size_t /*GlobalWidth*/, bool /*Force*/) const {} + void printOptionValue(size_t /*GlobalWidth*/, + bool /*Force*/) const override {} void done() { addArgument(); @@ -1530,14 +1534,15 @@ class bits : public Option, public bits_storage { std::vector Positions; ParserClass Parser; - virtual enum ValueExpected getValueExpectedFlagDefault() const { + enum ValueExpected getValueExpectedFlagDefault() const override { return Parser.getValueExpectedFlagDefault(); } - virtual void getExtraOptionNames(SmallVectorImpl &OptionNames) { + void getExtraOptionNames(SmallVectorImpl &OptionNames) override { return Parser.getExtraOptionNames(OptionNames); } - virtual bool handleOccurrence(unsigned pos, StringRef ArgName, StringRef Arg){ + bool handleOccurrence(unsigned pos, StringRef ArgName, + StringRef Arg) override { typename ParserClass::parser_data_type Val = typename ParserClass::parser_data_type(); if (Parser.parse(*this, ArgName, Arg, Val)) @@ -1549,13 +1554,14 @@ class bits : public Option, public bits_storage { } // Forward printing stuff to the parser... - virtual size_t getOptionWidth() const {return Parser.getOptionWidth(*this);} - virtual void printOptionInfo(size_t GlobalWidth) const { + size_t getOptionWidth() const override {return Parser.getOptionWidth(*this);} + void printOptionInfo(size_t GlobalWidth) const override { Parser.printOptionInfo(*this, GlobalWidth); } // Unimplemented: bits options don't currently store their default values. - virtual void printOptionValue(size_t /*GlobalWidth*/, bool /*Force*/) const {} + void printOptionValue(size_t /*GlobalWidth*/, + bool /*Force*/) const override {} void done() { addArgument(); @@ -1640,19 +1646,19 @@ public: class alias : public Option { Option *AliasFor; - virtual bool handleOccurrence(unsigned pos, StringRef /*ArgName*/, + bool handleOccurrence(unsigned pos, StringRef /*ArgName*/, StringRef Arg) override { return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg); } // Handle printing stuff... - virtual size_t getOptionWidth() const override; - virtual void printOptionInfo(size_t GlobalWidth) const override; + size_t getOptionWidth() const override; + void printOptionInfo(size_t GlobalWidth) const override; // Aliases do not need to print their values. - virtual void printOptionValue(size_t /*GlobalWidth*/, - bool /*Force*/) const override {} + void printOptionValue(size_t /*GlobalWidth*/, + bool /*Force*/) const override {} - virtual ValueExpected getValueExpectedFlagDefault() const override { + ValueExpected getValueExpectedFlagDefault() const override { return AliasFor->getValueExpectedFlag(); } diff --git a/include/llvm/Support/Format.h b/include/llvm/Support/Format.h index aaa54e1090..a62801f166 100644 --- a/include/llvm/Support/Format.h +++ b/include/llvm/Support/Format.h @@ -84,7 +84,7 @@ public: : format_object_base(fmt), Val(val) { } - virtual int snprint(char *Buffer, unsigned BufferSize) const { + int snprint(char *Buffer, unsigned BufferSize) const override { return snprintf(Buffer, BufferSize, Fmt, Val); } }; @@ -102,7 +102,7 @@ public: : format_object_base(fmt), Val1(val1), Val2(val2) { } - virtual int snprint(char *Buffer, unsigned BufferSize) const { + int snprint(char *Buffer, unsigned BufferSize) const override { return snprintf(Buffer, BufferSize, Fmt, Val1, Val2); } }; @@ -121,7 +121,7 @@ public: : format_object_base(fmt), Val1(val1), Val2(val2), Val3(val3) { } - virtual int snprint(char *Buffer, unsigned BufferSize) const { + int snprint(char *Buffer, unsigned BufferSize) const override { return snprintf(Buffer, BufferSize, Fmt, Val1, Val2, Val3); } }; @@ -142,7 +142,7 @@ public: : format_object_base(fmt), Val1(val1), Val2(val2), Val3(val3), Val4(val4) { } - virtual int snprint(char *Buffer, unsigned BufferSize) const { + int snprint(char *Buffer, unsigned BufferSize) const override { return snprintf(Buffer, BufferSize, Fmt, Val1, Val2, Val3, Val4); } }; @@ -165,7 +165,7 @@ public: Val5(val5) { } - virtual int snprint(char *Buffer, unsigned BufferSize) const { + int snprint(char *Buffer, unsigned BufferSize) const override { return snprintf(Buffer, BufferSize, Fmt, Val1, Val2, Val3, Val4, Val5); } }; diff --git a/include/llvm/Support/FormattedStream.h b/include/llvm/Support/FormattedStream.h index 542e2a7d8d..d8eb068838 100644 --- a/include/llvm/Support/FormattedStream.h +++ b/include/llvm/Support/FormattedStream.h @@ -129,25 +129,23 @@ public: /// getLine - Return the line number unsigned getLine() { return Position.second; } - - raw_ostream &resetColor() { + + raw_ostream &resetColor() override { TheStream->resetColor(); return *this; } - - raw_ostream &reverseColor() { + + raw_ostream &reverseColor() override { TheStream->reverseColor(); return *this; } - - raw_ostream &changeColor(enum Colors Color, - bool Bold, - bool BG) { + + raw_ostream &changeColor(enum Colors Color, bool Bold, bool BG) override { TheStream->changeColor(Color, Bold, BG); return *this; } - - bool is_displayed() const { + + bool is_displayed() const override { return TheStream->is_displayed(); } diff --git a/include/llvm/Support/Process.h b/include/llvm/Support/Process.h index 2b69ad3944..7f6441ea20 100644 --- a/include/llvm/Support/Process.h +++ b/include/llvm/Support/Process.h @@ -110,10 +110,10 @@ class self_process : public process { virtual ~self_process(); public: - virtual id_type get_id(); - virtual TimeValue get_user_time() const; - virtual TimeValue get_system_time() const; - virtual TimeValue get_wall_time() const; + id_type get_id() override; + TimeValue get_user_time() const override; + TimeValue get_system_time() const override; + TimeValue get_wall_time() const override; /// \name Process configuration (sysconf on POSIX) /// @{ diff --git a/include/llvm/Support/YAMLParser.h b/include/llvm/Support/YAMLParser.h index a68e8ab5bf..492d6ec7fc 100644 --- a/include/llvm/Support/YAMLParser.h +++ b/include/llvm/Support/YAMLParser.h @@ -175,7 +175,7 @@ private: /// Example: /// !!null null class NullNode : public Node { - virtual void anchor(); + void anchor() override; public: NullNode(OwningPtr &D) : Node(NK_Null, D, StringRef(), StringRef()) {} @@ -191,7 +191,7 @@ public: /// Example: /// Adena class ScalarNode : public Node { - virtual void anchor(); + void anchor() override; public: ScalarNode(OwningPtr &D, StringRef Anchor, StringRef Tag, StringRef Val) @@ -233,7 +233,7 @@ private: /// Example: /// Section: .text class KeyValueNode : public Node { - virtual void anchor(); + void anchor() override; public: KeyValueNode(OwningPtr &D) : Node(NK_KeyValue, D, StringRef(), StringRef()) @@ -345,7 +345,7 @@ void skip(CollectionType &C) { /// Name: _main /// Scope: Global class MappingNode : public Node { - virtual void anchor(); + void anchor() override; public: enum MappingType { MT_Block, @@ -395,7 +395,7 @@ private: /// - Hello /// - World class SequenceNode : public Node { - virtual void anchor(); + void anchor() override; public: enum SequenceType { ST_Block, @@ -451,7 +451,7 @@ private: /// Example: /// *AnchorName class AliasNode : public Node { - virtual void anchor(); + void anchor() override; public: AliasNode(OwningPtr &D, StringRef Val) : Node(NK_Alias, D, StringRef(), StringRef()), Name(Val) {} diff --git a/include/llvm/Support/YAMLTraits.h b/include/llvm/Support/YAMLTraits.h index 89890e6ee3..8157a784ec 100644 --- a/include/llvm/Support/YAMLTraits.h +++ b/include/llvm/Support/YAMLTraits.h @@ -750,29 +750,29 @@ public: llvm::error_code error(); private: - virtual bool outputting(); - virtual bool mapTag(StringRef, bool); - virtual void beginMapping(); - virtual void endMapping(); - virtual bool preflightKey(const char *, bool, bool, bool &, void *&); - virtual void postflightKey(void *); - virtual unsigned beginSequence(); - virtual void endSequence(); - virtual bool preflightElement(unsigned index, void *&); - virtual void postflightElement(void *); - virtual unsigned beginFlowSequence(); - virtual bool preflightFlowElement(unsigned , void *&); - virtual void postflightFlowElement(void *); - virtual void endFlowSequence(); - virtual void beginEnumScalar(); - virtual bool matchEnumScalar(const char*, bool); - virtual void endEnumScalar(); - virtual bool beginBitSetScalar(bool &); - virtual bool bitSetMatch(const char *, bool ); - virtual void endBitSetScalar(); - virtual void scalarString(StringRef &); - virtual void setError(const Twine &message); - virtual bool canElideEmptySequence(); + bool outputting() override; + bool mapTag(StringRef, bool) override; + void beginMapping() override; + void endMapping() override; + bool preflightKey(const char *, bool, bool, bool &, void *&) override; + void postflightKey(void *) override; + unsigned beginSequence() override; + void endSequence() override; + bool preflightElement(unsigned index, void *&) override; + void postflightElement(void *) override; + unsigned beginFlowSequence() override; + bool preflightFlowElement(unsigned , void *&) override; + void postflightFlowElement(void *) override; + void endFlowSequence() override; + void beginEnumScalar() override; + bool matchEnumScalar(const char*, bool) override; + void endEnumScalar() override; + bool beginBitSetScalar(bool &) override; + bool bitSetMatch(const char *, bool ) override; + void endBitSetScalar() override; + void scalarString(StringRef &) override; + void setError(const Twine &message) override; + bool canElideEmptySequence() override; class HNode { virtual void anchor(); @@ -785,7 +785,7 @@ private: }; class EmptyHNode : public HNode { - virtual void anchor(); + void anchor() override; public: EmptyHNode(Node *n) : HNode(n) { } static inline bool classof(const HNode *n) { @@ -795,7 +795,7 @@ private: }; class ScalarHNode : public HNode { - virtual void anchor(); + void anchor() override; public: ScalarHNode(Node *n, StringRef s) : HNode(n), _value(s) { } @@ -875,29 +875,29 @@ public: Output(llvm::raw_ostream &, void *Ctxt=NULL); virtual ~Output(); - virtual bool outputting(); - virtual bool mapTag(StringRef, bool); - virtual void beginMapping(); - virtual void endMapping(); - virtual bool preflightKey(const char *key, bool, bool, bool &, void *&); - virtual void postflightKey(void *); - virtual unsigned beginSequence(); - virtual void endSequence(); - virtual bool preflightElement(unsigned, void *&); - virtual void postflightElement(void *); - virtual unsigned beginFlowSequence(); - virtual bool preflightFlowElement(unsigned, void *&); - virtual void postflightFlowElement(void *); - virtual void endFlowSequence(); - virtual void beginEnumScalar(); - virtual bool matchEnumScalar(const char*, bool); - virtual void endEnumScalar(); - virtual bool beginBitSetScalar(bool &); - virtual bool bitSetMatch(const char *, bool ); - virtual void endBitSetScalar(); - virtual void scalarString(StringRef &); - virtual void setError(const Twine &message); - virtual bool canElideEmptySequence(); + bool outputting() override; + bool mapTag(StringRef, bool) override; + void beginMapping() override; + void endMapping() override; + bool preflightKey(const char *key, bool, bool, bool &, void *&) override; + void postflightKey(void *) override; + unsigned beginSequence() override; + void endSequence() override; + bool preflightElement(unsigned, void *&) override; + void postflightElement(void *) override; + unsigned beginFlowSequence() override; + bool preflightFlowElement(unsigned, void *&) override; + void postflightFlowElement(void *) override; + void endFlowSequence() override; + void beginEnumScalar() override; + bool matchEnumScalar(const char*, bool) override; + void endEnumScalar() override; + bool beginBitSetScalar(bool &) override; + bool bitSetMatch(const char *, bool ) override; + void endBitSetScalar() override; + void scalarString(StringRef &) override; + void setError(const Twine &message) override; + bool canElideEmptySequence() override; public: // These are only used by operator<<. They could be private // if that templated operator could be made a friend. -- cgit v1.2.3