Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Core, unify closing inclusion guards

patch by Eugene Zelenko

Differential Revision: http://reviews.llvm.org/D11695

llvm-svn: 245275
This commit is contained in:
Pavel Labath 2015-08-18 08:39:09 +00:00
parent 08d823afe4
commit 280eb8ab4d
10 changed files with 76 additions and 91 deletions

View File

@ -28,33 +28,32 @@ public:
ConnectionSharedMemory (); ConnectionSharedMemory ();
virtual ~ConnectionSharedMemory () override;
~ConnectionSharedMemory ();
virtual bool bool
IsConnected () const; IsConnected () const override;
virtual lldb::ConnectionStatus virtual lldb::ConnectionStatus
BytesAvailable (uint32_t timeout_usec, Error *error_ptr); BytesAvailable (uint32_t timeout_usec, Error *error_ptr);
virtual lldb::ConnectionStatus lldb::ConnectionStatus
Connect (const char *s, Error *error_ptr); Connect (const char *s, Error *error_ptr) override;
virtual lldb::ConnectionStatus lldb::ConnectionStatus
Disconnect (Error *error_ptr); Disconnect (Error *error_ptr) override;
virtual size_t size_t
Read (void *dst, Read (void *dst,
size_t dst_len, size_t dst_len,
uint32_t timeout_usec, uint32_t timeout_usec,
lldb::ConnectionStatus &status, lldb::ConnectionStatus &status,
Error *error_ptr); Error *error_ptr) override;
virtual size_t size_t
Write (const void *src, size_t src_len, lldb::ConnectionStatus &status, Error *error_ptr); Write (const void *src, size_t src_len, lldb::ConnectionStatus &status, Error *error_ptr) override;
virtual std::string std::string
GetURI(); GetURI() override;
lldb::ConnectionStatus lldb::ConnectionStatus
Open (bool create, const char *name, size_t size, Error *error_ptr); Open (bool create, const char *name, size_t size, Error *error_ptr);
@ -64,10 +63,12 @@ protected:
std::string m_name; std::string m_name;
int m_fd; // One buffer that contains all we need int m_fd; // One buffer that contains all we need
DataBufferMemoryMap m_mmap; DataBufferMemoryMap m_mmap;
private: private:
DISALLOW_COPY_AND_ASSIGN (ConnectionSharedMemory); DISALLOW_COPY_AND_ASSIGN (ConnectionSharedMemory);
}; };
} // namespace lldb_private } // namespace lldb_private
#endif // liblldb_ConnectionSharedMemory_h_ #endif // liblldb_ConnectionSharedMemory_h_

View File

@ -9,7 +9,6 @@
#ifndef liblldb_DataBufferHeap_h_ #ifndef liblldb_DataBufferHeap_h_
#define liblldb_DataBufferHeap_h_ #define liblldb_DataBufferHeap_h_
#if defined(__cplusplus)
#include <vector> #include <vector>
@ -69,26 +68,25 @@ public:
/// Virtual destructor since this class inherits from a pure virtual /// Virtual destructor since this class inherits from a pure virtual
/// base class #DataBuffer. /// base class #DataBuffer.
//------------------------------------------------------------------ //------------------------------------------------------------------
virtual ~DataBufferHeap() override;
~DataBufferHeap();
//------------------------------------------------------------------ //------------------------------------------------------------------
/// @copydoc DataBuffer::GetBytes() /// @copydoc DataBuffer::GetBytes()
//------------------------------------------------------------------ //------------------------------------------------------------------
virtual uint8_t * uint8_t *
GetBytes (); GetBytes () override;
//------------------------------------------------------------------ //------------------------------------------------------------------
/// @copydoc DataBuffer::GetBytes() const /// @copydoc DataBuffer::GetBytes() const
//------------------------------------------------------------------ //------------------------------------------------------------------
virtual const uint8_t * const uint8_t *
GetBytes () const; GetBytes () const override;
//------------------------------------------------------------------ //------------------------------------------------------------------
/// @copydoc DataBuffer::GetByteSize() const /// @copydoc DataBuffer::GetByteSize() const
//------------------------------------------------------------------ //------------------------------------------------------------------
virtual lldb::offset_t lldb::offset_t
GetByteSize () const; GetByteSize () const override;
//------------------------------------------------------------------ //------------------------------------------------------------------
/// Set the number of bytes in the data buffer. /// Set the number of bytes in the data buffer.
@ -138,5 +136,4 @@ private:
} // namespace lldb_private } // namespace lldb_private
#endif // #if defined(__cplusplus) #endif // liblldb_DataBufferHeap_h_
#endif // liblldb_DataBufferHeap_h_

