Commit db07b362 authored by George Burgess IV's avatar George Burgess IV Committed by Commit Bot

perfetto: remove NOLINT

The NOLINT here was to make tidy stop complaining about the lack of an
`explicit` constructor for this ScopedTraceEvent. Unfortunately, adding
that makes it difficult to init ScopedTraceEvents as we're doing right
now.

It's arguable either way that tidy should/shouldn't diagnose this, since
template trickery/decltype/etc can easily allow you to construct
`ScopedTraceEvent`s on your own. Because the argument is useless anyway,
using `...` makes tidy quiet down, and appears just as
optimization-friendly.

Bug: 1044592
Change-Id: Ib6203b40df504aa82816555e9c915f06ea60246f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055889Reviewed-by: default avatarEric Seckler <eseckler@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741746}
parent aac917a4
...@@ -69,17 +69,17 @@ static inline base::trace_event::TraceEventHandle AddTraceEvent( ...@@ -69,17 +69,17 @@ static inline base::trace_event::TraceEventHandle AddTraceEvent(
#define TRACING_INTERNAL_SCOPED_ADD_TRACE_EVENT(category, name, ...) \ #define TRACING_INTERNAL_SCOPED_ADD_TRACE_EVENT(category, name, ...) \
struct { \ struct { \
struct ScopedTraceEvent { \ struct ScopedTraceEvent { \
/* The int parameter is an implementation detail. It allows the */ \ /* The parameter is an implementation detail. It allows the */ \
/* anonymous struct to use aggregate initialization to invoke the */ \ /* anonymous struct to use aggregate initialization to invoke the */ \
/* lambda to emit the begin event with the proper reference capture */ \ /* lambda to emit the begin event with the proper reference capture */ \
/* for any TrackEventArgumentFunction in |__VA_ARGS__|. This is */ \ /* for any TrackEventArgumentFunction in |__VA_ARGS__|. This is */ \
/* required so that the scoped event is exactly ONE line and can't */ \ /* required so that the scoped event is exactly ONE line and can't */ \
/* escape the scope if used in a single line if statement. */ \ /* escape the scope if used in a single line if statement. */ \
ScopedTraceEvent(int) {} /* NOLINT */ \ ScopedTraceEvent(...) {} \
~ScopedTraceEvent() { \ ~ScopedTraceEvent() { \
/* TODO(nuskos): Remove the empty string passed as the |name| */ \ /* TODO(nuskos): Remove the empty string passed as the |name| */ \
/* field. As described in macros.h we shouldn't need it in our */ \ /* field. As described in macros.h we shouldn't need it in our */ \
/* end state */ \ /* end state. */ \
TRACING_INTERNAL_ADD_TRACE_EVENT(TRACE_EVENT_PHASE_END, category, "", \ TRACING_INTERNAL_ADD_TRACE_EVENT(TRACE_EVENT_PHASE_END, category, "", \
TRACE_EVENT_FLAG_NONE, \ TRACE_EVENT_FLAG_NONE, \
[](perfetto::EventContext) {}); \ [](perfetto::EventContext) {}); \
......
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