diff --git a/include/perfetto/base/compiler.h b/include/perfetto/base/compiler.h index 85678cc768..e4b6b0cae8 100644 --- a/include/perfetto/base/compiler.h +++ b/include/perfetto/base/compiler.h @@ -143,11 +143,7 @@ extern "C" void __asan_unpoison_memory_region(void const volatile*, size_t); #endif // Macro for telling -Wimplicit-fallthrough that a fallthrough is intentional. -#if defined(__clang__) -#define PERFETTO_FALLTHROUGH [[clang::fallthrough]] -#else -#define PERFETTO_FALLTHROUGH -#endif +#define PERFETTO_FALLTHROUGH [[fallthrough]] namespace perfetto { namespace base { diff --git a/include/perfetto/ext/base/http/sha1.h b/include/perfetto/ext/base/http/sha1.h index c583d69d4c..90b54e7a6d 100644 --- a/include/perfetto/ext/base/http/sha1.h +++ b/include/perfetto/ext/base/http/sha1.h @@ -20,6 +20,8 @@ #include #include +#include +#include #include namespace perfetto { diff --git a/include/perfetto/profiling/pprof_builder.h b/include/perfetto/profiling/pprof_builder.h index df18c5a84f..9ded53e2de 100644 --- a/include/perfetto/profiling/pprof_builder.h +++ b/include/perfetto/profiling/pprof_builder.h @@ -17,6 +17,7 @@ #ifndef INCLUDE_PERFETTO_PROFILING_PPROF_BUILDER_H_ #define INCLUDE_PERFETTO_PROFILING_PPROF_BUILDER_H_ +#include #include #include diff --git a/src/base/http/sha1.cc b/src/base/http/sha1.cc index f3e1e5d54c..1959381ad3 100644 --- a/src/base/http/sha1.cc +++ b/src/base/http/sha1.cc @@ -16,7 +16,6 @@ #include "perfetto/ext/base/http/sha1.h" #include -#include #include // From chrome_elf/sha1/sha1.cc. diff --git a/src/base/http/sha1_unittest.cc b/src/base/http/sha1_unittest.cc index 269afc1ee7..c392ae77a1 100644 --- a/src/base/http/sha1_unittest.cc +++ b/src/base/http/sha1_unittest.cc @@ -16,6 +16,7 @@ #include "perfetto/ext/base/http/sha1.h" +#include #include #include "perfetto/ext/base/string_view.h" diff --git a/src/profiling/symbolizer/symbolizer.h b/src/profiling/symbolizer/symbolizer.h index 8d505904f2..da1b3550a9 100644 --- a/src/profiling/symbolizer/symbolizer.h +++ b/src/profiling/symbolizer/symbolizer.h @@ -17,7 +17,7 @@ #ifndef SRC_PROFILING_SYMBOLIZER_SYMBOLIZER_H_ #define SRC_PROFILING_SYMBOLIZER_SYMBOLIZER_H_ -#include +#include #include #include diff --git a/src/trace_processor/perfetto_sql/intrinsics/operators/span_join_operator.cc b/src/trace_processor/perfetto_sql/intrinsics/operators/span_join_operator.cc index a279829a12..a1d9630da9 100644 --- a/src/trace_processor/perfetto_sql/intrinsics/operators/span_join_operator.cc +++ b/src/trace_processor/perfetto_sql/intrinsics/operators/span_join_operator.cc @@ -23,6 +23,7 @@ #include #include +#include "perfetto/base/compiler.h" #include "perfetto/base/logging.h" #include "perfetto/base/status.h" #include "perfetto/ext/base/string_splitter.h" @@ -578,7 +579,7 @@ base::Status SpanJoinOperatorTable::Cursor::Column(sqlite3_context* context, sqlite3_result_int64(context, static_cast(partition)); break; } - [[clang::fallthrough]]; + PERFETTO_FALLTHROUGH; } default: { size_t index = static_cast(N); diff --git a/src/traceconv/trace_to_profile.h b/src/traceconv/trace_to_profile.h index 0fc5d65f01..0991945b76 100644 --- a/src/traceconv/trace_to_profile.h +++ b/src/traceconv/trace_to_profile.h @@ -17,6 +17,7 @@ #ifndef SRC_TRACECONV_TRACE_TO_PROFILE_H_ #define SRC_TRACECONV_TRACE_TO_PROFILE_H_ +#include #include #include