summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2019-06-13 09:14:42 -0700
committerGravatar Gennadiy Civil <misterg@google.com>2019-06-13 14:14:34 -0400
commit8f11724067248acc330b4d1f12f0c76d03f2cfb1 (patch)
treed7f7886de8a135636cf1d47956b0b5c8645db81c
parentb1dd425423380126f6441ce4fbb6f8f6c75b793a (diff)
Export of internal Abseil changes.
-- fc61fc3822d414a1abda906a81208d2667195de3 by Abseil Team <absl-team@google.com>: Clarify documentation relating to the output of the various printing functions. PiperOrigin-RevId: 253041344 -- 06cb414d1006cd89e38b381d52763b048909d69a by Jorg Brown <jorg@google.com>: Change absl::container_internal::CompressedTuple to instantiate its internal Storage class with the name of the type it's holding, rather than the name of the Tuple. This is not an externally-visible change, other than less compiler memory is used and less debug information is generated. PiperOrigin-RevId: 252940185 -- 33b3f3ed6037eac7d1b7989a3641370e92beaeb9 by Jorg Brown <jorg@google.com>: Change absl::container_internal::CompressedTuple to instantiate its internal Storage class with the name of the type it's holding, rather than the name of the Tuple. This is not an externally-visible change, other than less compiler memory is used and less debug information is generated. PiperOrigin-RevId: 252902091 -- 88595f4e7d6ac57bebdc9811045867f5d7477b5b by Abseil Team <absl-team@google.com>: Unset thread_local/__thread support for Emscripten. PiperOrigin-RevId: 252706297 -- cabd1715d873dc457271940335c764e62defb952 by Derek Mauro <dmauro@google.com>: Rollback LLVM and Bazel version due to intermittent network failures downloading from GitHub PiperOrigin-RevId: 252661245 GitOrigin-RevId: fc61fc3822d414a1abda906a81208d2667195de3 Change-Id: I4c30995a2db7acef19415ad519259131584db261
-rw-r--r--absl/base/config.h7
-rw-r--r--absl/copts/GENERATED_AbseilCopts.cmake2
-rw-r--r--absl/copts/GENERATED_copts.bzl2
-rw-r--r--absl/copts/copts.py2
-rw-r--r--absl/strings/str_cat.h3
-rw-r--r--absl/strings/str_format.h11
-rw-r--r--absl/strings/substitute.h7
-rwxr-xr-xci/linux_clang-latest_libcxx_asan_bazel.sh2
-rwxr-xr-xci/linux_clang-latest_libcxx_bazel.sh2
-rwxr-xr-xci/linux_clang-latest_libcxx_tsan_bazel.sh2
-rwxr-xr-xci/linux_clang-latest_libstdcxx_bazel.sh2
11 files changed, 33 insertions, 9 deletions
diff --git a/absl/base/config.h b/absl/base/config.h
index 2a14fe74..f12f84fd 100644
--- a/absl/base/config.h
+++ b/absl/base/config.h
@@ -181,6 +181,13 @@
#endif
#endif // defined(__ANDROID__) && defined(__clang__)
+// Emscripten doesn't yet support `thread_local` or `__thread`.
+// https://github.com/emscripten-core/emscripten/issues/3502
+#if defined(__EMSCRIPTEN__)
+#undef ABSL_HAVE_TLS
+#undef ABSL_HAVE_THREAD_LOCAL
+#endif // defined(__EMSCRIPTEN__)
+
// ABSL_HAVE_INTRINSIC_INT128
//
// Checks whether the __int128 compiler extension for a 128-bit integral type is
diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
index 927ef290..c4948d42 100644
--- a/absl/copts/GENERATED_AbseilCopts.cmake
+++ b/absl/copts/GENERATED_AbseilCopts.cmake
@@ -77,6 +77,7 @@ list(APPEND ABSL_CLANG_CL_TEST_FLAGS
"-Wno-unused-template"
"-Wno-used-but-marked-unused"
"-Wno-zero-as-null-pointer-constant"
+ "-Wno-gnu-include-next"
"-Wno-gnu-zero-variadic-macro-arguments"
)
@@ -180,6 +181,7 @@ list(APPEND ABSL_LLVM_TEST_FLAGS
"-Wno-unused-template"
"-Wno-used-but-marked-unused"
"-Wno-zero-as-null-pointer-constant"
+ "-Wno-gnu-include-next"
"-Wno-gnu-zero-variadic-macro-arguments"
)
diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
index 58bdfef9..422b3a9b 100644
--- a/absl/copts/GENERATED_copts.bzl
+++ b/absl/copts/GENERATED_copts.bzl
@@ -78,6 +78,7 @@ ABSL_CLANG_CL_TEST_FLAGS = [
"-Wno-unused-template",
"-Wno-used-but-marked-unused",
"-Wno-zero-as-null-pointer-constant",
+ "-Wno-gnu-include-next",
"-Wno-gnu-zero-variadic-macro-arguments",
]
@@ -181,6 +182,7 @@ ABSL_LLVM_TEST_FLAGS = [
"-Wno-unused-template",
"-Wno-used-but-marked-unused",
"-Wno-zero-as-null-pointer-constant",
+ "-Wno-gnu-include-next",
"-Wno-gnu-zero-variadic-macro-arguments",
]
diff --git a/absl/copts/copts.py b/absl/copts/copts.py
index 4594fda2..5bede34c 100644
--- a/absl/copts/copts.py
+++ b/absl/copts/copts.py
@@ -105,6 +105,8 @@ LLVM_TEST_DISABLE_WARNINGS_FLAGS = [
"-Wno-unused-template",
"-Wno-used-but-marked-unused",
"-Wno-zero-as-null-pointer-constant",
+ # For a libc++ bug fixed in r357267
+ "-Wno-gnu-include-next",
# gtest depends on this GNU extension being offered.
"-Wno-gnu-zero-variadic-macro-arguments",
]
diff --git a/absl/strings/str_cat.h b/absl/strings/str_cat.h
index 559ee0aa..a99aac01 100644
--- a/absl/strings/str_cat.h
+++ b/absl/strings/str_cat.h
@@ -37,7 +37,8 @@
// attempt to pass ':' instead of ":" might result in a 58 ending up in your
// result.
//
-// Bools convert to "0" or "1".
+// Bools convert to "0" or "1". Pointers to types other than `char *` are not
+// valid inputs. No output is generated for null `char *` pointers.
//
// Floating point numbers are formatted with six-digit precision, which is
// the default for "std::cout <<" or printf "%g" (the same as "%.6g").
diff --git a/absl/strings/str_format.h b/absl/strings/str_format.h
index da3208e1..0b93c288 100644
--- a/absl/strings/str_format.h
+++ b/absl/strings/str_format.h
@@ -20,7 +20,8 @@
// The `str_format` library is a typesafe replacement for the family of
// `printf()` string formatting routines within the `<cstdio>` standard library
// header. Like the `printf` family, the `str_format` uses a "format string" to
-// perform argument substitutions based on types.
+// perform argument substitutions based on types. See the `FormatSpec` section
+// below for format string documentation.
//
// Example:
//
@@ -67,6 +68,7 @@
// In addition, the `str_format` library provides extension points for
// augmenting formatting to new types. These extensions are fully documented
// within the `str_format_extension.h` header file.
+
#ifndef ABSL_STRINGS_STR_FORMAT_H_
#define ABSL_STRINGS_STR_FORMAT_H_
@@ -211,6 +213,11 @@ class FormatCountCapture {
// written to this point. The resulting value must be captured within an
// `absl::FormatCountCapture` type.
//
+// Implementation-defined behavior:
+// * A null pointer provided to "%s" or "%p" is output as "(nil)".
+// * A non-null pointer provided to "%p" is output in hex as if by %#x or
+// %#lx.
+//
// NOTE: `o`, `x\X` and `u` will convert signed values to their unsigned
// counterpart before formatting.
//
@@ -226,7 +233,7 @@ class FormatCountCapture {
// "%e", .01 -> "1.00000e-2"
// "%a", -3.0 -> "-0x1.8p+1"
// "%g", .01 -> "1e-2"
-// "%p", *int -> "0x7ffdeb6ad2a4"
+// "%p", (void*)&value -> "0x7ffdeb6ad2a4"
//
// int n = 0;
// std::string s = absl::StrFormat(
diff --git a/absl/strings/substitute.h b/absl/strings/substitute.h
index 32dec30b..233e9dcf 100644
--- a/absl/strings/substitute.h
+++ b/absl/strings/substitute.h
@@ -35,10 +35,13 @@
// and single digit positional ids to indicate which substitution arguments to
// use at that location within the format string.
//
+// A '$$' sequence in the format string causes a literal '$' character to be
+// output.
+//
// Example 1:
-// std::string s = Substitute("$1 purchased $0 $2. Thanks $1!",
+// std::string s = Substitute("$1 purchased $0 $2 for $$10. Thanks $1!",
// 5, "Bob", "Apples");
-// EXPECT_EQ("Bob purchased 5 Apples. Thanks Bob!", s);
+// EXPECT_EQ("Bob purchased 5 Apples for $10. Thanks Bob!", s);
//
// Example 2:
// std::string s = "Hi. ";
diff --git a/ci/linux_clang-latest_libcxx_asan_bazel.sh b/ci/linux_clang-latest_libcxx_asan_bazel.sh
index a175810a..113acdbe 100755
--- a/ci/linux_clang-latest_libcxx_asan_bazel.sh
+++ b/ci/linux_clang-latest_libcxx_asan_bazel.sh
@@ -32,7 +32,7 @@ if [ -z ${COMPILATION_MODE:-} ]; then
COMPILATION_MODE="fastbuild opt"
fi
-readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190610"
+readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190508"
# USE_BAZEL_CACHE=1 only works on Kokoro.
# Without access to the credentials this won't work.
diff --git a/ci/linux_clang-latest_libcxx_bazel.sh b/ci/linux_clang-latest_libcxx_bazel.sh
index 844fff5d..f32cbef7 100755
--- a/ci/linux_clang-latest_libcxx_bazel.sh
+++ b/ci/linux_clang-latest_libcxx_bazel.sh
@@ -32,7 +32,7 @@ if [ -z ${COMPILATION_MODE:-} ]; then
COMPILATION_MODE="fastbuild opt"
fi
-readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190610"
+readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190508"
# USE_BAZEL_CACHE=1 only works on Kokoro.
# Without access to the credentials this won't work.
diff --git a/ci/linux_clang-latest_libcxx_tsan_bazel.sh b/ci/linux_clang-latest_libcxx_tsan_bazel.sh
index b856b4e6..c4edd198 100755
--- a/ci/linux_clang-latest_libcxx_tsan_bazel.sh
+++ b/ci/linux_clang-latest_libcxx_tsan_bazel.sh
@@ -32,7 +32,7 @@ if [ -z ${COMPILATION_MODE:-} ]; then
COMPILATION_MODE="fastbuild opt"
fi
-readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190610"
+readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190508"
# USE_BAZEL_CACHE=1 only works on Kokoro.
# Without access to the credentials this won't work.
diff --git a/ci/linux_clang-latest_libstdcxx_bazel.sh b/ci/linux_clang-latest_libstdcxx_bazel.sh
index 320b7cdf..7bbecd6f 100755
--- a/ci/linux_clang-latest_libstdcxx_bazel.sh
+++ b/ci/linux_clang-latest_libstdcxx_bazel.sh
@@ -32,7 +32,7 @@ if [ -z ${COMPILATION_MODE:-} ]; then
COMPILATION_MODE="fastbuild opt"
fi
-readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190610"
+readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190508"
# USE_BAZEL_CACHE=1 only works on Kokoro.
# Without access to the credentials this won't work.