aboutsummaryrefslogtreecommitdiffhomepage
path: root/absl/strings/str_format_test.cc
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2018-10-10 12:31:37 -0700
committerGravatar CJ Johnson <johnsoncj@google.com>2018-10-10 15:35:19 -0400
commitf340f773edab951656b19b6f1a77c964a78ec4c2 (patch)
treec42bf7faf49fb2355661c9f39c40513bc1ff2697 /absl/strings/str_format_test.cc
parent445998d7ac4e5d3c50411d377e3b50e960d2d6c2 (diff)
Export of internal Abseil changes.
-- 906c47420646d510edd2479d5542c56f5fa31b65 by CJ Johnson <johnsoncj@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 216573923 -- 74560d4afd2b605909e677c6fc3076049fb3010a by Eric Fiselier <ericwf@google.com>: Avoid -Wformat-pedantic in benchmark. PiperOrigin-RevId: 216523769 -- 9bcc9da8b03e6d1ea43ee78931256c5541cb9686 by Eric Fiselier <ericwf@google.com>: Delete unused CityHash functions. PiperOrigin-RevId: 216464492 -- a42563b394c89fbb4c55cb5a6a5edbf96d271eea by Abseil Team <absl-team@google.com>: Introduce new Abseil interfaces for converting between civil times and absolute times.s Deprecates absl::ConvertDateTime() and absl::FromDateTime(). PiperOrigin-RevId: 216424948 -- 088e11235124267517d7f137854fa5554679c24f by Eric Fiselier <ericwf@google.com>: Remove unneeded break statements in test. PiperOrigin-RevId: 216403321 GitOrigin-RevId: 906c47420646d510edd2479d5542c56f5fa31b65 Change-Id: Idb44420be623e369c66f5a9c92bdc9ab46d3ec92
Diffstat (limited to 'absl/strings/str_format_test.cc')
-rw-r--r--absl/strings/str_format_test.cc26
1 files changed, 6 insertions, 20 deletions
diff --git a/absl/strings/str_format_test.cc b/absl/strings/str_format_test.cc
index aa14e21..ea9a3a1 100644
--- a/absl/strings/str_format_test.cc
+++ b/absl/strings/str_format_test.cc
@@ -605,35 +605,21 @@ TEST_F(ParsedFormatTest, RegressionMixPositional) {
// Some codegen thunks that we can use to easily dump the generated assembly for
// different StrFormat calls.
-inline std::string CodegenAbslStrFormatInt(int i) {
+std::string CodegenAbslStrFormatInt(int i) { // NOLINT
return absl::StrFormat("%d", i);
}
-inline std::string CodegenAbslStrFormatIntStringInt64(int i, const std::string& s,
- int64_t i64) {
+std::string CodegenAbslStrFormatIntStringInt64(int i, const std::string& s,
+ int64_t i64) { // NOLINT
return absl::StrFormat("%d %s %d", i, s, i64);
}
-inline void CodegenAbslStrAppendFormatInt(std::string* out, int i) {
+void CodegenAbslStrAppendFormatInt(std::string* out, int i) { // NOLINT
absl::StrAppendFormat(out, "%d", i);
}
-inline void CodegenAbslStrAppendFormatIntStringInt64(std::string* out, int i,
+void CodegenAbslStrAppendFormatIntStringInt64(std::string* out, int i,
const std::string& s,
- int64_t i64) {
+ int64_t i64) { // NOLINT
absl::StrAppendFormat(out, "%d %s %d", i, s, i64);
}
-
-auto absl_internal_str_format_force_codegen_funcs = std::make_tuple(
- CodegenAbslStrFormatInt, CodegenAbslStrFormatIntStringInt64,
- CodegenAbslStrAppendFormatInt, CodegenAbslStrAppendFormatIntStringInt64);
-
-bool absl_internal_str_format_force_codegen_always_false;
-// Force the compiler to generate the functions by making it look like we
-// escape the function pointers.
-// It can't statically know that
-// absl_internal_str_format_force_codegen_always_false is not changed by someone
-// else.
-bool absl_internal_str_format_force_codegen =
- absl_internal_str_format_force_codegen_always_false &&
- printf("%p", &absl_internal_str_format_force_codegen_funcs) == 0;