summaryrefslogtreecommitdiff
path: root/absl/status
Commit message (Collapse)AuthorAge
* Use GetStatus in IsOkAndHoldsMatcherGravatar Laramie Leavitt2024-07-10
| | | | | PiperOrigin-RevId: 651093644 Change-Id: Ia5bb3343ef06529d5fa2d469bcad47451ea79c69
* Deprecate `ABSL_ATTRIBUTE_NORETURN` in favor of the `[[noreturn]]`Gravatar Derek Mauro2024-07-01
| | | | | | | | | | | | | | | standardized in C++11 Migrate all Abseil code to `[[noreturn]]`. Notably, https://github.com/abseil/abseil-cpp/issues/1698 reports that `[[noreturn]]` works better here. We can't migrate `ABSL_ATTRIBUTE_NORETURN` to use `[[noreturn]]` because the difference in accepted attribute placement breaks some code. PiperOrigin-RevId: 648395324 Change-Id: Icd3e9b837aac25f128e8994de099f1edb3cabccf
* Remove the forked absl::Status matchers implementation in statusor_testGravatar Derek Mauro2024-05-03
| | | | | PiperOrigin-RevId: 630404862 Change-Id: Icfe4bea2657d319cdd10902ee79af895c43602f1
* Add comment hack to fix copybara reversibilityGravatar Derek Mauro2024-05-02
| | | | | PiperOrigin-RevId: 630205286 Change-Id: I14e29fe846701c1381adb4642e55843b482254c6
* Add GoogleTest matchers for absl::StatusGravatar Zie Weaver2024-05-02
| | | | | PiperOrigin-RevId: 630072639 Change-Id: Ibbb166cc3c0479617c8e48abe8134b59a67a578f
* Add internal traits to absl::StatusOr for lifetimebound detectionGravatar Abseil Team2024-04-02
| | | | | | | | | This helps compilers that understand `ABSL_ATTRIBUTE_LIFETIME_BOUND` flag constructs such as `absl::StatusOr<std::string_view> str = std::string(...)` as error-prone. PiperOrigin-RevId: 621169918 Change-Id: Id621f63b9da4dc72eb4bd42c62d88bcc15a05243
* Remove deprecated errno constants from the absl::Status mappingGravatar Derek Mauro2024-03-27
| | | | | | | | | | | | | | ENOSTR, ETIME, ENODATA, and ENOSR are deprecated by POSIX and C++23. This change also turns on the deprecation warnings used by Chromium. See also: https://wg21.link/LWG3869 https://github.com/llvm/llvm-project/pull/80542 https://buganizer.corp.google.com/issues/331100926 PiperOrigin-RevId: 619551374 Change-Id: Ica8d5008cbee52ce88d58a1fcb79dbe794045bae
* Separate out absl::StatusOr constraints into statusor_internal.hGravatar Abseil Team2024-03-21
| | | | | PiperOrigin-RevId: 617920100 Change-Id: I0717560a88d32c067ce26b463b14d0db458b28b6
* Fix the move to itselfGravatar Abseil Team2024-03-11
| | | | | PiperOrigin-RevId: 614670264 Change-Id: Id6b1cffa4e104a82234130977235f1eb1021968f
* Add noexcept to move assignment operator and swap functionGravatar Abseil Team2024-02-22
| | | | | | | This resolves a couple of Clang Tidy performance warnings. PiperOrigin-RevId: 609394317 Change-Id: Ibebc7e3f7121355b8660284e18c110bb9171d61c
* Add `ostream<<` and `AbslStringify` to `absl::StatusOr`.Gravatar Zie Weaver2023-12-13
| | | | | | | | These methods will only be defined if they're defined for `T`. Additionally, we add jitter to the output to discourage people relying on the output format. PiperOrigin-RevId: 590598988 Change-Id: I4e7173b5f0c66fd3a1cdd3392944e20b8a26641f
* Add nullability annotationsGravatar Dmitri Gribenko2023-12-11
| | | | | PiperOrigin-RevId: 589842893 Change-Id: I9657761d1f71c665582406f278c6605f6d382f6d
* Roll-forward: Honor ABSL_MIN_LOG_LEVEL in CHECK_XX, CHECK_STRXX, CHECK_OK, ↵Gravatar Andy Getzendanner2023-12-05
| | | | | | | | | | | and the QCHECK flavors of these. In particular, if ABSL_MIN_LOG_LEVEL exceeds kFatal, these should, upon failure, terminate the program without logging anything. The lack of logging should be visible to the optimizer so that it can strip string literals and stringified variable names from the object file. Making some edge cases work under Clang required rewriting NormalizeLogSeverity to help make constraints on its return value more obvious to the optimizer. PiperOrigin-RevId: 588181755 Change-Id: I95db3bae39f8dadb52a307ca3b80775db23de766
* Use absl::NoDestructor to replace a bespoke optimized implementationGravatar Derek Mauro2023-11-08
| | | | | PiperOrigin-RevId: 580596792 Change-Id: I2f79c9b719e7e95a181b6641e8da191cf0a4d71a
* Bazel: Enable the header_modules featureGravatar Derek Mauro2023-10-11
| | | | | PiperOrigin-RevId: 572575394 Change-Id: Ic1c5ac2423b1634e50c43bad6daa14e82a8f3e2c
* Bazel: Support layering_check and parse_headersGravatar Derek Mauro2023-10-10
| | | | | | | | | | | | | The layering_check feature ensures that rules that include a header explicitly depend on a rule that exports that header. Compiler support is required, and currently only Clang 16+ supports diagnoses layering_check failures. The parse_headers feature ensures headers are self-contained by compiling them with -fsyntax-only on supported compilers. PiperOrigin-RevId: 572350144 Change-Id: I37297f761566d686d9dd58d318979d688b7e36d1
* Mark absl::Status as ABSL_ATTRIBUTE_TRIVIAL_ABIGravatar Abseil Team2023-10-05
| | | | | | | This should make it more efficient to pass absl::Status parameters and return values, allowing them to be passed in a register. PiperOrigin-RevId: 571213728 Change-Id: I2a0183aedc08c270d0af0e7a30a07590ea116896
* Adds `AbslStringify` to `absl::Status` for completeness.Gravatar Abseil Team2023-09-26
| | | | | | | This also adds a test for `operator<<`. PiperOrigin-RevId: 568590367 Change-Id: Ia0ad39cb582e7d24e6c4131827818d8c4b10dfd9
* Rolling back cl/565792699Gravatar Abseil Team2023-09-20
| | | | | PiperOrigin-RevId: 567102456 Change-Id: I0750284c36850adbabc5ec0b4a2635aa8a967e53
* Change absl::Status implementation to be amenable to [[clang:trivial_abi]] ↵Gravatar Abseil Team2023-09-17
| | | | | | | | | | | annotation. This moves the implementation of most methods from absl::Status to absl::status_internal::StatusRep, and ensures that no calls to absl::Status methods are in a cc file. Stub implementations checking only inlined rep properties and calling no-op (RepToPointer) or out of line methods exist in status.h PiperOrigin-RevId: 566187430 Change-Id: I356ec29c0970ffe82eac2a5d98850e647fcd5ea5
* Honor ABSL_MIN_LOG_LEVEL in CHECK_XX, CHECK_STRXX, CHECK_OK, and the QCHECK ↵Gravatar Andy Getzendanner2023-09-15
| | | | | | | | | | | flavors of these. In particular, if ABSL_MIN_LOG_LEVEL exceeds kFatal, these should, upon failure, terminate the program without logging anything. The lack of logging should be visible to the optimizer so that it can strip string literals and stringified variable names from the object file. Making some edge cases work under Clang required rewriting NormalizeLogSeverity to help make constraints on its return value more obvious to the optimizer. PiperOrigin-RevId: 565792699 Change-Id: Ibb6a47d4956191bbbd0297e04492cddc354578e2
* Invert the "is inlined" bit of absl::StatusGravatar Abseil Team2023-09-05
| | | | | | | | | | | This change makes RepToPointer/PointerToRep have 0 instructions. This makes IsMovedFrom simpler (although this could always have left out the IsInlined check since that bit can never be set on the aligned pointer) In exchange, it makes CodeToInlinedRep slower, but does not inhibit replacing it with a constant. InlinedRepToCode is unaffected. PiperOrigin-RevId: 562826801 Change-Id: I2732f04ab293b773edc2efdec546b3a287b980c2
* Include what you spellGravatar Dmitri Gribenko2023-08-09
| | | | | PiperOrigin-RevId: 555205956 Change-Id: I935b95c29a8d5b69fe45cc0fe1aadb7106d31df3
* Merge pull request #1458 from juergbi:aixGravatar Copybara-Service2023-06-07
|\ | | | | | | | | PiperOrigin-RevId: 538488164 Change-Id: I680dcbc2f27dca3beba416b3cd0a55943751cf4c
* | `absl`: Replace `absl::remove_cv_t<absl::remove_reference_t<T>>` with ↵Gravatar Dino Radakovic2023-06-02
| | | | | | | | | | | | | | `absl::remove_cvref_t<T>` PiperOrigin-RevId: 537372070 Change-Id: I46ff6e42856aea2cd8da6ff7105cf58613603dd4
| * absl/status: Fix build on AIXGravatar Jürg Billeter2023-05-24
|/ | | | | | | | | | | `_LINUX_SOURCE_COMPAT` needs to be defined to fix absl/status/status.cc:494:5: error: duplicate case value 494 | case ENOTEMPTY: // Directory not empty | ^~~~ absl/status/status.cc:480:5: note: previously used here 480 | case EEXIST: // File exists | ^~~~
* Add non-public API for internal usersGravatar Eric Fiselier2023-05-16
| | | | | PiperOrigin-RevId: 532553508 Change-Id: I813841ff3e5085b64c9b02ca41897bf7f6a8570e
* Add semicolon at the end of the line on code exampleGravatar Abseil Team2023-05-08
| | | | | PiperOrigin-RevId: 530445615 Change-Id: I0c112773e7f42989840cb8b915167ade8833ef73
* Make `absl::StatusOr::AssignStatus` public. Recommend against using it ↵Gravatar Dino Radakovic2023-05-05
| | | | | | | outside of generic programming (attempt #2 after internal fix) PiperOrigin-RevId: 529796927 Change-Id: I755b7d907f96f4a05d01620503bf0862ce35e847
* Breaks internal codeGravatar Abseil Team2023-05-04
| | | | | PiperOrigin-RevId: 529514670 Change-Id: Ia9a19da52f58c91d5131c2a17308a7a322db2714
* Make `absl::StatusOr::AssignStatus` public. Recommend against using it ↵Gravatar Dino Radakovic2023-05-04
| | | | | | | outside of generic programming PiperOrigin-RevId: 529484669 Change-Id: I9889a9f7a7fa7dc6ef8c731f1b583a74e6afd2cf
* Fix spelling mistakesGravatar Vertexwahn2023-04-27
|
* trivial: format some files using clang-formatGravatar Patrick Xia2023-04-27
| | | | | PiperOrigin-RevId: 527598377 Change-Id: I0ae1505db595b7f3a420f2f608c6e02f8800f138
* Add ABSL_ATTRIBUTE_LIFETIME_BOUND to absl::StatusOr::emplace()Gravatar Laramie Leavitt2023-02-03
| | | | | PiperOrigin-RevId: 506944023 Change-Id: I04ff13dcec89c57ba03707f5698c4198434216b6
* Minor build/whitespace changesGravatar Derek Mauro2023-01-03
| | | | | PiperOrigin-RevId: 499292396 Change-Id: I3c66754169d7d7e304d5b973c0872690b79f59c5
* Minor include/whitespace changesGravatar Derek Mauro2022-12-28
| | | | | PiperOrigin-RevId: 498192454 Change-Id: Ib6d251b9154322ae873477b44cf7265a74ce11f4
* Fix "unsafe narrowing" warnings in absl, 10/n.Gravatar Abseil Team2022-09-08
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on tests.) Bug: chromium:1292951 PiperOrigin-RevId: 473055916 Change-Id: I40cdd6c87ba9d0a5fb2db5746cff04f14ee829c2
* remove unused includes and add missing std includes for absl/status/status.hGravatar Abseil Team2022-08-10
| | | | | PiperOrigin-RevId: 466659369 Change-Id: I2bd671ef187604f12371e12a5017cac23fdad35b
* Fix "unsafe narrowing" warnings in absl, 3/n.Gravatar Abseil Team2022-08-04
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on .cc files in dirs n-t, except string.) Bug: chromium:1292951 PiperOrigin-RevId: 465287204 Change-Id: I0fe98ff78bf3c08d86992019eb626755f8b6803e
* Add missing include for std::unique_ptrGravatar Abseil Team2022-07-22
| | | | | PiperOrigin-RevId: 462681925 Change-Id: Ic5610cb4124b7f60a00817ca2f1d52674b27c168
* Tweak the signature of status_internal::MakeCheckFailString as part of an ↵Gravatar Andy Getzendanner2022-06-10
| | | | | | | upcoming change PiperOrigin-RevId: 454251164 Change-Id: I256b7a662478f9317a4133ec209fa5488a942886
* Fix C++17 constexpr storage deprecation warningsGravatar Derek Mauro2022-06-09
| | | | | | | | | | | | | | | | | | | This change introduces the symbol ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL to guard redundant declarations of static constexpr data members that are needed prior to C++17. This change also introduces the symbol ABSL_INTERNAL_CPLUSPLUS_LANG, which is supposed to be set to the same value as __cplusplus, except it uses _MSVC_LANG on MSVC so that the value is correct on MSVC. Neither of these new symbols should be used outside of Abseil. Fixes #1191 PiperOrigin-RevId: 453923908 Change-Id: I1316c52c19fa0c168b93cced0c817e4cb7c9c862
* Obey ABSL_DEFAULT_LINKOPTS for all cc_library targetsGravatar Jeremy Nimmer2022-06-06
| | | | | | | A few targets were missing `linkopts = ...` and so were not obeying the project-wide default settings. Omit any changes to cctz for now, because it's vendored from another project.
* Fix comment typo about absl::Status<T*>Gravatar Derek Mauro2022-06-06
| | | | | PiperOrigin-RevId: 453241556 Change-Id: Ia92d737b6a678e3a4eda965056503392af44486a
* Add an internal helper for logging (upcoming).Gravatar Greg Falcon2022-05-31
| | | | | PiperOrigin-RevId: 452134803 Change-Id: I8660df850ab537c441399545b25eb32399b2a3ef
* Fix a typo in a comment.Gravatar Abseil Team2022-04-29
| | | | | PiperOrigin-RevId: 445394311 Change-Id: I265b6a83f79bbed4321e24e6da4730a2c43ddb07
* Export of internal Abseil changesGravatar Abseil Team2022-04-19
| | | | | | | | | | | -- 6457ad659de86ce4cae1e9f7cb03a701c6c2851e by Abseil Team <absl-team@google.com>: Introduced ErrnoToStatusCode and ErrnoToStatus to abseil. PiperOrigin-RevId: 442903450 Change-Id: I9c062b34a3811216f43eef56e631eada3b4e3e84 GitOrigin-RevId: 6457ad659de86ce4cae1e9f7cb03a701c6c2851e
* Export of internal Abseil changesGravatar Abseil Team2022-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- d3b99682554d339c42556680f4d65f83226005e2 by Martijn Vels <mvels@google.com>: Inline CycleClock code and remove branch for x86 CycleClockSource function This CL removes the relaxed load for x86 as there is no acquire price to pay on x86. It inlines the UnscaledCycleClock::Now() which is a single RTDSC op for x86, and likewise inlines CycleClock::Now() for x86. The inlining should mostly have secondary benefits such as reducing spills on outlined calls. LTO may eventually hoist these functions inline for the hotspots, but it doesn't hurt to default inline this for all builds and let the compiler decide on the first pass. The perlab benchmark is noisy for the plain BM_Now, but the other benchmarks and the run on my local machine are clear. ------------- Local Benchy Benchmark name old cpu/op new cpu/op delta BM_Now 3.41ns ± 1% 2.30ns ± 2% -32.52% (p=0.000 n=50+50) BM_NowWithRegisterPresure 4.96ns ± 2% 4.19ns ± 2% -15.57% (p=0.000 n=56+55) BM_NowWithCallback 3.30ns ± 2% 1.91ns ± 2% -42.00% (p=0.000 n=47+60) ------------- Perflab Benchy Benchmark name old cpu/op new cpu/op delta BM_Now 8.20ns ±13% 4.32ns ±83% ~ (p=0.413 n=4+5) BM_NowWithRegisterPresure 7.91ns ± 1% 3.68ns ± 2% -53.45% (p=0.029 n=4+4) BM_NowWithCallback 2.66ns ±13% 1.58ns ± 0% -40.51% (p=0.008 n=5+5) PiperOrigin-RevId: 434474766 Change-Id: I991d987ae9233e50f09606c874055cf4c5a56300 -- b38330686a0af176a2679163e4d2fa1b90e2f667 by Laramie Leavitt <lar@google.com>: Style, comment, and test updates * Remove a redundant assert in uniform_real_distribution. * Update comment in internal/generate_real.h * Style updates to uniform_real_distribution_test mainly replacing TypeParam with real_type, using aliases for some limits, etc. * Add a few more minor tests. PiperOrigin-RevId: 433902174 Change-Id: Id75be8e24be2fb8f6aea05feec13e3ef320a7254 -- ab2da6047ff7f5dae3add3779fcddf73b03feabf by Abseil Team <absl-team@google.com>: Remove declaration of method whose definition was previously removed. PiperOrigin-RevId: 433507828 Change-Id: I0130b689813125250f7de2664e767e181f676c89 -- df0c87f4ec2c010691931c1bef9d26470a6e63a2 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 433289136 Change-Id: Iba157dc83ed99dafd17a2223d2504e49f8afbb9e -- 7445fa312f2995772900eda82467325b3401a17d by Martijn Vels <mvels@google.com>: Optimize CordReader logic now that CONCAT is removed This CL cleans up various helper functions and logic remaining from previous complex CONCAT logic that is no longer needed, simplifying the CordReader logic. PiperOrigin-RevId: 433208748 Change-Id: I5f7b1883573c44e7c6f8af12c3cddbd197cb134d GitOrigin-RevId: d3b99682554d339c42556680f4d65f83226005e2
* Export of internal Abseil changesGravatar Abseil Team2022-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 91d76b3ac9edff91f206d9eee60423c39eeeaf93 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 430442277 -- 9f8a87bcc5cc5b0fd8b7f0318f37d152fd8bea06 by Evan Brown <ezb@google.com>: Small refactoring to work towards allowing for node_btree_* containers. - Change common_params::transfer to rely on slot_policy transfer instead of manually doing construct/destruct. Transfer is not construct/destruct for node containers. - Move maps' value_compare into btree.h from btree_map.h so it can be reused for node_btree_map.h. - Also add a test for maps' value_compare protected members. PiperOrigin-RevId: 430245542 -- 0126e0b6295342317d9c9f0a66e2d7009b858426 by Martijn Vels <mvels@google.com>: Add CordRepSubString::Create function with hard checks on IsFlat() | IsExternal() This hardens internal invariants, IsFlat() || IsExternal() is a cheap, single predicted branch, and removes boilerplate code from cord.cc PiperOrigin-RevId: 429676041 -- ed98a92af49d9e238d9f1d1b69fb4eddcd1ccbc7 by Abseil Team <absl-team@google.com>: tweaks to status.h documentation to reflect general-purpose communication PiperOrigin-RevId: 429584104 GitOrigin-RevId: 91d76b3ac9edff91f206d9eee60423c39eeeaf93 Change-Id: I54d6d116a564f86a842b983ca76559bf9b388f72
* Export of internal Abseil changesGravatar Abseil Team2022-01-28
| | | | | | | | | | | | | | | | | | | -- ef2bdebfdff0a93d3af6248d709d42a47fe2e7b4 by Derek Mauro <dmauro@google.com>: Compile with -DGTEST_REMOVE_LEGACY_TEST_CASEAPI_ in Bazel CI builds to prevent uses of the legacy TestCase API from sneaking in PiperOrigin-RevId: 424882792 -- 4cf19d7b4dd855685deb0d4d3170e4db9f6f789b by Abseil Team <absl-team@google.com>: Fix typo in comment. PiperOrigin-RevId: 424745867 GitOrigin-RevId: ef2bdebfdff0a93d3af6248d709d42a47fe2e7b4 Change-Id: I50ad9b4cf3fa17831aa6521c58d81b0ce8ec0c47