summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViet-Trung Luu <viettrungluu@chromium.org>2014-10-21 22:00:12 -0700
committerViet-Trung Luu <viettrungluu@chromium.org>2014-10-22 05:04:12 +0000
commit50df3edc46d054d4b7a6cec4098cd1538d66d511 (patch)
treed9e76ff0b96aa840f68e997baad2f2ddffc1126a
parented17d810c2ea78be87e0f1bf3f7c465f0fafc7cf (diff)
downloadchromium_src-50df3edc46d054d4b7a6cec4098cd1538d66d511.zip
chromium_src-50df3edc46d054d4b7a6cec4098cd1538d66d511.tar.gz
chromium_src-50df3edc46d054d4b7a6cec4098cd1538d66d511.tar.bz2
Update virtual/final usage in tools/gn/.
Also some #include fixes (from OVERRIDE -> override conversion). BUG=417463 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/643063004 Cr-Commit-Position: refs/heads/master@{#300635}
-rw-r--r--tools/gn/action_target_generator.h4
-rw-r--r--tools/gn/binary_target_generator.h4
-rw-r--r--tools/gn/builder_unittest.cc18
-rw-r--r--tools/gn/config.h8
-rw-r--r--tools/gn/copy_target_generator.h4
-rw-r--r--tools/gn/group_target_generator.h4
-rw-r--r--tools/gn/loader.h15
-rw-r--r--tools/gn/ninja_action_target_writer.h6
-rw-r--r--tools/gn/ninja_binary_target_writer.h6
-rw-r--r--tools/gn/ninja_copy_target_writer.h6
-rw-r--r--tools/gn/ninja_group_target_writer.h6
-rw-r--r--tools/gn/ninja_target_writer_unittest.cc2
-rw-r--r--tools/gn/parse_tree.h133
-rw-r--r--tools/gn/scope_per_file_provider.h3
-rw-r--r--tools/gn/setup.h9
-rw-r--r--tools/gn/target.h9
-rw-r--r--tools/gn/toolchain.h7
17 files changed, 117 insertions, 127 deletions
diff --git a/tools/gn/action_target_generator.h b/tools/gn/action_target_generator.h
index f9faba6..3c8b5a8 100644
--- a/tools/gn/action_target_generator.h
+++ b/tools/gn/action_target_generator.h
@@ -5,7 +5,7 @@
#ifndef TOOLS_GN_ACTION_TARGET_GENERATOR_H_
#define TOOLS_GN_ACTION_TARGET_GENERATOR_H_
-#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "tools/gn/target_generator.h"
// Populates a Target with the values from an action[_foreach] rule.
@@ -19,7 +19,7 @@ class ActionTargetGenerator : public TargetGenerator {
virtual ~ActionTargetGenerator();
protected:
- virtual void DoRun() override;
+ void DoRun() override;
private:
bool FillScript();
diff --git a/tools/gn/binary_target_generator.h b/tools/gn/binary_target_generator.h
index efaaf03..0b8d521 100644
--- a/tools/gn/binary_target_generator.h
+++ b/tools/gn/binary_target_generator.h
@@ -5,7 +5,7 @@
#ifndef TOOLS_GN_BINARY_TARGET_GENERATOR_H_
#define TOOLS_GN_BINARY_TARGET_GENERATOR_H_
-#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "tools/gn/target_generator.h"
// Populates a Target with the values from a binary rule (executable, shared
@@ -20,7 +20,7 @@ class BinaryTargetGenerator : public TargetGenerator {
virtual ~BinaryTargetGenerator();
protected:
- virtual void DoRun() override;
+ void DoRun() override;
private:
bool FillCheckIncludes();
diff --git a/tools/gn/builder_unittest.cc b/tools/gn/builder_unittest.cc
index 059037d..7a2f650 100644
--- a/tools/gn/builder_unittest.cc
+++ b/tools/gn/builder_unittest.cc
@@ -17,18 +17,14 @@ class MockLoader : public Loader {
}
// Loader implementation:
- virtual void Load(const SourceFile& file,
- const LocationRange& origin,
- const Label& toolchain_name) override {
+ void Load(const SourceFile& file,
+ const LocationRange& origin,
+ const Label& toolchain_name) override {
files_.push_back(file);
}
- virtual void ToolchainLoaded(const Toolchain* toolchain) override {
- }
- virtual Label GetDefaultToolchain() const override {
- return Label();
- }
- virtual const Settings* GetToolchainSettings(
- const Label& label) const override {
+ void ToolchainLoaded(const Toolchain* toolchain) override {}
+ Label GetDefaultToolchain() const override { return Label(); }
+ const Settings* GetToolchainSettings(const Label& label) const override {
return NULL;
}
@@ -52,7 +48,7 @@ class MockLoader : public Loader {
}
private:
- virtual ~MockLoader() {}
+ ~MockLoader() override {}
std::vector<SourceFile> files_;
};
diff --git a/tools/gn/config.h b/tools/gn/config.h
index d896ec6..543d660 100644
--- a/tools/gn/config.h
+++ b/tools/gn/config.h
@@ -5,7 +5,7 @@
#ifndef TOOLS_GN_CONFIG_H_
#define TOOLS_GN_CONFIG_H_
-#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "tools/gn/config_values.h"
#include "tools/gn/item.h"
@@ -13,10 +13,10 @@
class Config : public Item {
public:
Config(const Settings* settings, const Label& label);
- virtual ~Config();
+ ~Config() override;
- virtual Config* AsConfig() override;
- virtual const Config* AsConfig() const override;
+ Config* AsConfig() override;
+ const Config* AsConfig() const override;
ConfigValues& config_values() { return config_values_; }
const ConfigValues& config_values() const { return config_values_; }
diff --git a/tools/gn/copy_target_generator.h b/tools/gn/copy_target_generator.h
index b9c17d3..9d9b97b 100644
--- a/tools/gn/copy_target_generator.h
+++ b/tools/gn/copy_target_generator.h
@@ -5,7 +5,7 @@
#ifndef TOOLS_GN_COPY_TARGET_GENERATOR_H_
#define TOOLS_GN_COPY_TARGET_GENERATOR_H_
-#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "tools/gn/target_generator.h"
// Populates a Target with the values from a copy rule.
@@ -18,7 +18,7 @@ class CopyTargetGenerator : public TargetGenerator {
virtual ~CopyTargetGenerator();
protected:
- virtual void DoRun() override;
+ void DoRun() override;
private:
void FillDestDir();
diff --git a/tools/gn/group_target_generator.h b/tools/gn/group_target_generator.h
index 7559641d..141fdef 100644
--- a/tools/gn/group_target_generator.h
+++ b/tools/gn/group_target_generator.h
@@ -5,7 +5,7 @@
#ifndef TOOLS_GN_GROUP_TARGET_GENERATOR_H_
#define TOOLS_GN_GROUP_TARGET_GENERATOR_H_
-#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "tools/gn/target_generator.h"
// Populates a Target with the values for a group rule.
@@ -18,7 +18,7 @@ class GroupTargetGenerator : public TargetGenerator {
virtual ~GroupTargetGenerator();
protected:
- virtual void DoRun() override;
+ void DoRun() override;
private:
DISALLOW_COPY_AND_ASSIGN(GroupTargetGenerator);
diff --git a/tools/gn/loader.h b/tools/gn/loader.h
index aef35a7..b5f0ad9 100644
--- a/tools/gn/loader.h
+++ b/tools/gn/loader.h
@@ -82,13 +82,12 @@ class LoaderImpl : public Loader {
LoaderImpl(const BuildSettings* build_settings);
// Loader implementation.
- virtual void Load(const SourceFile& file,
- const LocationRange& origin,
- const Label& toolchain_name) override;
- virtual void ToolchainLoaded(const Toolchain* toolchain) override;
- virtual Label GetDefaultToolchain() const override;
- virtual const Settings* GetToolchainSettings(
- const Label& label) const override;
+ void Load(const SourceFile& file,
+ const LocationRange& origin,
+ const Label& toolchain_name) override;
+ void ToolchainLoaded(const Toolchain* toolchain) override;
+ Label GetDefaultToolchain() const override;
+ const Settings* GetToolchainSettings(const Label& label) const override;
// Sets the message loop corresponding to the main thread. By default this
// class will use the thread active during construction, but there is not
@@ -115,7 +114,7 @@ class LoaderImpl : public Loader {
struct LoadID;
struct ToolchainRecord;
- virtual ~LoaderImpl();
+ ~LoaderImpl() override;
// Schedules the input file manager to load the given file.
void ScheduleLoadFile(const Settings* settings,
diff --git a/tools/gn/ninja_action_target_writer.h b/tools/gn/ninja_action_target_writer.h
index a033e85..71c1239 100644
--- a/tools/gn/ninja_action_target_writer.h
+++ b/tools/gn/ninja_action_target_writer.h
@@ -7,8 +7,8 @@
#include <vector>
-#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "tools/gn/ninja_target_writer.h"
class OutputFile;
@@ -17,9 +17,9 @@ class OutputFile;
class NinjaActionTargetWriter : public NinjaTargetWriter {
public:
NinjaActionTargetWriter(const Target* target, std::ostream& out);
- virtual ~NinjaActionTargetWriter();
+ ~NinjaActionTargetWriter() override;
- virtual void Run() override;
+ void Run() override;
private:
FRIEND_TEST_ALL_PREFIXES(NinjaActionTargetWriter,
diff --git a/tools/gn/ninja_binary_target_writer.h b/tools/gn/ninja_binary_target_writer.h
index c5fcde0..22d2332 100644
--- a/tools/gn/ninja_binary_target_writer.h
+++ b/tools/gn/ninja_binary_target_writer.h
@@ -5,7 +5,7 @@
#ifndef TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_
#define TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_
-#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "tools/gn/config_values.h"
#include "tools/gn/ninja_target_writer.h"
#include "tools/gn/toolchain.h"
@@ -18,9 +18,9 @@ struct EscapeOptions;
class NinjaBinaryTargetWriter : public NinjaTargetWriter {
public:
NinjaBinaryTargetWriter(const Target* target, std::ostream& out);
- virtual ~NinjaBinaryTargetWriter();
+ ~NinjaBinaryTargetWriter() override;
- virtual void Run() override;
+ void Run() override;
private:
typedef std::set<OutputFile> OutputFileSet;
diff --git a/tools/gn/ninja_copy_target_writer.h b/tools/gn/ninja_copy_target_writer.h
index 01766d8..9e1746e 100644
--- a/tools/gn/ninja_copy_target_writer.h
+++ b/tools/gn/ninja_copy_target_writer.h
@@ -5,7 +5,7 @@
#ifndef TOOLS_GN_NINJA_COPY_TARGET_WRITER_H_
#define TOOLS_GN_NINJA_COPY_TARGET_WRITER_H_
-#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "tools/gn/ninja_target_writer.h"
class Tool;
@@ -14,9 +14,9 @@ class Tool;
class NinjaCopyTargetWriter : public NinjaTargetWriter {
public:
NinjaCopyTargetWriter(const Target* target, std::ostream& out);
- virtual ~NinjaCopyTargetWriter();
+ ~NinjaCopyTargetWriter() override;
- virtual void Run() override;
+ void Run() override;
private:
// Writes the rules top copy the file(s), putting the computed output file
diff --git a/tools/gn/ninja_group_target_writer.h b/tools/gn/ninja_group_target_writer.h
index f355539..66e5f04 100644
--- a/tools/gn/ninja_group_target_writer.h
+++ b/tools/gn/ninja_group_target_writer.h
@@ -5,16 +5,16 @@
#ifndef TOOLS_GN_NINJA_GROUP_TARGET_WRITER_H_
#define TOOLS_GN_NINJA_GROUP_TARGET_WRITER_H_
-#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "tools/gn/ninja_target_writer.h"
// Writes a .ninja file for a group target type.
class NinjaGroupTargetWriter : public NinjaTargetWriter {
public:
NinjaGroupTargetWriter(const Target* target, std::ostream& out);
- virtual ~NinjaGroupTargetWriter();
+ ~NinjaGroupTargetWriter() override;
- virtual void Run() override;
+ void Run() override;
private:
DISALLOW_COPY_AND_ASSIGN(NinjaGroupTargetWriter);
diff --git a/tools/gn/ninja_target_writer_unittest.cc b/tools/gn/ninja_target_writer_unittest.cc
index fca30bc..e46471a 100644
--- a/tools/gn/ninja_target_writer_unittest.cc
+++ b/tools/gn/ninja_target_writer_unittest.cc
@@ -19,7 +19,7 @@ class TestingNinjaTargetWriter : public NinjaTargetWriter {
: NinjaTargetWriter(target, out) {
}
- virtual void Run() override {}
+ void Run() override {}
// Make this public so the test can call it.
OutputFile WriteInputDepsStampAndGetDep(
diff --git a/tools/gn/parse_tree.h b/tools/gn/parse_tree.h
index f64008d..60d1570 100644
--- a/tools/gn/parse_tree.h
+++ b/tools/gn/parse_tree.h
@@ -8,7 +8,6 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "tools/gn/err.h"
#include "tools/gn/token.h"
@@ -137,15 +136,15 @@ class ParseNode {
class AccessorNode : public ParseNode {
public:
AccessorNode();
- virtual ~AccessorNode();
+ ~AccessorNode() override;
- virtual const AccessorNode* AsAccessor() const override;
- virtual Value Execute(Scope* scope, Err* err) const override;
- virtual LocationRange GetRange() const override;
- virtual Err MakeErrorDescribing(
+ const AccessorNode* AsAccessor() const override;
+ Value Execute(Scope* scope, Err* err) const override;
+ LocationRange GetRange() const override;
+ Err MakeErrorDescribing(
const std::string& msg,
const std::string& help = std::string()) const override;
- virtual void Print(std::ostream& out, int indent) const override;
+ void Print(std::ostream& out, int indent) const override;
// Base is the thing on the left of the [] or dot, currently always required
// to be an identifier token.
@@ -180,15 +179,15 @@ class AccessorNode : public ParseNode {
class BinaryOpNode : public ParseNode {
public:
BinaryOpNode();
- virtual ~BinaryOpNode();
+ ~BinaryOpNode() override;
- virtual const BinaryOpNode* AsBinaryOp() const override;
- virtual Value Execute(Scope* scope, Err* err) const override;
- virtual LocationRange GetRange() const override;
- virtual Err MakeErrorDescribing(
+ const BinaryOpNode* AsBinaryOp() const override;
+ Value Execute(Scope* scope, Err* err) const override;
+ LocationRange GetRange() const override;
+ Err MakeErrorDescribing(
const std::string& msg,
const std::string& help = std::string()) const override;
- virtual void Print(std::ostream& out, int indent) const override;
+ void Print(std::ostream& out, int indent) const override;
const Token& op() const { return op_; }
void set_op(const Token& t) { op_ = t; }
@@ -217,15 +216,15 @@ class BlockNode : public ParseNode {
public:
// Set has_scope if this block introduces a nested scope.
explicit BlockNode(bool has_scope);
- virtual ~BlockNode();
+ ~BlockNode() override;
- virtual const BlockNode* AsBlock() const override;
- virtual Value Execute(Scope* scope, Err* err) const override;
- virtual LocationRange GetRange() const override;
- virtual Err MakeErrorDescribing(
+ const BlockNode* AsBlock() const override;
+ Value Execute(Scope* scope, Err* err) const override;
+ LocationRange GetRange() const override;
+ Err MakeErrorDescribing(
const std::string& msg,
const std::string& help = std::string()) const override;
- virtual void Print(std::ostream& out, int indent) const override;
+ void Print(std::ostream& out, int indent) const override;
void set_begin_token(const Token& t) { begin_token_ = t; }
void set_end(scoped_ptr<EndNode> e) { end_ = e.Pass(); }
@@ -258,15 +257,15 @@ class BlockNode : public ParseNode {
class ConditionNode : public ParseNode {
public:
ConditionNode();
- virtual ~ConditionNode();
+ ~ConditionNode() override;
- virtual const ConditionNode* AsConditionNode() const override;
- virtual Value Execute(Scope* scope, Err* err) const override;
- virtual LocationRange GetRange() const override;
- virtual Err MakeErrorDescribing(
+ const ConditionNode* AsConditionNode() const override;
+ Value Execute(Scope* scope, Err* err) const override;
+ LocationRange GetRange() const override;
+ Err MakeErrorDescribing(
const std::string& msg,
const std::string& help = std::string()) const override;
- virtual void Print(std::ostream& out, int indent) const override;
+ void Print(std::ostream& out, int indent) const override;
void set_if_token(const Token& token) { if_token_ = token; }
@@ -303,15 +302,15 @@ class ConditionNode : public ParseNode {
class FunctionCallNode : public ParseNode {
public:
FunctionCallNode();
- virtual ~FunctionCallNode();
+ ~FunctionCallNode() override;
- virtual const FunctionCallNode* AsFunctionCall() const override;
- virtual Value Execute(Scope* scope, Err* err) const override;
- virtual LocationRange GetRange() const override;
- virtual Err MakeErrorDescribing(
+ const FunctionCallNode* AsFunctionCall() const override;
+ Value Execute(Scope* scope, Err* err) const override;
+ LocationRange GetRange() const override;
+ Err MakeErrorDescribing(
const std::string& msg,
const std::string& help = std::string()) const override;
- virtual void Print(std::ostream& out, int indent) const override;
+ void Print(std::ostream& out, int indent) const override;
const Token& function() const { return function_; }
void set_function(Token t) { function_ = t; }
@@ -336,15 +335,15 @@ class IdentifierNode : public ParseNode {
public:
IdentifierNode();
IdentifierNode(const Token& token);
- virtual ~IdentifierNode();
+ ~IdentifierNode() override;
- virtual const IdentifierNode* AsIdentifier() const override;
- virtual Value Execute(Scope* scope, Err* err) const override;
- virtual LocationRange GetRange() const override;
- virtual Err MakeErrorDescribing(
+ const IdentifierNode* AsIdentifier() const override;
+ Value Execute(Scope* scope, Err* err) const override;
+ LocationRange GetRange() const override;
+ Err MakeErrorDescribing(
const std::string& msg,
const std::string& help = std::string()) const override;
- virtual void Print(std::ostream& out, int indent) const override;
+ void Print(std::ostream& out, int indent) const override;
const Token& value() const { return value_; }
void set_value(const Token& t) { value_ = t; }
@@ -360,15 +359,15 @@ class IdentifierNode : public ParseNode {
class ListNode : public ParseNode {
public:
ListNode();
- virtual ~ListNode();
+ ~ListNode() override;
- virtual const ListNode* AsList() const override;
- virtual Value Execute(Scope* scope, Err* err) const override;
- virtual LocationRange GetRange() const override;
- virtual Err MakeErrorDescribing(
+ const ListNode* AsList() const override;
+ Value Execute(Scope* scope, Err* err) const override;
+ LocationRange GetRange() const override;
+ Err MakeErrorDescribing(
const std::string& msg,
const std::string& help = std::string()) const override;
- virtual void Print(std::ostream& out, int indent) const override;
+ void Print(std::ostream& out, int indent) const override;
void set_begin_token(const Token& t) { begin_token_ = t; }
void set_end(scoped_ptr<EndNode> e) { end_ = e.Pass(); }
@@ -397,15 +396,15 @@ class LiteralNode : public ParseNode {
public:
LiteralNode();
LiteralNode(const Token& token);
- virtual ~LiteralNode();
+ ~LiteralNode() override;
- virtual const LiteralNode* AsLiteral() const override;
- virtual Value Execute(Scope* scope, Err* err) const override;
- virtual LocationRange GetRange() const override;
- virtual Err MakeErrorDescribing(
+ const LiteralNode* AsLiteral() const override;
+ Value Execute(Scope* scope, Err* err) const override;
+ LocationRange GetRange() const override;
+ Err MakeErrorDescribing(
const std::string& msg,
const std::string& help = std::string()) const override;
- virtual void Print(std::ostream& out, int indent) const override;
+ void Print(std::ostream& out, int indent) const override;
const Token& value() const { return value_; }
void set_value(const Token& t) { value_ = t; }
@@ -421,15 +420,15 @@ class LiteralNode : public ParseNode {
class UnaryOpNode : public ParseNode {
public:
UnaryOpNode();
- virtual ~UnaryOpNode();
+ ~UnaryOpNode() override;
- virtual const UnaryOpNode* AsUnaryOp() const override;
- virtual Value Execute(Scope* scope, Err* err) const override;
- virtual LocationRange GetRange() const override;
- virtual Err MakeErrorDescribing(
+ const UnaryOpNode* AsUnaryOp() const override;
+ Value Execute(Scope* scope, Err* err) const override;
+ LocationRange GetRange() const override;
+ Err MakeErrorDescribing(
const std::string& msg,
const std::string& help = std::string()) const override;
- virtual void Print(std::ostream& out, int indent) const override;
+ void Print(std::ostream& out, int indent) const override;
const Token& op() const { return op_; }
void set_op(const Token& t) { op_ = t; }
@@ -456,15 +455,15 @@ class UnaryOpNode : public ParseNode {
class BlockCommentNode : public ParseNode {
public:
BlockCommentNode();
- virtual ~BlockCommentNode();
+ ~BlockCommentNode() override;
- virtual const BlockCommentNode* AsBlockComment() const override;
- virtual Value Execute(Scope* scope, Err* err) const override;
- virtual LocationRange GetRange() const override;
- virtual Err MakeErrorDescribing(
+ const BlockCommentNode* AsBlockComment() const override;
+ Value Execute(Scope* scope, Err* err) const override;
+ LocationRange GetRange() const override;
+ Err MakeErrorDescribing(
const std::string& msg,
const std::string& help = std::string()) const override;
- virtual void Print(std::ostream& out, int indent) const override;
+ void Print(std::ostream& out, int indent) const override;
const Token& comment() const { return comment_; }
void set_comment(const Token& t) { comment_ = t; }
@@ -484,15 +483,15 @@ class BlockCommentNode : public ParseNode {
class EndNode : public ParseNode {
public:
EndNode(const Token& token);
- virtual ~EndNode();
+ ~EndNode() override;
- virtual const EndNode* AsEnd() const override;
- virtual Value Execute(Scope* scope, Err* err) const override;
- virtual LocationRange GetRange() const override;
- virtual Err MakeErrorDescribing(
+ const EndNode* AsEnd() const override;
+ Value Execute(Scope* scope, Err* err) const override;
+ LocationRange GetRange() const override;
+ Err MakeErrorDescribing(
const std::string& msg,
const std::string& help = std::string()) const override;
- virtual void Print(std::ostream& out, int indent) const override;
+ void Print(std::ostream& out, int indent) const override;
const Token& value() const { return value_; }
void set_value(const Token& t) { value_ = t; }
diff --git a/tools/gn/scope_per_file_provider.h b/tools/gn/scope_per_file_provider.h
index 3cc85b7..8f9c553 100644
--- a/tools/gn/scope_per_file_provider.h
+++ b/tools/gn/scope_per_file_provider.h
@@ -21,8 +21,7 @@ class ScopePerFileProvider : public Scope::ProgrammaticProvider {
virtual ~ScopePerFileProvider();
// ProgrammaticProvider implementation.
- virtual const Value* GetProgrammaticValue(
- const base::StringPiece& ident) override;
+ const Value* GetProgrammaticValue(const base::StringPiece& ident) override;
private:
const Value* GetCurrentToolchain();
diff --git a/tools/gn/setup.h b/tools/gn/setup.h
index 95bcde7..3658892 100644
--- a/tools/gn/setup.h
+++ b/tools/gn/setup.h
@@ -8,7 +8,6 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/compiler_specific.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "tools/gn/build_settings.h"
@@ -90,7 +89,7 @@ class CommonSetup {
class Setup : public CommonSetup {
public:
Setup();
- virtual ~Setup();
+ ~Setup() override;
// Configures the build for the current command line. On success returns
// true. On failure, prints the error and returns false.
@@ -114,7 +113,7 @@ class Setup : public CommonSetup {
Scheduler& scheduler() { return scheduler_; }
- virtual Scheduler* GetScheduler() override;
+ Scheduler* GetScheduler() override;
// Returns the file used to store the build arguments. Note that the path
// might not exist.
@@ -202,14 +201,14 @@ class DependentSetup : public CommonSetup {
// default copy constructor.
DependentSetup(Setup* derive_from);
DependentSetup(DependentSetup* derive_from);
- virtual ~DependentSetup();
+ ~DependentSetup() override;
// These are the two parts of Run() in the regular setup, not including the
// call to actually run the message loop.
void RunPreMessageLoop();
bool RunPostMessageLoop();
- virtual Scheduler* GetScheduler() override;
+ Scheduler* GetScheduler() override;
private:
Scheduler* scheduler_;
diff --git a/tools/gn/target.h b/tools/gn/target.h
index b949978..8e5a3e2 100644
--- a/tools/gn/target.h
+++ b/tools/gn/target.h
@@ -10,7 +10,6 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/strings/string_piece.h"
#include "base/synchronization/lock.h"
@@ -52,15 +51,15 @@ class Target : public Item {
typedef std::vector<std::string> StringVector;
Target(const Settings* settings, const Label& label);
- virtual ~Target();
+ ~Target() override;
// Returns a string naming the output type.
static const char* GetStringForOutputType(OutputType type);
// Item overrides.
- virtual Target* AsTarget() override;
- virtual const Target* AsTarget() const override;
- virtual bool OnResolved(Err* err) override;
+ Target* AsTarget() override;
+ const Target* AsTarget() const override;
+ bool OnResolved(Err* err) override;
OutputType output_type() const { return output_type_; }
void set_output_type(OutputType t) { output_type_ = t; }
diff --git a/tools/gn/toolchain.h b/tools/gn/toolchain.h
index 9f3d19a..c94d8ed 100644
--- a/tools/gn/toolchain.h
+++ b/tools/gn/toolchain.h
@@ -5,7 +5,6 @@
#ifndef TOOLS_GN_TOOLCHAIN_H_
#define TOOLS_GN_TOOLCHAIN_H_
-#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
@@ -61,11 +60,11 @@ class Toolchain : public Item {
static const char* kToolCopy;
Toolchain(const Settings* settings, const Label& label);
- virtual ~Toolchain();
+ ~Toolchain() override;
// Item overrides.
- virtual Toolchain* AsToolchain() override;
- virtual const Toolchain* AsToolchain() const override;
+ Toolchain* AsToolchain() override;
+ const Toolchain* AsToolchain() const override;
// Returns TYPE_NONE on failure.
static ToolType ToolNameToType(const base::StringPiece& str);