Commit b13825d1 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[cleanup] Refactor parser to use default members.

Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I56b730814539df7fdc2e1e5fb06c8b2b104b5fc8
Reviewed-on: https://chromium-review.googlesource.com/1223830
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55915}
parent 7f27bf26
......@@ -22,7 +22,7 @@ class Scanner;
// Scanner::IsDuplicateSymbol.
class DuplicateFinder {
public:
DuplicateFinder() {}
DuplicateFinder() = default;
private:
friend class Scanner;
......
......@@ -99,7 +99,7 @@ ParseInfo::ParseInfo(Isolate* isolate, Handle<Script> script)
script->IsUserJavaScript());
}
ParseInfo::~ParseInfo() {}
ParseInfo::~ParseInfo() = default;
DeclarationScope* ParseInfo::scope() const { return literal()->scope(); }
......
......@@ -190,7 +190,7 @@ class ConsumedPreParsedScopeData {
static std::unique_ptr<ConsumedPreParsedScopeData> For(
Zone* zone, ZonePreParsedScopeData* data);
virtual ~ConsumedPreParsedScopeData() {}
virtual ~ConsumedPreParsedScopeData() = default;
virtual ProducedPreParsedScopeData* GetDataForSkippableFunction(
Zone* zone, int start_position, int* end_position, int* num_parameters,
......@@ -202,7 +202,7 @@ class ConsumedPreParsedScopeData {
virtual void RestoreScopeAllocationData(DeclarationScope* scope) = 0;
protected:
ConsumedPreParsedScopeData() {}
ConsumedPreParsedScopeData() = default;
private:
DISALLOW_COPY_AND_ASSIGN(ConsumedPreParsedScopeData);
......
......@@ -38,7 +38,7 @@ class Utf16CharacterStream {
public:
static const uc32 kEndOfInput = -1;
virtual ~Utf16CharacterStream() {}
virtual ~Utf16CharacterStream() = default;
inline uc32 Peek() {
if (V8_LIKELY(buffer_cursor_ < buffer_end_)) {
......@@ -194,7 +194,7 @@ class Scanner {
: scanner_(scanner), bookmark_(kNoBookmark) {
DCHECK_NOT_NULL(scanner_);
}
~BookmarkScope() {}
~BookmarkScope() = default;
void Set();
void Apply();
......
......@@ -40,7 +40,7 @@ class ChunkSource : public v8::ScriptCompiler::ExternalSourceStream {
}
chunks_.push_back({nullptr, 0});
}
~ChunkSource() {}
~ChunkSource() = default;
bool SetBookmark() override { return false; }
void ResetToBookmark() override {}
size_t GetMoreData(const uint8_t** src) override {
......
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