Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ auto nulloptTypeDecl() {
auto hasNulloptType() { return hasType(nulloptTypeDecl()); }

auto inPlaceClass() {
return recordDecl(hasAnyName("std::in_place_t", "absl::in_place_t",
"base::in_place_t", "folly::in_place_t",
"bsl::in_place_t"));
return namedDecl(hasAnyName("std::in_place_t", "absl::in_place_t",
"base::in_place_t", "folly::in_place_t",
"bsl::in_place_t"));
}

auto isOptionalNulloptConstructor() {
Expand Down
12 changes: 6 additions & 6 deletions clang/unittests/Analysis/FlowSensitive/MockHeaders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ struct is_scalar
template <>
struct is_scalar<nullptr_t> : public true_type {};

struct in_place_t {};

constexpr in_place_t in_place;

} // namespace std

#endif // STD_TYPE_TRAITS_H
Expand Down Expand Up @@ -511,9 +515,8 @@ using remove_reference_t = typename std::remove_reference<T>::type;
template <typename T>
using decay_t = typename std::decay<T>::type;

struct in_place_t {};

constexpr in_place_t in_place;
using std::in_place;
using std::in_place_t;
} // namespace absl

#endif // ABSL_TYPE_TRAITS_H
Expand Down Expand Up @@ -589,9 +592,6 @@ static constexpr char StdOptionalHeader[] = R"(

namespace std {

struct in_place_t {};
constexpr in_place_t in_place;

struct nullopt_t {
constexpr explicit nullopt_t() {}
};
Expand Down