-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fscale-neon
- Loading branch information
Showing
631 changed files
with
49,905 additions
and
17,404 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
38 changes: 38 additions & 0 deletions
38
...ng-tidy/checkers/bugprone/Inputs/unchecked-optional-access/bde/types/bdlb_nullablevalue.h
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#ifndef LLVM_CLANG_TOOLS_EXTRA_TEST_CLANG_TIDY_CHECKERS_INPUTS_BDE_TYPES_NULLABLEVALUE_H_ | ||
#define LLVM_CLANG_TOOLS_EXTRA_TEST_CLANG_TIDY_CHECKERS_INPUTS_BDE_TYPES_NULLABLEVALUE_H_ | ||
|
||
#include "bsl_optional.h" | ||
|
||
/// Mock of `bdlb::NullableValue`. | ||
namespace BloombergLP::bdlb { | ||
|
||
template <typename T> | ||
class NullableValue : public bsl::optional<T> { | ||
public: | ||
constexpr NullableValue() noexcept; | ||
|
||
constexpr NullableValue(bsl::nullopt_t) noexcept; | ||
|
||
NullableValue(const NullableValue &) = default; | ||
|
||
NullableValue(NullableValue &&) = default; | ||
|
||
const T &value() const &; | ||
T &value() &; | ||
|
||
// 'operator bool' is inherited from bsl::optional | ||
|
||
constexpr bool isNull() const noexcept; | ||
|
||
template <typename U> | ||
constexpr T valueOr(U &&v) const &; | ||
|
||
// 'reset' is inherited from bsl::optional | ||
|
||
template <typename U> NullableValue &operator=(const U &u); | ||
}; | ||
|
||
|
||
} // namespace BloombergLP::bdlb | ||
|
||
#endif // LLVM_CLANG_TOOLS_EXTRA_TEST_CLANG_TIDY_CHECKERS_INPUTS_BDE_TYPES_NULLABLEVALUE_H_ |
75 changes: 75 additions & 0 deletions
75
...st/clang-tidy/checkers/bugprone/Inputs/unchecked-optional-access/bde/types/bsl_optional.h
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#ifndef LLVM_CLANG_TOOLS_EXTRA_TEST_CLANG_TIDY_CHECKERS_INPUTS_BDE_TYPES_OPTIONAL_H_ | ||
#define LLVM_CLANG_TOOLS_EXTRA_TEST_CLANG_TIDY_CHECKERS_INPUTS_BDE_TYPES_OPTIONAL_H_ | ||
|
||
/// Mock of `bsl::optional`. | ||
namespace bsl { | ||
|
||
// clang-format off | ||
template <typename T> struct remove_reference { using type = T; }; | ||
template <typename T> struct remove_reference<T&> { using type = T; }; | ||
template <typename T> struct remove_reference<T&&> { using type = T; }; | ||
// clang-format on | ||
|
||
template <typename T> | ||
using remove_reference_t = typename remove_reference<T>::type; | ||
|
||
template <typename T> | ||
constexpr T &&forward(remove_reference_t<T> &t) noexcept; | ||
|
||
template <typename T> | ||
constexpr T &&forward(remove_reference_t<T> &&t) noexcept; | ||
|
||
template <typename T> | ||
constexpr remove_reference_t<T> &&move(T &&x); | ||
|
||
struct nullopt_t { | ||
constexpr explicit nullopt_t() {} | ||
}; | ||
|
||
constexpr nullopt_t nullopt; | ||
|
||
template <typename T> | ||
class optional { | ||
public: | ||
constexpr optional() noexcept; | ||
|
||
constexpr optional(nullopt_t) noexcept; | ||
|
||
optional(const optional &) = default; | ||
|
||
optional(optional &&) = default; | ||
|
||
const T &operator*() const &; | ||
T &operator*() &; | ||
const T &&operator*() const &&; | ||
T &&operator*() &&; | ||
|
||
const T *operator->() const; | ||
T *operator->(); | ||
|
||
const T &value() const &; | ||
T &value() &; | ||
const T &&value() const &&; | ||
T &&value() &&; | ||
|
||
constexpr explicit operator bool() const noexcept; | ||
constexpr bool has_value() const noexcept; | ||
|
||
template <typename U> | ||
constexpr T value_or(U &&v) const &; | ||
template <typename U> | ||
T value_or(U &&v) &&; | ||
|
||
template <typename... Args> | ||
T &emplace(Args &&...args); | ||
|
||
void reset() noexcept; | ||
|
||
void swap(optional &rhs) noexcept; | ||
|
||
template <typename U> optional &operator=(const U &u); | ||
}; | ||
|
||
} // namespace bsl | ||
|
||
#endif // LLVM_CLANG_TOOLS_EXTRA_TEST_CLANG_TIDY_CHECKERS_INPUTS_BDE_TYPES_OPTIONAL_H_ |
Oops, something went wrong.