diff options
| author | Alexander Kornienko <alexfh@google.com> | 2015-04-11 02:11:45 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2015-04-11 02:11:45 +0000 |
| commit | f817c1cb9afe641516b21fcc6e400681025f18f9 (patch) | |
| tree | 06bc60f7ff86fcc42f6b97ac69337b5b691528ae /llvm/lib/DebugInfo | |
| parent | 34eb20725d9d923f6f2ff9f205f198d5f3df022b (diff) | |
| download | bcm5719-llvm-f817c1cb9afe641516b21fcc6e400681025f18f9.tar.gz bcm5719-llvm-f817c1cb9afe641516b21fcc6e400681025f18f9.zip | |
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
llvm-svn: 234679
Diffstat (limited to 'llvm/lib/DebugInfo')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp | 11 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp | 12 |
3 files changed, 15 insertions, 14 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp index 9f5621414f2..784652927ec 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp @@ -197,8 +197,7 @@ public: DataAlignmentFactor(DataAlignmentFactor), ReturnAddressRegister(ReturnAddressRegister) {} - ~CIE() { - } + ~CIE() override {} uint64_t getCodeAlignmentFactor() const { return CodeAlignmentFactor; } int64_t getDataAlignmentFactor() const { return DataAlignmentFactor; } @@ -245,8 +244,7 @@ public: InitialLocation(InitialLocation), AddressRange(AddressRange), LinkedCIE(Cie) {} - ~FDE() { - } + ~FDE() override {} CIE *getLinkedCIE() const { return LinkedCIE; } diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp index b14af07a9db..0aff327366c 100644 --- a/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp +++ b/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp @@ -48,9 +48,10 @@ public: reset(); } - uint32_t getChildCount() const { return Args.size(); } + uint32_t getChildCount() const override { return Args.size(); } - std::unique_ptr<PDBSymbolData> getChildAtIndex(uint32_t Index) const { + std::unique_ptr<PDBSymbolData> + getChildAtIndex(uint32_t Index) const override { if (Index >= Args.size()) return nullptr; @@ -58,7 +59,7 @@ public: Args[Index]->getSymIndexId()); } - std::unique_ptr<PDBSymbolData> getNext() { + std::unique_ptr<PDBSymbolData> getNext() override { if (CurIter == Args.end()) return nullptr; const auto &Result = **CurIter; @@ -66,9 +67,9 @@ public: return Session.getConcreteSymbolById<PDBSymbolData>(Result.getSymIndexId()); } - void reset() { CurIter = Args.empty() ? Args.end() : Args.begin(); } + void reset() override { CurIter = Args.empty() ? Args.end() : Args.begin(); } - FunctionArgEnumerator *clone() const { + FunctionArgEnumerator *clone() const override { return new FunctionArgEnumerator(Session, Func); } diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp index 8018206c4cb..af3563f891f 100644 --- a/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp +++ b/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp @@ -34,25 +34,27 @@ public: std::unique_ptr<ArgEnumeratorType> ArgEnumerator) : Session(PDBSession), Enumerator(std::move(ArgEnumerator)) {} - uint32_t getChildCount() const { return Enumerator->getChildCount(); } + uint32_t getChildCount() const override { + return Enumerator->getChildCount(); + } - std::unique_ptr<PDBSymbol> getChildAtIndex(uint32_t Index) const { + std::unique_ptr<PDBSymbol> getChildAtIndex(uint32_t Index) const override { auto FunctionArgSymbol = Enumerator->getChildAtIndex(Index); if (!FunctionArgSymbol) return nullptr; return Session.getSymbolById(FunctionArgSymbol->getTypeId()); } - std::unique_ptr<PDBSymbol> getNext() { + std::unique_ptr<PDBSymbol> getNext() override { auto FunctionArgSymbol = Enumerator->getNext(); if (!FunctionArgSymbol) return nullptr; return Session.getSymbolById(FunctionArgSymbol->getTypeId()); } - void reset() { Enumerator->reset(); } + void reset() override { Enumerator->reset(); } - MyType *clone() const { + MyType *clone() const override { std::unique_ptr<ArgEnumeratorType> Clone(Enumerator->clone()); return new FunctionArgEnumerator(Session, std::move(Clone)); } |

