Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/include/llvm/ADT/AddressRanges.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace llvm {
/// a start and an end address: [Start, End).
class AddressRange {
public:
AddressRange() {}
AddressRange() = default;
AddressRange(uint64_t S, uint64_t E) : Start(S), End(E) {
assert(Start <= End);
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/ELFAttributeParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace llvm {

class ELFAttributeParser {
public:
virtual ~ELFAttributeParser() {}
virtual ~ELFAttributeParser() = default;

virtual Error parse(ArrayRef<uint8_t> Section, llvm::endianness Endian) {
return llvm::Error::success();
Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/Support/GraphWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ template <typename GraphType, typename Derived> class GraphWriterBase {
DTraits = DOTTraits(SN);
RenderUsingHTML = DTraits.renderNodesUsingHTML();
}
virtual ~GraphWriterBase() {}
virtual ~GraphWriterBase() = default;

void writeGraph(const std::string &Title = "") {
// Output the header for the graph...
Expand Down Expand Up @@ -369,7 +369,7 @@ class GraphWriter : public GraphWriterBase<GraphType, GraphWriter<GraphType>> {
public:
GraphWriter(raw_ostream &o, const GraphType &g, bool SN)
: GraphWriterBase<GraphType, GraphWriter<GraphType>>(o, g, SN) {}
~GraphWriter() override {}
~GraphWriter() override = default;
};

template <typename GraphType>
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Support/raw_socket_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ ListeningSocket::~ListeningSocket() {
raw_socket_stream::raw_socket_stream(int SocketFD)
: raw_fd_stream(SocketFD, true) {}

raw_socket_stream::~raw_socket_stream() {}
raw_socket_stream::~raw_socket_stream() = default;

Expected<std::unique_ptr<raw_socket_stream>>
raw_socket_stream::createConnectedUnix(StringRef SocketPath) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/ADT/ConcurrentHashtableTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using namespace parallel;
namespace {
class String {
public:
String() {}
String() = default;
const std::string &getKey() const { return Data; }

template <typename AllocatorTy>
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/ADT/DirectedGraphTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DGTestEdge : public DGTestEdgeBase {
class DGTestGraph : public DGTestBase {
public:
DGTestGraph() = default;
~DGTestGraph(){};
~DGTestGraph() = default;
};

using EdgeListTy = SmallVector<DGTestEdge *, 2>;
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/ADT/IListTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace {
struct Node : ilist_node<Node> {
int Value;

Node() {}
Node() = default;
Node(int Value) : Value(Value) {}
Node(const Node&) = default;
~Node() { Value = -1; }
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/ADT/SmallVectorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ int Constructable::numCopyAssignmentCalls;
int Constructable::numMoveAssignmentCalls;

struct NonCopyable {
NonCopyable() {}
NonCopyable() = default;
NonCopyable(NonCopyable &&) {}
NonCopyable &operator=(NonCopyable &&) { return *this; }
private:
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/ADT/StringMapTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ TEST_F(StringMapTest, NonDefaultConstructable) {
}

struct Immovable {
Immovable() {}
Immovable() = default;
Immovable(Immovable &&) = delete; // will disable the other special members
};

Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/ADT/TypeSwitchTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ TEST(TypeSwitchTest, DefaultNullptr) {
TEST(TypeSwitchTest, DefaultNullptrForPointerLike) {
struct Value {
void *ptr;
Value(const Value &other) : ptr(other.ptr) {}
Value(const Value &other) = default;
Value(std::nullptr_t) : ptr(nullptr) {}
Value() : Value(nullptr) {}
};
Expand Down
16 changes: 8 additions & 8 deletions llvm/unittests/Support/AlignOfTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ struct V8 : V5, virtual V6, V7 { double zz;

double S6::f() { return 0.0; }
float D2::g() { return 0.0f; }
V1::~V1() {}
V2::~V2() {}
V3::~V3() {}
V4::~V4() {}
V5::~V5() {}
V6::~V6() {}
V7::~V7() {}
V8::~V8() {}
V1::~V1() = default;
V2::~V2() = default;
V3::~V3() = default;
V4::~V4() = default;
V5::~V5() = default;
V6::~V6() = default;
V7::~V7() = default;
V8::~V8() = default;

template <typename M> struct T { M m; };

Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/Support/AllocatorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class MockSlabAllocator {
static size_t LastSlabSize;

public:
~MockSlabAllocator() { }
~MockSlabAllocator() = default;

void *Allocate(size_t Size, size_t /*Alignment*/) {
// Allocate space for the alignment, the slab, and a void* that goes right
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/Support/BinaryStreamTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ constexpr uint32_t NumStreams = 2 * NumEndians;
class BinaryStreamTest : public testing::Test {

public:
BinaryStreamTest() {}
BinaryStreamTest() = default;

void SetUp() override {
Streams.clear();
Expand Down
10 changes: 5 additions & 5 deletions llvm/unittests/Support/Casting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ template <typename T> IllegalCast *cast(...) { return nullptr; }
// with conversion facility
//
struct bar {
bar() {}
bar() = default;
bar(const bar &) = delete;
struct foo *baz();
struct foo *caz();
Expand All @@ -36,7 +36,7 @@ struct foo {
};

struct base {
virtual ~base() {}
virtual ~base() = default;
};

struct derived : public base {
Expand Down Expand Up @@ -375,12 +375,12 @@ namespace inferred_upcasting {
class Base {
public:
// No classof. We are testing that the upcast is inferred.
Base() {}
Base() = default;
};

class Derived : public Base {
public:
Derived() {}
Derived() = default;
};

// Even with no explicit classof() in Base, we should still be able to cast
Expand Down Expand Up @@ -529,7 +529,7 @@ TEST(CastingTest, smart_dyn_cast_or_null) {
#ifndef NDEBUG
namespace assertion_checks {
struct Base {
virtual ~Base() {}
virtual ~Base() = default;
};

struct Derived : public Base {
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/Support/InstructionCostTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ using namespace llvm;
namespace {

struct CostTest : public testing::Test {
CostTest() {}
CostTest() = default;
};

} // namespace
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/Support/OptimizedStructLayoutTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LayoutTest {
bool Verified = false;

public:
LayoutTest() {}
LayoutTest() = default;
LayoutTest(const LayoutTest &) = delete;
LayoutTest &operator=(const LayoutTest &) = delete;
~LayoutTest() { assert(Verified); }
Expand Down