Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions absl/base/exception_safety_testing_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
#include <exception>
#include <iostream>
#include <list>
#include <memory>
#include <sstream>
#include <type_traits>
#include <utility>
#include <vector>

#include "gtest/gtest-spi.h"
Expand Down
2 changes: 2 additions & 0 deletions absl/base/internal/exception_safety_testing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#ifdef ABSL_HAVE_EXCEPTIONS

#include <string>

#include "gtest/gtest.h"
#include "absl/meta/type_traits.h"

Expand Down
15 changes: 11 additions & 4 deletions absl/base/internal/exception_safety_testing.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,19 @@

#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <functional>
#include <initializer_list>
#include <iosfwd>
#include <limits>
#include <memory>
#include <new>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>

#include "gtest/gtest.h"
#include "absl/base/internal/pretty_function.h"
Expand Down Expand Up @@ -1029,10 +1036,10 @@ class ExceptionSafetyTestBuilder {
ExceptionSafetyTestBuilder<Factory, Operation, Contracts...,
std::decay_t<MoreContracts>...>
WithContracts(const MoreContracts&... more_contracts) const {
return {
factory_, operation_,
std::tuple_cat(contracts_, std::tuple<std::decay_t<MoreContracts>...>(
more_contracts...))};
return {factory_, operation_,
std::tuple_cat(
contracts_,
std::tuple<std::decay_t<MoreContracts>...>(more_contracts...))};
}

/*
Expand Down
1 change: 1 addition & 0 deletions absl/container/linked_hash_map_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <cstdint>
#include <functional>
#include <memory>
#include <stdexcept>
#include <string>
#include <tuple>
#include <type_traits>
Expand Down
5 changes: 3 additions & 2 deletions absl/flags/internal/flag.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <string>
#include <type_traits>
#include <typeinfo>
#include <utility>

#include "absl/base/attributes.h"
#include "absl/base/call_once.h"
Expand Down Expand Up @@ -605,8 +606,8 @@ class FlagImpl final : public CommandLineFlag {
}
template <typename T,
std::enable_if_t<flags_internal::StorageKind<T>() ==
FlagValueStorageKind::kOneWordAtomic,
int> = 0>
FlagValueStorageKind::kOneWordAtomic,
int> = 0>
void Read(T* value) const ABSL_LOCKS_EXCLUDED(DataGuard()) {
int64_t v = ReadOneWord();
std::memcpy(value, static_cast<const void*>(&v), sizeof(T));
Expand Down
5 changes: 2 additions & 3 deletions absl/functional/bind_front_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <functional>
#include <memory>
#include <string>
#include <utility>

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down Expand Up @@ -165,9 +166,7 @@ TEST(BindTest, StoreByPointer) {
EXPECT_EQ(&s.value, &g());
}

int Sink(std::unique_ptr<int> p) {
return *p;
}
int Sink(std::unique_ptr<int> p) { return *p; }

std::unique_ptr<int> Factory(int n) { return std::make_unique<int>(n); }

Expand Down
1 change: 1 addition & 0 deletions absl/status/statusor_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <memory>
#include <ostream>
#include <sstream>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions absl/strings/string_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#ifndef ABSL_STRINGS_STRING_VIEW_H_
#define ABSL_STRINGS_STRING_VIEW_H_

#include <algorithm>
#include <string_view>

#include "absl/base/attributes.h"
Expand Down
7 changes: 4 additions & 3 deletions absl/types/any_span_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <iterator>
#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <type_traits>
Expand Down Expand Up @@ -1056,9 +1057,9 @@ TEST(MutableAnySpanTest, NonTruncatingSubspan) {
EXPECT_DEATH(span.subspan(5, 1), "");
EXPECT_DEATH(span.subspan(AnySpan<int>::npos, 0), "");
EXPECT_DEATH(span.subspan(AnySpan<int>::npos, 1), "");
EXPECT_DEATH(span.subspan(0, 5), "");
EXPECT_DEATH(span.first(5), "");
EXPECT_DEATH(span.first(AnySpan<int>::npos), "");
EXPECT_DEATH(span.subspan(0, 5), "");
EXPECT_DEATH(span.first(5), "");
EXPECT_DEATH(span.first(AnySpan<int>::npos), "");
}
#endif
}
Expand Down
2 changes: 2 additions & 0 deletions absl/types/compare_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#include "absl/types/compare.h"

#include <algorithm>

#include "gtest/gtest.h"
#include "absl/base/casts.h"

Expand Down
1 change: 1 addition & 0 deletions absl/types/span_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "absl/types/span.h"

#include <algorithm>
#include <array>
#include <initializer_list>
#include <numeric>
Expand Down