diff options
author | vmpstr <vmpstr@chromium.org> | 2016-02-24 16:50:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-25 00:51:42 +0000 |
commit | e65942bb5bd59a0833e98451e902f4c54b947680 (patch) | |
tree | a270f77c0d9765d56870042b92927bd4ffdbcee2 /base | |
parent | 00bf6819cb22840c9242b470edc29470077a6093 (diff) | |
download | chromium_src-e65942bb5bd59a0833e98451e902f4c54b947680.zip chromium_src-e65942bb5bd59a0833e98451e902f4c54b947680.tar.gz chromium_src-e65942bb5bd59a0833e98451e902f4c54b947680.tar.bz2 |
base: Add out-of-line copy ctors for complex classes.
This patch adds out of line copy constructors for classes that our
clang-plugin considers heavy. This is an effort to enable copy
constructor checks by default.
BUG=436357
R=dcheng@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/1730873002
Cr-Commit-Position: refs/heads/master@{#377443}
Diffstat (limited to 'base')
-rw-r--r-- | base/test/gtest_util.cc | 2 | ||||
-rw-r--r-- | base/test/gtest_util.h | 1 | ||||
-rw-r--r-- | base/test/launcher/test_results_tracker.cc | 6 | ||||
-rw-r--r-- | base/test/launcher/test_results_tracker.h | 2 | ||||
-rw-r--r-- | base/test/test_pending_task.cc | 2 | ||||
-rw-r--r-- | base/test/test_pending_task.h | 1 | ||||
-rw-r--r-- | base/test/trace_event_analyzer.cc | 2 | ||||
-rw-r--r-- | base/test/trace_event_analyzer.h | 1 | ||||
-rw-r--r-- | base/threading/thread.cc | 2 | ||||
-rw-r--r-- | base/threading/thread.h | 1 | ||||
-rw-r--r-- | base/tracked_objects.cc | 3 | ||||
-rw-r--r-- | base/tracked_objects.h | 1 | ||||
-rw-r--r-- | base/values.cc | 2 | ||||
-rw-r--r-- | base/values.h | 1 | ||||
-rw-r--r-- | base/version.cc | 2 | ||||
-rw-r--r-- | base/version.h | 2 |
16 files changed, 31 insertions, 0 deletions
diff --git a/base/test/gtest_util.cc b/base/test/gtest_util.cc index b9ab4a3..8ad5436 100644 --- a/base/test/gtest_util.cc +++ b/base/test/gtest_util.cc @@ -16,6 +16,8 @@ namespace base { TestIdentifier::TestIdentifier() { } +TestIdentifier::TestIdentifier(const TestIdentifier& other) = default; + std::string FormatFullTestName(const std::string& test_case_name, const std::string& test_name) { return test_case_name + "." + test_name; diff --git a/base/test/gtest_util.h b/base/test/gtest_util.h index c0e088f..f353d83 100644 --- a/base/test/gtest_util.h +++ b/base/test/gtest_util.h @@ -17,6 +17,7 @@ class FilePath; struct TestIdentifier { TestIdentifier(); + TestIdentifier(const TestIdentifier& other); std::string test_case_name; std::string test_name; diff --git a/base/test/launcher/test_results_tracker.cc b/base/test/launcher/test_results_tracker.cc index b6516ec..813e8e4 100644 --- a/base/test/launcher/test_results_tracker.cc +++ b/base/test/launcher/test_results_tracker.cc @@ -358,12 +358,18 @@ void TestResultsTracker::PrintTests(InputIterator first, TestResultsTracker::AggregateTestResult::AggregateTestResult() { } +TestResultsTracker::AggregateTestResult::AggregateTestResult( + const AggregateTestResult& other) = default; + TestResultsTracker::AggregateTestResult::~AggregateTestResult() { } TestResultsTracker::PerIterationData::PerIterationData() { } +TestResultsTracker::PerIterationData::PerIterationData( + const PerIterationData& other) = default; + TestResultsTracker::PerIterationData::~PerIterationData() { } diff --git a/base/test/launcher/test_results_tracker.h b/base/test/launcher/test_results_tracker.h index 163d75e..8910f73 100644 --- a/base/test/launcher/test_results_tracker.h +++ b/base/test/launcher/test_results_tracker.h @@ -85,6 +85,7 @@ class TestResultsTracker { struct AggregateTestResult { AggregateTestResult(); + AggregateTestResult(const AggregateTestResult& other); ~AggregateTestResult(); std::vector<TestResult> test_results; @@ -92,6 +93,7 @@ class TestResultsTracker { struct PerIterationData { PerIterationData(); + PerIterationData(const PerIterationData& other); ~PerIterationData(); // Aggregate test results grouped by full test name. diff --git a/base/test/test_pending_task.cc b/base/test/test_pending_task.cc index 3f2c79d..7347e45 100644 --- a/base/test/test_pending_task.cc +++ b/base/test/test_pending_task.cc @@ -22,6 +22,8 @@ TestPendingTask::TestPendingTask( delay(delay), nestability(nestability) {} +TestPendingTask::TestPendingTask(const TestPendingTask& other) = default; + TimeTicks TestPendingTask::GetTimeToRun() const { return post_time + delay; } diff --git a/base/test/test_pending_task.h b/base/test/test_pending_task.h index 829baa6..df5eade 100644 --- a/base/test/test_pending_task.h +++ b/base/test/test_pending_task.h @@ -21,6 +21,7 @@ struct TestPendingTask { enum TestNestability { NESTABLE, NON_NESTABLE }; TestPendingTask(); + TestPendingTask(const TestPendingTask& other); TestPendingTask(const tracked_objects::Location& location, const Closure& task, TimeTicks post_time, diff --git a/base/test/trace_event_analyzer.cc b/base/test/trace_event_analyzer.cc index 2046355..fc775f2 100644 --- a/base/test/trace_event_analyzer.cc +++ b/base/test/trace_event_analyzer.cc @@ -26,6 +26,8 @@ TraceEvent::TraceEvent() other_event(NULL) { } +TraceEvent::TraceEvent(const TraceEvent& other) = default; + TraceEvent::~TraceEvent() { } diff --git a/base/test/trace_event_analyzer.h b/base/test/trace_event_analyzer.h index f67445a..253dbb4 100644 --- a/base/test/trace_event_analyzer.h +++ b/base/test/trace_event_analyzer.h @@ -111,6 +111,7 @@ struct TraceEvent { }; TraceEvent(); + TraceEvent(const TraceEvent& other); ~TraceEvent(); bool SetFromJSON(const base::Value* event_value) WARN_UNUSED_RESULT; diff --git a/base/threading/thread.cc b/base/threading/thread.cc index c5a71bb..1d2ae64 100644 --- a/base/threading/thread.cc +++ b/base/threading/thread.cc @@ -52,6 +52,8 @@ Thread::Options::Options(MessageLoop::Type type, priority(ThreadPriority::NORMAL) { } +Thread::Options::Options(const Options& other) = default; + Thread::Options::~Options() { } diff --git a/base/threading/thread.h b/base/threading/thread.h index da985da..ec19722 100644 --- a/base/threading/thread.h +++ b/base/threading/thread.h @@ -45,6 +45,7 @@ class BASE_EXPORT Thread : PlatformThread::Delegate { Options(); Options(MessageLoop::Type type, size_t size); + Options(const Options& other); ~Options(); // Specifies the type of message loop that will be allocated on the thread. diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc index 543e436..d24cedf 100644 --- a/base/tracked_objects.cc +++ b/base/tracked_objects.cc @@ -968,6 +968,9 @@ ProcessDataSnapshot::ProcessDataSnapshot() #endif } +ProcessDataSnapshot::ProcessDataSnapshot(const ProcessDataSnapshot& other) = + default; + ProcessDataSnapshot::~ProcessDataSnapshot() { } diff --git a/base/tracked_objects.h b/base/tracked_objects.h index 4553c0a..168b17d 100644 --- a/base/tracked_objects.h +++ b/base/tracked_objects.h @@ -808,6 +808,7 @@ struct BASE_EXPORT ProcessDataPhaseSnapshot { struct BASE_EXPORT ProcessDataSnapshot { public: ProcessDataSnapshot(); + ProcessDataSnapshot(const ProcessDataSnapshot& other); ~ProcessDataSnapshot(); PhasedProcessDataSnapshotMap phased_snapshots; diff --git a/base/values.cc b/base/values.cc index ab3c38a..5a789e9 100644 --- a/base/values.cc +++ b/base/values.cc @@ -837,6 +837,8 @@ DictionaryValue::Iterator::Iterator(const DictionaryValue& target) : target_(target), it_(target.dictionary_.begin()) {} +DictionaryValue::Iterator::Iterator(const Iterator& other) = default; + DictionaryValue::Iterator::~Iterator() {} DictionaryValue* DictionaryValue::DeepCopy() const { diff --git a/base/values.h b/base/values.h index 07e5b6c..141ea93 100644 --- a/base/values.h +++ b/base/values.h @@ -360,6 +360,7 @@ class BASE_EXPORT DictionaryValue : public Value { class BASE_EXPORT Iterator { public: explicit Iterator(const DictionaryValue& target); + Iterator(const Iterator& other); ~Iterator(); bool IsAtEnd() const { return it_ == target_.dictionary_.end(); } diff --git a/base/version.cc b/base/version.cc index 19b9922..02213fb 100644 --- a/base/version.cc +++ b/base/version.cc @@ -80,6 +80,8 @@ int CompareVersionComponents(const std::vector<uint32_t>& components1, Version::Version() { } +Version::Version(const Version& other) = default; + Version::~Version() { } diff --git a/base/version.h b/base/version.h index 30cb735..25b570a 100644 --- a/base/version.h +++ b/base/version.h @@ -23,6 +23,8 @@ class BASE_EXPORT Version { // Version object is assign to it. Version(); + Version(const Version& other); + ~Version(); // Initializes from a decimal dotted version number, like "0.1.1". |