View File

@ -9,8 +9,6 @@
#ifndef liblldb_DataBufferMemoryMap_h_ #ifndef liblldb_DataBufferMemoryMap_h_
#define liblldb_DataBufferMemoryMap_h_ #define liblldb_DataBufferMemoryMap_h_
#if defined(__cplusplus)
#include "lldb/lldb-private.h" #include "lldb/lldb-private.h"
#include "lldb/Core/DataBuffer.h" #include "lldb/Core/DataBuffer.h"
@ -45,8 +43,7 @@ public:
/// Virtual destructor since this class inherits from a pure virtual /// Virtual destructor since this class inherits from a pure virtual
/// base class #DataBuffer. /// base class #DataBuffer.
//------------------------------------------------------------------ //------------------------------------------------------------------
virtual ~DataBufferMemoryMap () override;
~DataBufferMemoryMap ();
//------------------------------------------------------------------ //------------------------------------------------------------------
/// Reverts this object to an empty state by unmapping any memory /// Reverts this object to an empty state by unmapping any memory
@ -58,20 +55,20 @@ public:
//------------------------------------------------------------------ //------------------------------------------------------------------
/// @copydoc DataBuffer::GetBytes() /// @copydoc DataBuffer::GetBytes()
//------------------------------------------------------------------ //------------------------------------------------------------------
virtual uint8_t * uint8_t *
GetBytes (); GetBytes () override;
//------------------------------------------------------------------ //------------------------------------------------------------------
/// @copydoc DataBuffer::GetBytes() const /// @copydoc DataBuffer::GetBytes() const
//------------------------------------------------------------------ //------------------------------------------------------------------
virtual const uint8_t * const uint8_t *
GetBytes () const; GetBytes () const override;
//------------------------------------------------------------------ //------------------------------------------------------------------
/// @copydoc DataBuffer::GetByteSize() const /// @copydoc DataBuffer::GetByteSize() const
//------------------------------------------------------------------ //------------------------------------------------------------------
virtual lldb::offset_t lldb::offset_t
GetByteSize () const; GetByteSize () const override;
//------------------------------------------------------------------ //------------------------------------------------------------------
/// Error get accessor. /// Error get accessor.
@ -161,5 +158,4 @@ private:
} // namespace lldb_private } // namespace lldb_private
#endif // #if defined(__cplusplus) #endif // liblldb_DataBufferMemoryMap_h_
#endif // liblldb_DataBufferMemoryMap_h_

View File

@ -233,8 +233,7 @@ public:
{ {
} }
virtual ~Array() override
~Array()
{ {
} }
@ -249,7 +248,6 @@ public:
return true; return true;
} }
size_t size_t
GetSize() const GetSize() const
{ {
@ -375,8 +373,7 @@ public:
collection m_items; collection m_items;
}; };
class Integer : public Object
class Integer : public Object
{ {
public: public:
Integer (uint64_t i = 0) : Integer (uint64_t i = 0) :
@ -385,7 +382,7 @@ public:
{ {
} }
virtual ~Integer() ~Integer() override
{ {
} }
@ -407,7 +404,7 @@ public:
uint64_t m_value; uint64_t m_value;
}; };
class Float : public Object class Float : public Object
{ {
public: public:
Float (double d = 0.0) : Float (double d = 0.0) :
@ -416,7 +413,7 @@ public:
{ {
} }
virtual ~Float() ~Float() override
{ {
} }
@ -438,7 +435,7 @@ public:
double m_value; double m_value;
}; };
class Boolean : public Object class Boolean : public Object
{ {
public: public:
Boolean (bool b = false) : Boolean (bool b = false) :
@ -447,7 +444,7 @@ public:
{ {
} }
virtual ~Boolean() ~Boolean() override
{ {
} }
@ -469,9 +466,7 @@ public:
bool m_value; bool m_value;
}; };
class String : public Object
class String : public Object
{ {
public: public:
String (const char *cstr = NULL) : String (const char *cstr = NULL) :
@ -522,7 +517,7 @@ public:
{ {
} }
virtual ~Dictionary() ~Dictionary() override
{ {
} }
@ -728,7 +723,7 @@ public:
{ {
} }
virtual ~Null() ~Null() override
{ {
} }
@ -778,10 +773,8 @@ public:
static ObjectSP static ObjectSP
ParseJSON (std::string json_text); ParseJSON (std::string json_text);
}; // class StructuredData }; // class StructuredData
} // namespace lldb_private } // namespace lldb_private
#endif // liblldb_StructuredData_h_ #endif // liblldb_StructuredData_h_

