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
10 changes: 5 additions & 5 deletions llvm/unittests/ADT/TestGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ namespace llvm {
template <unsigned N>
class Graph {
private:
// Disable copying.
Graph(const Graph&);
Graph& operator=(const Graph&);

static void ValidateIndex(unsigned Idx) {
assert(Idx < N && "Invalid node index!");
}
public:
// Disable copying.
Graph(const Graph &) = delete;
Graph &operator=(const Graph &) = delete;

/// NodeSubset - A subset of the graph's nodes.
class NodeSubset {
Expand Down Expand Up @@ -169,11 +168,12 @@ class Graph {
/// yet been visited.
NodeSubset Children;

ChildIterator(); // Disable default constructor.
protected:
ChildIterator(NodeType *F, NodeSubset C) : FirstNode(F), Children(C) {}

public:
ChildIterator() = delete; // Disable default constructor.

/// ChildIterator - Copy constructor.
ChildIterator(const ChildIterator &other) = default;
ChildIterator &operator=(const ChildIterator &other) = default;
Expand Down
4 changes: 1 addition & 3 deletions llvm/unittests/Support/Casting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ template <typename T> IllegalCast *cast(...) { return nullptr; }
//
struct bar {
bar() {}
bar(const bar &) = delete;
struct foo *baz();
struct foo *caz();
struct foo *daz();
struct foo *naz();

private:
bar(const bar &);
};
struct foo {
foo(const bar &) {}
Expand Down
Loading