71bb00e261
FINAL implies OVERRIDE, which in turn implies virtual, so there's no need to use more than one of these. The Google C++ style guide even requires this, see http://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Inheritance. While we're here, port r24662 to x87. The net result is that v8 compiles again with a current clang. BUG=v8:3753 LOG=y Review URL: https://codereview.chromium.org/797943002 Cr-Commit-Position: refs/heads/master@{#25792}
35 lines
844 B
C++
35 lines
844 B
C++
// Copyright 2014 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef V8_AST_THIS_ACCESS_VISITOR_H_
|
|
#define V8_AST_THIS_ACCESS_VISITOR_H_
|
|
#include "src/ast.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
class AstThisAccessVisitor : public AstVisitor {
|
|
public:
|
|
explicit AstThisAccessVisitor(Zone* zone);
|
|
|
|
bool UsesThis() { return uses_this_; }
|
|
|
|
#define DECLARE_VISIT(type) void Visit##type(type* node) OVERRIDE;
|
|
AST_NODE_LIST(DECLARE_VISIT)
|
|
#undef DECLARE_VISIT
|
|
|
|
private:
|
|
bool uses_this_;
|
|
|
|
void VisitIfNotNull(AstNode* node) {
|
|
if (node != NULL) Visit(node);
|
|
}
|
|
|
|
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
|
|
DISALLOW_COPY_AND_ASSIGN(AstThisAccessVisitor);
|
|
};
|
|
}
|
|
} // namespace v8::internal
|
|
#endif // V8_AST_THIS_ACCESS_VISITOR_H_
|