summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2024-03-15 04:17:31 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2024-03-15 04:18:54 -0700
commit16e21953352993faeb83d16d4bce99718e6e9d9c (patch)
treeb075be5557e08303c91271e095614a3d3a449c92
parentd0d902e6e1dcfec1e861bddee00e30fa04d4084d (diff)
Remove redundant semicolons introduced by macros
PiperOrigin-RevId: 616083064 Change-Id: I3d69303d32431227c197247682f8dcb70f9a239d
-rw-r--r--absl/copts/GENERATED_AbseilCopts.cmake2
-rw-r--r--absl/copts/GENERATED_copts.bzl2
-rw-r--r--absl/copts/copts.py1
-rw-r--r--absl/flags/flag_benchmark.cc2
-rw-r--r--absl/flags/parse_test.cc10
-rw-r--r--absl/hash/hash_benchmark.cc14
-rw-r--r--absl/random/benchmarks.cc4
7 files changed, 20 insertions, 15 deletions
diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
index 0079a719..24b6175a 100644
--- a/absl/copts/GENERATED_AbseilCopts.cmake
+++ b/absl/copts/GENERATED_AbseilCopts.cmake
@@ -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"
@@ -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"
diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
index d9a9b375..9f59be4f 100644
--- a/absl/copts/GENERATED_copts.bzl
+++ b/absl/copts/GENERATED_copts.bzl
@@ -85,6 +85,7 @@ ABSL_GCC_TEST_FLAGS = [
ABSL_LLVM_FLAGS = [
"-Wall",
"-Wextra",
+ "-Wc++98-compat-extra-semi",
"-Wcast-qual",
"-Wconversion",
"-Wdead-code-aggressive",
@@ -124,6 +125,7 @@ ABSL_LLVM_FLAGS = [
ABSL_LLVM_TEST_FLAGS = [
"-Wall",
"-Wextra",
+ "-Wc++98-compat-extra-semi",
"-Wcast-qual",
"-Wconversion",
"-Wdead-code-aggressive",
diff --git a/absl/copts/copts.py b/absl/copts/copts.py
index 1170d005..64e6f8a5 100644
--- a/absl/copts/copts.py
+++ b/absl/copts/copts.py
@@ -44,6 +44,7 @@ ABSL_GCC_TEST_ADDITIONAL_FLAGS = [
ABSL_LLVM_FLAGS = [
"-Wall",
"-Wextra",
+ "-Wc++98-compat-extra-semi",
"-Wcast-qual",
"-Wconversion",
"-Wdead-code-aggressive",
diff --git a/absl/flags/flag_benchmark.cc b/absl/flags/flag_benchmark.cc
index 758a6a55..88cc0c56 100644
--- a/absl/flags/flag_benchmark.cc
+++ b/absl/flags/flag_benchmark.cc
@@ -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 = ""
diff --git a/absl/flags/parse_test.cc b/absl/flags/parse_test.cc
index b3d4ce4e..99970692 100644
--- a/absl/flags/parse_test.cc
+++ b/absl/flags/parse_test.cc
@@ -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 {
diff --git a/absl/hash/hash_benchmark.cc b/absl/hash/hash_benchmark.cc
index d18ea694..9b73f461 100644
--- a/absl/hash/hash_benchmark.cc
+++ b/absl/hash/hash_benchmark.cc
@@ -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{});
@@ -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>)
diff --git a/absl/random/benchmarks.cc b/absl/random/benchmarks.cc
index 0900e818..26bc95e8 100644
--- a/absl/random/benchmarks.cc
+++ b/absl/random/benchmarks.cc
@@ -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 -----------------------*/ \
@@ -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