Commit 2bf94b86 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[clang-tidy] Make deleted member functions public

Making them private was a way to hide them, we can explicitly delete
them, which give a better compilation error message as well.

Also see: https://stackoverflow.com/q/55205874

Bug: v8:10488
Change-Id: I3f2b6881ae2252809c84fbd32ce0687e8328506e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2211182Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67980}
parent dafba0d3
......@@ -47,6 +47,7 @@ std::string ToString(Args&&... args) {
class V8_EXPORT_PRIVATE MessageBuilder {
public:
MessageBuilder() = delete;
MessageBuilder(const std::string& message, TorqueMessage::Kind kind);
MessageBuilder& Position(SourcePosition position) {
......@@ -62,7 +63,6 @@ class V8_EXPORT_PRIVATE MessageBuilder {
}
private:
MessageBuilder() = delete;
void Report() const;
TorqueMessage message_;
......@@ -370,10 +370,10 @@ class IfDefScope {
public:
IfDefScope(std::ostream& os, std::string d);
~IfDefScope();
private:
IfDefScope(const IfDefScope&) = delete;
IfDefScope& operator=(const IfDefScope&) = delete;
private:
std::ostream& os_;
std::string d_;
};
......@@ -383,10 +383,10 @@ class NamespaceScope {
NamespaceScope(std::ostream& os,
std::initializer_list<std::string> namespaces);
~NamespaceScope();
private:
NamespaceScope(const NamespaceScope&) = delete;
NamespaceScope& operator=(const NamespaceScope&) = delete;
private:
std::ostream& os_;
std::vector<std::string> d_;
};
......@@ -395,10 +395,10 @@ class IncludeGuardScope {
public:
IncludeGuardScope(std::ostream& os, std::string file_name);
~IncludeGuardScope();
private:
IncludeGuardScope(const IncludeGuardScope&) = delete;
IncludeGuardScope& operator=(const IncludeGuardScope&) = delete;
private:
std::ostream& os_;
std::string d_;
};
......@@ -407,10 +407,10 @@ class IncludeObjectMacrosScope {
public:
explicit IncludeObjectMacrosScope(std::ostream& os);
~IncludeObjectMacrosScope();
private:
IncludeObjectMacrosScope(const IncludeObjectMacrosScope&) = delete;
IncludeObjectMacrosScope& operator=(const IncludeObjectMacrosScope&) = delete;
private:
std::ostream& os_;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment