[cleanup][include] Remove redundant NOLINT annotations

cpplint rules change over time, and we change the exact rules we enable
for v8. This CL removes NOLINT annotations which are not needed
according to the currently enabled rules.

R=mlippautz@chromium.org

Bug: v8:11717
Change-Id: I41c4c18dd3f70ec255e9d2769ffd25a38f6f2784
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2862764
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74307}
This commit is contained in:
Clemens Backes 2021-04-30 14:08:08 +02:00 committed by V8 LUCI CQ
parent 8259cafa24
commit a7a0ff10af
8 changed files with 35 additions and 41 deletions

View File

@ -28,19 +28,19 @@ class BasicCrossThreadPersistent final : public PersistentBase,
~BasicCrossThreadPersistent() { Clear(); }
BasicCrossThreadPersistent( // NOLINT
BasicCrossThreadPersistent(
const SourceLocation& loc = SourceLocation::Current())
: LocationPolicy(loc) {}
BasicCrossThreadPersistent( // NOLINT
BasicCrossThreadPersistent(
std::nullptr_t, const SourceLocation& loc = SourceLocation::Current())
: LocationPolicy(loc) {}
BasicCrossThreadPersistent( // NOLINT
BasicCrossThreadPersistent(
SentinelPointer s, const SourceLocation& loc = SourceLocation::Current())
: PersistentBase(s), LocationPolicy(loc) {}
BasicCrossThreadPersistent( // NOLINT
BasicCrossThreadPersistent(
T* raw, const SourceLocation& loc = SourceLocation::Current())
: PersistentBase(raw), LocationPolicy(loc) {
if (!IsValid(raw)) return;
@ -58,7 +58,7 @@ class BasicCrossThreadPersistent final : public PersistentBase,
friend class BasicCrossThreadPersistent;
};
BasicCrossThreadPersistent( // NOLINT
BasicCrossThreadPersistent(
UnsafeCtorTag, T* raw,
const SourceLocation& loc = SourceLocation::Current())
: PersistentBase(raw), LocationPolicy(loc) {
@ -68,14 +68,14 @@ class BasicCrossThreadPersistent final : public PersistentBase,
this->CheckPointer(raw);
}
BasicCrossThreadPersistent( // NOLINT
BasicCrossThreadPersistent(
T& raw, const SourceLocation& loc = SourceLocation::Current())
: BasicCrossThreadPersistent(&raw, loc) {}
template <typename U, typename MemberBarrierPolicy,
typename MemberWeaknessTag, typename MemberCheckingPolicy,
typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicCrossThreadPersistent( // NOLINT
BasicCrossThreadPersistent(
internal::BasicMember<U, MemberBarrierPolicy, MemberWeaknessTag,
MemberCheckingPolicy>
member,
@ -94,7 +94,7 @@ class BasicCrossThreadPersistent final : public PersistentBase,
template <typename U, typename OtherWeaknessPolicy,
typename OtherLocationPolicy, typename OtherCheckingPolicy,
typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicCrossThreadPersistent( // NOLINT
BasicCrossThreadPersistent(
const BasicCrossThreadPersistent<U, OtherWeaknessPolicy,
OtherLocationPolicy,
OtherCheckingPolicy>& other,
@ -236,7 +236,7 @@ class BasicCrossThreadPersistent final : public PersistentBase,
*
* \returns the object.
*/
operator T*() const { return Get(); } // NOLINT
operator T*() const { return Get(); }
/**
* Dereferences the stored object.

View File

@ -21,13 +21,13 @@ namespace cppgc {
// [[no_unique_address]] comes in C++20 but supported in clang with -std >=
// c++11.
#if CPPGC_HAS_CPP_ATTRIBUTE(no_unique_address) // NOLINTNEXTLINE
#if CPPGC_HAS_CPP_ATTRIBUTE(no_unique_address)
#define CPPGC_NO_UNIQUE_ADDRESS [[no_unique_address]]
#else
#define CPPGC_NO_UNIQUE_ADDRESS
#endif
#if CPPGC_HAS_ATTRIBUTE(unused) // NOLINTNEXTLINE
#if CPPGC_HAS_ATTRIBUTE(unused)
#define CPPGC_UNUSED __attribute__((unused))
#else
#define CPPGC_UNUSED

View File

@ -79,8 +79,7 @@ class BasicMember final : private MemberBase, private CheckingPolicy {
template <typename U, typename OtherBarrierPolicy, typename OtherWeaknessTag,
typename OtherCheckingPolicy,
typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicMember( // NOLINT
BasicMember<U, OtherWeaknessTag, OtherBarrierPolicy,
BasicMember(BasicMember<U, OtherWeaknessTag, OtherBarrierPolicy,
OtherCheckingPolicy>&& other) noexcept
: BasicMember(other.Get()) {
other.Clear();
@ -90,10 +89,9 @@ class BasicMember final : private MemberBase, private CheckingPolicy {
typename PersistentLocationPolicy,
typename PersistentCheckingPolicy,
typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicMember( // NOLINT
const BasicPersistent<U, PersistentWeaknessPolicy,
PersistentLocationPolicy, PersistentCheckingPolicy>&
p)
BasicMember(const BasicPersistent<U, PersistentWeaknessPolicy,
PersistentLocationPolicy,
PersistentCheckingPolicy>& p)
: BasicMember(p.Get()) {}
// Copy assignment.
@ -161,7 +159,7 @@ class BasicMember final : private MemberBase, private CheckingPolicy {
}
explicit operator bool() const { return Get(); }
operator T*() const { return Get(); } // NOLINT
operator T*() const { return Get(); }
T* operator->() const { return Get(); }
T& operator*() const { return *Get(); }

View File

@ -95,7 +95,7 @@ class BasicPersistent final : public PersistentBase,
template <typename U, typename OtherWeaknessPolicy,
typename OtherLocationPolicy, typename OtherCheckingPolicy,
typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicPersistent( // NOLINT
BasicPersistent(
const BasicPersistent<U, OtherWeaknessPolicy, OtherLocationPolicy,
OtherCheckingPolicy>& other,
const SourceLocation& loc = SourceLocation::Current())
@ -118,7 +118,7 @@ class BasicPersistent final : public PersistentBase,
template <typename U, typename MemberBarrierPolicy,
typename MemberWeaknessTag, typename MemberCheckingPolicy,
typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicPersistent(internal::BasicMember<U, MemberBarrierPolicy, // NOLINT
BasicPersistent(internal::BasicMember<U, MemberBarrierPolicy,
MemberWeaknessTag, MemberCheckingPolicy>
member,
const SourceLocation& loc = SourceLocation::Current())
@ -181,7 +181,7 @@ class BasicPersistent final : public PersistentBase,
}
explicit operator bool() const { return Get(); }
operator T*() const { return Get(); } // NOLINT
operator T*() const { return Get(); }
T* operator->() const { return Get(); }
T& operator*() const { return *Get(); }

View File

@ -14,7 +14,7 @@ namespace internal {
// sentinel is defined by the embedder.
struct SentinelPointer {
template <typename T>
operator T*() const { // NOLINT
operator T*() const {
static constexpr intptr_t kSentinelValue = 1;
return reinterpret_cast<T*>(kSentinelValue);
}

View File

@ -496,7 +496,7 @@ class V8_EXPORT HeapGraphNode {
/**
* An interface for exporting data from V8, using "push" model.
*/
class V8_EXPORT OutputStream { // NOLINT
class V8_EXPORT OutputStream {
public:
enum WriteResult {
kContinue = 0,
@ -523,7 +523,6 @@ class V8_EXPORT OutputStream { // NOLINT
}
};
/**
* HeapSnapshots record the state of the JS heap at some moment.
*/
@ -590,7 +589,7 @@ class V8_EXPORT HeapSnapshot {
* An interface for reporting progress and controlling long-running
* activities.
*/
class V8_EXPORT ActivityControl { // NOLINT
class V8_EXPORT ActivityControl {
public:
enum ControlOption {
kContinue = 0,
@ -604,7 +603,6 @@ class V8_EXPORT ActivityControl { // NOLINT
virtual ControlOption ReportProgressValue(int done, int total) = 0;
};
/**
* AllocationProfile is a sampled profile of allocations done by the program.
* This is structured as a call-graph.

View File

@ -43,7 +43,7 @@ class StdMapTraits {
static bool Empty(Impl* impl) { return impl->empty(); }
static size_t Size(Impl* impl) { return impl->size(); }
static void Swap(Impl& a, Impl& b) { std::swap(a, b); } // NOLINT
static void Swap(Impl& a, Impl& b) { std::swap(a, b); }
static Iterator Begin(Impl* impl) { return impl->begin(); }
static Iterator End(Impl* impl) { return impl->end(); }
static K Key(Iterator it) { return it->first; }

View File

@ -596,7 +596,7 @@ template <class T> class PersistentBase {
*/
V8_INLINE uint16_t WrapperClassId() const;
PersistentBase(const PersistentBase& other) = delete; // NOLINT
PersistentBase(const PersistentBase& other) = delete;
void operator=(const PersistentBase&) = delete;
private:
@ -708,7 +708,7 @@ template <class T, class M> class Persistent : public PersistentBase<T> {
return *this;
}
template <class S, class M2>
V8_INLINE Persistent& operator=(const Persistent<S, M2>& that) { // NOLINT
V8_INLINE Persistent& operator=(const Persistent<S, M2>& that) {
Copy(that);
return *this;
}
@ -723,7 +723,7 @@ template <class T, class M> class Persistent : public PersistentBase<T> {
// TODO(dcarney): this is pretty useless, fix or remove
template <class S>
V8_INLINE static Persistent<T>& Cast(const Persistent<S>& that) { // NOLINT
V8_INLINE static Persistent<T>& Cast(const Persistent<S>& that) {
#ifdef V8_ENABLE_CHECKS
// If we're going to perform the type check then we have to check
// that the handle isn't empty before doing the checked cast.
@ -734,7 +734,7 @@ template <class T, class M> class Persistent : public PersistentBase<T> {
// TODO(dcarney): this is pretty useless, fix or remove
template <class S>
V8_INLINE Persistent<S>& As() const { // NOLINT
V8_INLINE Persistent<S>& As() const {
return Persistent<S>::Cast(*this);
}
@ -803,7 +803,7 @@ class Global : public PersistentBase<T> {
/**
* Pass allows returning uniques from functions, etc.
*/
Global Pass() { return static_cast<Global&&>(*this); } // NOLINT
Global Pass() { return static_cast<Global&&>(*this); }
/*
* For compatibility with Chromium's base::Bind (base::Passed).
@ -3278,7 +3278,7 @@ class V8_EXPORT String : public Name {
*/
bool IsExternalOneByte() const;
class V8_EXPORT ExternalStringResourceBase { // NOLINT
class V8_EXPORT ExternalStringResourceBase {
public:
virtual ~ExternalStringResourceBase() = default;
@ -3981,8 +3981,7 @@ class V8_EXPORT Object : public Value {
//
// Returns true on success.
V8_WARN_UNUSED_RESULT Maybe<bool> DefineProperty(
Local<Context> context, Local<Name> key,
PropertyDescriptor& descriptor); // NOLINT(runtime/references)
Local<Context> context, Local<Name> key, PropertyDescriptor& descriptor);
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
Local<Value> key);
@ -5348,7 +5347,7 @@ class V8_EXPORT ArrayBuffer : public Object {
* Note that it is unsafe to call back into V8 from any of the allocator
* functions.
*/
class V8_EXPORT Allocator { // NOLINT
class V8_EXPORT Allocator {
public:
virtual ~Allocator() = default;
@ -7034,7 +7033,7 @@ class V8_EXPORT AccessorSignature : public Data {
/**
* Ignore
*/
class V8_EXPORT Extension { // NOLINT
class V8_EXPORT Extension {
public:
// Note that the strings passed into this constructor must live as long
// as the Extension itself.
@ -7912,17 +7911,16 @@ using UnhandledExceptionCallback =
/**
* Interface for iterating through all external resources in the heap.
*/
class V8_EXPORT ExternalResourceVisitor { // NOLINT
class V8_EXPORT ExternalResourceVisitor {
public:
virtual ~ExternalResourceVisitor() = default;
virtual void VisitExternalString(Local<String> string) {}
};
/**
* Interface for iterating through all the persistent handles in the heap.
*/
class V8_EXPORT PersistentHandleVisitor { // NOLINT
class V8_EXPORT PersistentHandleVisitor {
public:
virtual ~PersistentHandleVisitor() = default;
virtual void VisitPersistentHandle(Persistent<Value>* value,