Fix some missing includes for std::-symbols - #2150
Closed
hzeller wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Not a Googler anymore, so external contribution... |
derekmauro
requested changes
Sep 1, 2026
derekmauro
left a comment
Member
There was a problem hiding this comment.
Two issues here:
- Changes to code under CCTZ need to be sent to https://www.github.com/google/cctz
- Please avoid alphabetizing the gtest includes. Internally they are in a different order, which will cause merge problems.
hzeller
force-pushed
the
feature-20260901-fix-headers
branch
from
September 1, 2026 19:12
cc28507 to
55362fa
Compare
Contributor
Author
|
Alright, excluded the cctz changes, and moved the gtest headers back. The gtest headers I had to format manually as they are automatically moved around with I think it should even be doable with copybara to have a different |
Found with `clang-tidy`'s `misc-include-cleaner` checker. Post-processed with clang-format, which then also picked up some other smaller things. Also, gtest is now sorted in the order by the names the gtest headers are accessed. Breakdown: ``` absl/base/internal/exception_safety_testing.h: #include <cstdlib> for std::abort absl/base/internal/exception_safety_testing.h: #include <new> for std::bad_alloc absl/base/internal/exception_safety_testing.h: #include <type_traits> for std::bool_constant absl/types/span_test.cc: #include <algorithm> for std::equal absl/base/internal/exception_safety_testing.h: #include <utility> for std::index_sequence absl/flags/internal/flag.h: #include <utility> for std::index_sequence absl/base/exception_safety_testing_test.cc: #include <sstream> for std::istringstream absl/types/compare_test.cc: #include <algorithm> for std::less absl/base/internal/exception_safety_testing.h: #include <memory> for std::make_shared absl/base/exception_safety_testing_test.cc: #include <memory> for std::make_unique absl/strings/string_view.h: #include <algorithm> for std::min absl/base/exception_safety_testing_test.cc: #include <utility> for std::move absl/functional/bind_front_test.cc: #include <utility> for std::move absl/base/internal/exception_safety_testing.h: #include <limits> for std::numeric_limits absl/container/linked_hash_map_test.cc: #include <stdexcept> for std::out_of_range absl/types/any_span_test.cc: #include <stdexcept> for std::out_of_range absl/status/statusor_test.cc: #include <stdexcept> for std::runtime_error absl/base/internal/exception_safety_testing.cc: #include <string> for std::string absl/base/internal/exception_safety_testing.h: #include <vector> for std::vector ```
hzeller
force-pushed
the
feature-20260901-fix-headers
branch
from
September 1, 2026 19:24
55362fa to
2af990d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found with
clang-tidy'smisc-include-cleanerchecker.Post-processed with clang-format, which then also picked up some other smaller things. Also, gtest is now sorted in the order by the names the gtest headers are accessed.
Breakdown:
Thank you for your contribution to Abseil!
Before submitting this PR, please be sure to read our contributing
guidelines.
If you are a Googler, please also note that it is required that you send us a
Piper CL instead of using the GitHub pull-request process. The code propagation
process will deliver the change to GitHub.