Use 'override/final' instead of 'virtual' for overridden methods

The patch is generated using clang-tidy misc-use-override check.

This command was used:

  tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
    -checks='-*,misc-use-override' -header-filter='llvm|clang' \
    -j=32 -fix -format

http://reviews.llvm.org/D8925



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234679 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alexander Kornienko
2015-04-11 02:11:45 +00:00
parent 2c64a1129f
commit c16fc54851
165 changed files with 385 additions and 376 deletions

View File

@@ -15,8 +15,7 @@
namespace llvm {
class MCAsmInfoELF : public MCAsmInfo {
virtual void anchor();
const MCSection *
getNonexecutableStackSection(MCContext &Ctx) const override final;
const MCSection *getNonexecutableStackSection(MCContext &Ctx) const final;
protected:
MCAsmInfoELF();

View File

@@ -143,7 +143,7 @@ public:
: MCFragment(FType, SD), BundlePadding(0)
{
}
virtual ~MCEncodedFragment();
~MCEncodedFragment() override;
virtual SmallVectorImpl<char> &getContents() = 0;
virtual const SmallVectorImpl<char> &getContents() const = 0;
@@ -182,7 +182,7 @@ public:
{
}
virtual ~MCEncodedFragmentWithFixups();
~MCEncodedFragmentWithFixups() override;
typedef SmallVectorImpl<MCFixup>::const_iterator const_fixup_iterator;
typedef SmallVectorImpl<MCFixup>::iterator fixup_iterator;

View File

@@ -34,7 +34,7 @@ public:
: MCObjectStreamer(Context, TAB, OS, Emitter),
SeenIdent(false) {}
virtual ~MCELFStreamer();
~MCELFStreamer() override;
/// state management
void reset() override {

View File

@@ -141,7 +141,7 @@ public:
public:
raw_counting_ostream() : Count(0) {}
~raw_counting_ostream() { flush(); }
~raw_counting_ostream() override { flush(); }
};
raw_counting_ostream OutStream;

View File

@@ -51,7 +51,7 @@ class MCObjectStreamer : public MCStreamer {
protected:
MCObjectStreamer(MCContext &Context, MCAsmBackend &TAB, raw_ostream &OS,
MCCodeEmitter *Emitter);
~MCObjectStreamer();
~MCObjectStreamer() override;
public:
/// state management

View File

@@ -40,7 +40,7 @@ protected:
public:
AsmLexer(const MCAsmInfo &MAI);
~AsmLexer();
~AsmLexer() override;
void setBuffer(StringRef Buf, const char *ptr = nullptr);

View File

@@ -53,7 +53,7 @@ class MCSymbol;
assert ((Characteristics & 0x00F00000) == 0 &&
"alignment must not be set upon section creation");
}
~MCSectionCOFF();
~MCSectionCOFF() override;
public:
/// ShouldOmitSectionDirective - Decides whether a '.section' directive

View File

@@ -59,7 +59,7 @@ private:
: MCSection(SV_ELF, K, Begin), SectionName(Section), Type(type),
Flags(flags), UniqueID(UniqueID), EntrySize(entrySize), Group(group),
Associated(Associated) {}
~MCSectionELF();
~MCSectionELF() override;
void setSectionName(StringRef Name) { SectionName = Name; }

View File

@@ -90,7 +90,7 @@ public:
class AArch64TargetStreamer : public MCTargetStreamer {
public:
AArch64TargetStreamer(MCStreamer &S);
~AArch64TargetStreamer();
~AArch64TargetStreamer() override;
void finish() override;
@@ -115,7 +115,7 @@ private:
class ARMTargetStreamer : public MCTargetStreamer {
public:
ARMTargetStreamer(MCStreamer &S);
~ARMTargetStreamer();
~ARMTargetStreamer() override;
virtual void emitFnStart();
virtual void emitFnEnd();

View File

@@ -110,7 +110,7 @@ protected: // Can only create subclasses.
MCTargetOptions MCOptions;
public:
virtual ~MCTargetAsmParser();
~MCTargetAsmParser() override;
uint64_t getAvailableFeatures() const { return AvailableFeatures; }
void setAvailableFeatures(uint64_t Value) { AvailableFeatures = Value; }