Skip to content

Commit

Permalink
Remove redundant semicolons introduced by macros
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 616083064
Change-Id: I3d69303d32431227c197247682f8dcb70f9a239d
  • Loading branch information
Abseil Team authored and copybara-github committed Mar 15, 2024
1 parent d0d902e commit 16e2195
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
2 changes: 2 additions & 0 deletions absl/copts/GENERATED_AbseilCopts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ list(APPEND ABSL_GCC_TEST_FLAGS
list(APPEND ABSL_LLVM_FLAGS
"-Wall"
"-Wextra"
"-Wc++98-compat-extra-semi"
"-Wcast-qual"
"-Wconversion"
"-Wdead-code-aggressive"
Expand Down Expand Up @@ -123,6 +124,7 @@ list(APPEND ABSL_LLVM_FLAGS
list(APPEND ABSL_LLVM_TEST_FLAGS
"-Wall"
"-Wextra"
"-Wc++98-compat-extra-semi"
"-Wcast-qual"
"-Wconversion"
"-Wdead-code-aggressive"
Expand Down
2 changes: 2 additions & 0 deletions absl/copts/GENERATED_copts.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ ABSL_GCC_TEST_FLAGS = [
ABSL_LLVM_FLAGS = [
"-Wall",
"-Wextra",
"-Wc++98-compat-extra-semi",
"-Wcast-qual",
"-Wconversion",
"-Wdead-code-aggressive",
Expand Down Expand Up @@ -124,6 +125,7 @@ ABSL_LLVM_FLAGS = [
ABSL_LLVM_TEST_FLAGS = [
"-Wall",
"-Wextra",
"-Wc++98-compat-extra-semi",
"-Wcast-qual",
"-Wconversion",
"-Wdead-code-aggressive",
Expand Down
1 change: 1 addition & 0 deletions absl/copts/copts.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
ABSL_LLVM_FLAGS = [
"-Wall",
"-Wextra",
"-Wc++98-compat-extra-semi",
"-Wcast-qual",
"-Wconversion",
"-Wdead-code-aggressive",
Expand Down
2 changes: 1 addition & 1 deletion absl/flags/flag_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ constexpr size_t kNumFlags = 0 REPLICATE(COUNT, _, _);
#pragma clang section data = ".benchmark_flags"
#endif
#define DEFINE_FLAG(T, name, index) ABSL_FLAG(T, name##_##index, {}, "");
#define FLAG_DEF(T) REPLICATE(DEFINE_FLAG, T, T##_flag);
#define FLAG_DEF(T) REPLICATE(DEFINE_FLAG, T, T##_flag)
BENCHMARKED_TYPES(FLAG_DEF)
#if defined(__clang__) && defined(__linux__)
#pragma clang section data = ""
Expand Down
10 changes: 5 additions & 5 deletions absl/flags/parse_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,31 @@
#define FLAG_MULT(x) F3(x)
#define TEST_FLAG_HEADER FLAG_HEADER_

#define F(name) ABSL_FLAG(int, name, 0, "");
#define F(name) ABSL_FLAG(int, name, 0, "")

#define F1(name) \
F(name##1); \
F(name##2); \
F(name##3); \
F(name##4); \
F(name##5);
F(name##5)
/**/
#define F2(name) \
F1(name##1); \
F1(name##2); \
F1(name##3); \
F1(name##4); \
F1(name##5);
F1(name##5)
/**/
#define F3(name) \
F2(name##1); \
F2(name##2); \
F2(name##3); \
F2(name##4); \
F2(name##5);
F2(name##5)
/**/

FLAG_MULT(TEST_FLAG_HEADER)
FLAG_MULT(TEST_FLAG_HEADER);

namespace {

Expand Down
14 changes: 7 additions & 7 deletions absl/hash/hash_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ absl::flat_hash_set<T> FlatHashSet(size_t count) {
return hash<decltype(__VA_ARGS__)>{}(arg); \
} \
bool absl_hash_test_odr_use##hash##name = \
(benchmark::DoNotOptimize(&Codegen##hash##name), false);
(benchmark::DoNotOptimize(&Codegen##hash##name), false)

MAKE_BENCHMARK(AbslHash, Int32, int32_t{});
MAKE_BENCHMARK(AbslHash, Int64, int64_t{});
Expand Down Expand Up @@ -315,9 +315,9 @@ struct StringRand {
BENCHMARK(BM_latency_##hash##_##name); \
} // namespace

MAKE_LATENCY_BENCHMARK(AbslHash, Int32, PodRand<int32_t>);
MAKE_LATENCY_BENCHMARK(AbslHash, Int64, PodRand<int64_t>);
MAKE_LATENCY_BENCHMARK(AbslHash, String9, StringRand<9>);
MAKE_LATENCY_BENCHMARK(AbslHash, String33, StringRand<33>);
MAKE_LATENCY_BENCHMARK(AbslHash, String65, StringRand<65>);
MAKE_LATENCY_BENCHMARK(AbslHash, String257, StringRand<257>);
MAKE_LATENCY_BENCHMARK(AbslHash, Int32, PodRand<int32_t>)
MAKE_LATENCY_BENCHMARK(AbslHash, Int64, PodRand<int64_t>)
MAKE_LATENCY_BENCHMARK(AbslHash, String9, StringRand<9>)
MAKE_LATENCY_BENCHMARK(AbslHash, String33, StringRand<33>)
MAKE_LATENCY_BENCHMARK(AbslHash, String65, StringRand<65>)
MAKE_LATENCY_BENCHMARK(AbslHash, String257, StringRand<257>)
4 changes: 2 additions & 2 deletions absl/random/benchmarks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void BM_Thread(benchmark::State& state) {
BENCHMARK_TEMPLATE(BM_Shuffle, Engine, 100)->ThreadPerCpu(); \
BENCHMARK_TEMPLATE(BM_Shuffle, Engine, 1000)->ThreadPerCpu(); \
BENCHMARK_TEMPLATE(BM_ShuffleReuse, Engine, 100)->ThreadPerCpu(); \
BENCHMARK_TEMPLATE(BM_ShuffleReuse, Engine, 1000)->ThreadPerCpu();
BENCHMARK_TEMPLATE(BM_ShuffleReuse, Engine, 1000)->ThreadPerCpu()

#define BM_EXTENDED(Engine) \
/* -------------- Extended Uniform -----------------------*/ \
Expand Down Expand Up @@ -355,7 +355,7 @@ void BM_Thread(benchmark::State& state) {
BENCHMARK_TEMPLATE(BM_Beta, Engine, absl::beta_distribution<float>, 410, \
580); \
BENCHMARK_TEMPLATE(BM_Gamma, Engine, std::gamma_distribution<float>, 199); \
BENCHMARK_TEMPLATE(BM_Gamma, Engine, std::gamma_distribution<double>, 199);
BENCHMARK_TEMPLATE(BM_Gamma, Engine, std::gamma_distribution<double>, 199)

// ABSL Recommended interfaces.
BM_BASIC(absl::InsecureBitGen); // === pcg64_2018_engine
Expand Down

0 comments on commit 16e2195

Please sign in to comment.