| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
PiperOrigin-RevId: 640138527
Change-Id: I650dd91d76824cfd3a57b36eca282f41b3667125
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang 19 seems to see the old usage of
absl::string_internal::HasAbslStringify in GoogleTest 1.14.0 and
incorrectly resolves absl::HasAbslStringify sometimes. This issue is
fixed when a version of GoogleTest that removes
absl::string_internal::HasAbslStringify is used.
This workaround is ugly but will be removed after the next GoogleTest
release.
PiperOrigin-RevId: 636993564
Change-Id: Ic166edbd4ddc2c716afbedec34be629cfc988e00
|
|
|
|
|
| |
PiperOrigin-RevId: 636990118
Change-Id: Ib90ed852b899a976679a8eb6352a9161c27e17ce
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1672
https://github.com/abseil/abseil-cpp/discussions/1671
Merge ddcbb2466b2c9c4048d60be7e58cf47f935c257d into eba8db7baf6c326870f28e58977075b7b2fb243d
Merging this change closes #1672
COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1672 from MBkkt:optimize-str-join ddcbb2466b2c9c4048d60be7e58cf47f935c257d
PiperOrigin-RevId: 633988391
Change-Id: I2b3904211a29de3a768fb90a7fc106d7ff6c03e7
|
|
|
|
|
|
|
|
|
| |
TestWithMultipleFormatsHelper
The `if (actual != expected)` makes the `ASSERT_EQ(actual, expected)` trigger only when the assertion fails. However, a successful `ASSERT_EQ` takes a negligible amount of time, which means the `if` is useless and only makes the test harder to read.
PiperOrigin-RevId: 632487285
Change-Id: I1f78136cf4895295c88a5ff3e0bcdce6b08c1d0b
|
|
|
|
|
|
|
|
|
|
| |
This change is a step towards simplifying `TestWithMultipleFormatsHelper` to the point where we'll be
able to handle special cases (e.g. apple's handling of nan) by changing which inputs are fed into the helper, instead of skipping them within the helper and not testing them at all.
Extracting the loop also improves readability by reducing indentation.
PiperOrigin-RevId: 631038465
Change-Id: I8b2458539d9d276093d8e7b5f373efba6a33800c
|
|
|
|
|
|
|
|
| |
It is unused.
We already use code within the `TestWithMultipleFormatsHelper` to skip output verification for Apple and MSVC.
PiperOrigin-RevId: 627783586
Change-Id: Ib51374e8571aa5f4b5f1e836815188bd9bdc1536
|
|
|
|
|
|
|
|
|
| |
bug](https://sourceware.org/bugzilla/show_bug.cgi?id=22142)
RHEL7 ships an affected version of glibc, but this bug is specific to powerpc, which abseil [does not support](https://github.com/google/oss-policies-info/blob/4ec9f2a979a6c6b7bb148040347c8d2b1def09fa/foundational-cxx-support-matrix.md).
PiperOrigin-RevId: 626018125
Change-Id: I1875aee6c37e69f712ef91e41da455af9d00fb5f
|
|
|
|
|
|
|
| |
"absl/strings/string_view.h".
PiperOrigin-RevId: 617232899
Change-Id: I5e6c0bd4545d7f7ad9c5c494017269e247f620a3
|
|
|
|
|
|
|
|
| |
The sampling rate may change over time, so this allows us to weight samples by
the value observed when we made the sampling decision.
PiperOrigin-RevId: 616900100
Change-Id: I9b1affdba93f5f48367cb7503916296b2d84709a
|
|
|
|
|
|
|
|
|
| |
This change mainly affects 32-bit platforms. Similar to
4618865caf8596742a9fd7c28a70a46b5e277794, check for size_t overflow
in all places where string result sizes are precomputed before allocation.
PiperOrigin-RevId: 615792028
Change-Id: I71c774c5ef2c2978bd812c70e9bab36d266b7c90
|
|
|
|
|
|
|
|
|
|
|
| |
Addition and subtraction operators std::array::iterator are defined only for
ptrdiff_t, which is signed, instead of size_t, which is unsigned. Therefore,
adding the index variable to ar.begin() will trigger -Wsign-conversion if
std::array::iterator is not a raw pointer because the index variable will be
implicitly converted from size_t (an unsigned type) to ptrdiff_t (a signed
type). To fix this, we explicitly static_cast index to a ptrdiff_t.
PiperOrigin-RevId: 613662928
Change-Id: I5e06c2261d7b8f167fae7bb6acece076257f8579
|
|
|
|
|
|
|
| |
go/ranked-overloads
PiperOrigin-RevId: 605125821
Change-Id: I2ee260eaf283acafd80abfd2b7419a0e9f597a78
|
|
|
|
|
| |
PiperOrigin-RevId: 603342563
Change-Id: I1cd80103377f457770d5178dad8b56ae459cbd55
|
|
|
|
|
|
|
| |
Also updated the return value to reference to clarify non-nullability.
PiperOrigin-RevId: 602730828
Change-Id: Ia36f7fde3cc87ac597ba4f194eebe9ebb90a1a09
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
releasing Abseil and GoogleTest.
GoogleTest referenced this internal file and this internal trait. Since
simultaneous releases are not possible since once release must reference
another, we will temporarily add this back.
https://github.com/google/googletest/blob/v1.14.x/googletest/include/gtest/gtest-printers.h#L119
https://github.com/google/googletest/pull/4368#issuecomment-1717699895
https://github.com/google/googletest/pull/4368#issuecomment-1717699895
PiperOrigin-RevId: 597073935
Change-Id: I7c2697a212dc477fd25770777445c64cfee73745
|
|
|
|
|
| |
PiperOrigin-RevId: 591894838
Change-Id: Ib3fe72d255f49320e2728c210ba1faabc81e0ef8
|
|
|
|
|
|
|
| |
This converts to UTF-8 regardless of locale.
PiperOrigin-RevId: 588186076
Change-Id: I2c9598279b413d460e13ad65da2ba421c0b40b83
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are also avoiding potential cache-misses, by avoiding load.
name old speed new speed delta
BM_Searchcase 3.09GB/s ±13% 3.20GB/s ±16% +3.69% (p=0.039 n=20+17)
BM_SearchcaseMedium 1.08GB/s ± 7% 1.04GB/s ±14% ~ (p=0.814 n=16+20)
BM_SearchcasePathological 618kB/s ±13% 652kB/s ± 6% +5.55% (p=0.043 n=20+16)
BM_Memcasematch 2.43GB/s ± 3% 2.45GB/s ± 3% ~ (p=0.488 n=17+16)
BM_MemcasematchMedium 230MB/s ± 8% 261MB/s ±14% +13.77% (p=0.000 n=16+20)
BM_MemcasematchPathological 624kB/s ±14% 619kB/s ±14% ~ (p=0.836 n=20+20)
PiperOrigin-RevId: 577919033
Change-Id: I31324e04b6a577c582ad630d171d3b41d826f1e4
|
|
|
|
|
|
|
| |
#1558
PiperOrigin-RevId: 577874842
Change-Id: I1d56f3f4b445f6c4a9df2fe06fec542cb00e0e92
|
|
|
|
|
| |
PiperOrigin-RevId: 576149980
Change-Id: I0a7e3df7a01edc78ee5d15d8d8e82e7bbc5fc0f3
|
|
|
|
|
|
|
| |
Users should use `absl::HasAbslStringify` instead.
PiperOrigin-RevId: 572916854
Change-Id: Ie67e076e0335b108d23f886a28074f7557ba045a
|
|
|
|
|
| |
PiperOrigin-RevId: 565050503
Change-Id: I8f4c463be4ef513a2788745d1b454a7ede489152
|
|
|
|
|
|
|
| |
We have no intention to use it instead of the CordRepBtree implementation, so cleanup up and remove all code and references.
PiperOrigin-RevId: 563803813
Change-Id: I95a67318d0f722f3eb7ecdcc7b6c87e28f2e26dd
|
|
|
|
|
|
|
| |
It sorts NaNs and the test became flaky. Flakiness arises from the fact that sorting checks randomize and check for 100 elements but we sort here around a thousand
PiperOrigin-RevId: 563783036
Change-Id: Id25bcb47483acf9c40be3fd1747c37d046197330
|
|
|
|
|
| |
PiperOrigin-RevId: 561444343
Change-Id: I26c648b28b626e11caa32b0a34aef92932d5ddb9
|
|
|
|
|
| |
PiperOrigin-RevId: 559415517
Change-Id: I5bbc744bf00be2fd15ec7544b725d699e0d982fb
|
|
|
|
|
|
|
| |
Some time ago the invariant for CRC cordreps was relaxed to allow for nullptr values on empty cords with an explicit empty CRC value. The CordzInfo analysis never checked for nullptr values causing cord sampling to crash if the sampling happened to include a (very unlikely) empty Cord value.
PiperOrigin-RevId: 558202613
Change-Id: Ib0e1eadd08047167e4df5d3035b36dca2c285a0d
|
|
|
|
|
| |
PiperOrigin-RevId: 551287955
Change-Id: Ic77831cec71f6ffe0a4e091baabe932b245269ea
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`memmatch()` is only used in `string_view.cc`, so move it there.
The moving of `memmatch()` to `string_view.cc` decouples `string_view`
from `memutil`, which will allow us to move `string_view` into its
own target in a followup.
The only other function that is used is `memcasecmp()`, so delete
all other functions.
PiperOrigin-RevId: 547238386
Change-Id: Id6fad47dd24191c8e8f26dd923fffa1007c8db4a
|
|
|
|
|
| |
PiperOrigin-RevId: 539900072
Change-Id: I675386e3184f6f5ab70b851add970c91d1dde9c5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a conservative change, in that it only contains bugfixes and allows new patterns that used to be compile errors. There are other changes we would like to make (as reflected in the comments in char_formatting_test.cc), but we are being careful about the implications of such behavior changes.
The two implementation changes are:
* Apply integral promotions to enums before printing them, so they are always treated as integers (and not chars) by StrCat and StrFormat.
* Classify `unsigned char` and `signed char` as integer-like rather than char-like, so that `StrFormat("%v", v)` accepts those types as integers (consistent with `StrCat()`.)
The behavior changes are:
* StrCat() now accepts char-backed enums (rather than failing to compile).
* StrFormat("%v") now accepts `signed char` and `unsigned char` as integral (rather than failing to compile).
* StrFormat("%v") now correctly formats 8-bit enums as integers (rather than failing internally and emitting nothing).
Tested:
Modified the char_formatting_test.cc case to reflect changes.
Re-ran all other tests.
PiperOrigin-RevId: 539659674
Change-Id: Ief56335f5a57e4582af396d00eaa9e7b6be4ddc6
|
|
|
|
|
|
|
| |
Introduce kHighRefcountMask which masks off flags and the LSb of the refcount value. In the cases where this mask is used, we don't need to check the LSb because we can assume the refcount is 1 when the rest of the masked RefcountAndFlags is empty, and the LSb doesn't matter if the masked value is not empty (either it's immortal or refcount > 1). This saves an instruction and a cycle (and + cmp -> tst) https://godbolt.org/z/Kz69eqfhq
PiperOrigin-RevId: 539151659
Change-Id: I2ec7d72918f052c4b0938edd746af9d5b3052c7e
|
|\
| |
| |
| |
| | |
PiperOrigin-RevId: 539145188
Change-Id: Ic8dc8112f77ca720a8871de57ee389f15693ab00
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
integers.
This is a simplification but not a behavior change; we used to choose %u for unsigned ints, but %u and %d generate the same output for these types.
PiperOrigin-RevId: 539104599
Change-Id: I9d7ff561b969a6287889f95063636d6b77a4a78b
|
|/ |
|
|
|
|
|
| |
PiperOrigin-RevId: 537400816
Change-Id: I06794a6b8b6a441e34121047024380190d42869a
|
|
|
|
|
|
|
|
|
|
|
| |
The non-RAW_ versions provide better output but weren't available when most of these tests were written.
There are just a couple spots where RAW_ is actually needed, e.g. signal handlers and malloc hooks.
Also fix a couple warnings in layout_test.cc newly surfaced because the optimizer understands CHECK_XX differently than INTERNAL_CHECK.
PiperOrigin-RevId: 534584435
Change-Id: I8d36fa809ffdaae5a3813064bd602cb8611c1613
|
|
|
|
|
|
|
|
|
|
| |
This includes an upgrade to CMake 3.26.3 and Bazel 6.2.0
This change includes support for both GCC 12 and 13 since we
were only testing GCC 11 before this change.
PiperOrigin-RevId: 534235753
Change-Id: I4183a02469b1c3425c52a31b71fcefe403315a42
|
|
|
|
|
| |
PiperOrigin-RevId: 532174747
Change-Id: I39dc6d5c369e8bfbdde5c826836e42f5baa69dc5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a heavily modified version of
https://github.com/abseil/abseil-cpp/pull/1445,
which adds some missing test libraries to the test DLL.
Unlike #1445, this change moves several global variables out of
headers that did not need to be in headers.
For instance, cord_btree_exhaustive_validation was a global
defined/declared in cord_internal, but only used in cord_rep_btree
and its test.
cordz_handle defined a queue in its header even though it wasn't needed,
which also led to ODR problems.
The Spinlock used in CordzHandle is replaced with a Mutex. This was
originally a Mutex, but Chromium asked us to change it to a Spinlock
to avoid a static initializer. After this change, the static
initializer is no longer an issue.
#1407
PiperOrigin-RevId: 531516991
Change-Id: I0e431a193698b20ba03fac6e414c26f153f330a7
|
|
|
|
|
|
|
|
|
|
| |
will just be a copy anyway. Also remove the typedef so that it is
clear from the type at the callsite that moving it isn't necessary.
Fixes #1443
PiperOrigin-RevId: 530596294
Change-Id: I58ffc370bbccc0816bca4c4f85c3bb12c7ee2eb2
|
| |
|
|\
| |
| |
| |
| | |
PiperOrigin-RevId: 528547013
Change-Id: I9b57ee062ef666d6a34696778ff16a46c5ccb17d
|
|/ |
|
|\
| |
| |
| |
| | |
PiperOrigin-RevId: 527066823
Change-Id: Ifa1e9a43c7490b34f9f4dbfa12d3acbed6b49777
|
|/ |
|
|\
| |
| |
| |
| | |
PiperOrigin-RevId: 526675031
Change-Id: Ib84423ccea2d0183166194a0916a97a7ed32915c
|
|/
|
|
| |
This lets us avoid having to do the addition manually.
|
|
|
|
|
|
|
|
|
|
|
| |
escaping vs unescaping:
* Move table documenting escaping conversions to be next to the internal escaping code that implements it. Mention it from the internal _un_escaping code (which reverses it) too.
* Centralize the two arrays which map from normal chars to escaped chars (k(WebSafe)Base64Chars), and make bidirectional documentation links between them and their reverse (unescaping) maps (kUn(WebSafe)Base64).
* Remove redundant list of escaping/unescaping methods in the public escaping.cc.
PiperOrigin-RevId: 517142667
Change-Id: I627e59a196ef855e5bf61ef7f4b509920e8d7acd
|