View File

@ -29,23 +29,22 @@ public:
const ConstString &name, const ConstString &name,
const CompilerType &cast_type); const CompilerType &cast_type);
virtual ~ValueObjectCast() override;
~ValueObjectCast();
virtual uint64_t uint64_t
GetByteSize(); GetByteSize() override;
virtual size_t size_t
CalculateNumChildren(); CalculateNumChildren() override;
virtual lldb::ValueType lldb::ValueType
GetValueType() const; GetValueType() const override;
virtual bool bool
IsInScope (); IsInScope() override;
virtual ValueObject * ValueObject *
GetParent() GetParent() override
{ {
if (m_parent) if (m_parent)
return m_parent->GetParent(); return m_parent->GetParent();
@ -53,8 +52,8 @@ public:
return NULL; return NULL;
} }
virtual const ValueObject * const ValueObject *
GetParent() const GetParent() const override
{ {
if (m_parent) if (m_parent)
return m_parent->GetParent(); return m_parent->GetParent();
@ -84,4 +83,4 @@ private:
} // namespace lldb_private } // namespace lldb_private
#endif // liblldb_ValueObjectCast_h_ #endif // liblldb_ValueObjectCast_h_

View File

@ -129,4 +129,4 @@ protected:
} // namespace lldb_private } // namespace lldb_private
#endif // liblldb_ValueObjectChild_h_ #endif // liblldb_ValueObjectChild_h_

View File

@ -187,4 +187,4 @@ private:
} // namespace lldb_private } // namespace lldb_private
#endif // liblldb_ValueObjectConstResult_h_ #endif // liblldb_ValueObjectConstResult_h_

View File

@ -28,16 +28,15 @@ public:
const CompilerType &cast_type, const CompilerType &cast_type,
lldb::addr_t live_address = LLDB_INVALID_ADDRESS); lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
virtual ~ValueObjectConstResultCast() override;
~ValueObjectConstResultCast ();
virtual lldb::ValueObjectSP lldb::ValueObjectSP
Dereference (Error &error); Dereference(Error &error) override;
virtual ValueObject * ValueObject *
CreateChildAtIndex (size_t idx, CreateChildAtIndex(size_t idx,
bool synthetic_array_member, bool synthetic_array_member,
int32_t synthetic_index); int32_t synthetic_index) override;
virtual CompilerType virtual CompilerType
GetClangType () GetClangType ()

View File

@ -37,13 +37,13 @@ public:
bool is_deref_of_parent, bool is_deref_of_parent,
lldb::addr_t live_address = LLDB_INVALID_ADDRESS); lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
virtual ~ValueObjectConstResultChild(); ~ValueObjectConstResultChild() override;
virtual lldb::ValueObjectSP lldb::ValueObjectSP
Dereference (Error &error); Dereference(Error &error) override;
virtual ValueObject * ValueObject *
CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index); CreateChildAtIndex(size_t idx, bool synthetic_array_member, int32_t synthetic_index) override;
virtual CompilerType virtual CompilerType
GetClangType () GetClangType ()
@ -78,4 +78,4 @@ private:
} // namespace lldb_private } // namespace lldb_private
#endif // liblldb_ValueObjectConstResultChild_h_ #endif // liblldb_ValueObjectConstResultChild_h_

View File

@ -128,7 +128,7 @@ public:
ScriptInterpreterPython (CommandInterpreter &interpreter); ScriptInterpreterPython (CommandInterpreter &interpreter);
~ScriptInterpreterPython (); ~ScriptInterpreterPython() override;
bool bool
Interrupt() override; Interrupt() override;
@ -495,7 +495,7 @@ public:
FILE *out = NULL, FILE *out = NULL,
FILE *err = NULL); FILE *err = NULL);
~Locker (); ~Locker () override;
private: private:
@ -585,6 +585,6 @@ protected:
}; };
} // namespace lldb_private } // namespace lldb_private
#endif // #ifdef LLDB_DISABLE_PYTHON #endif // LLDB_DISABLE_PYTHON
#endif // #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H