mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Revert "Swift: upgrade clang-formatting to 15.0.7"
This reverts commit 970b3d06be.
This commit is contained in:
@@ -18,19 +18,26 @@ class TrapDomain;
|
||||
namespace detail {
|
||||
template <typename T>
|
||||
concept HasStartAndEndLoc = requires(T e) {
|
||||
e.getStartLoc();
|
||||
e.getEndLoc();
|
||||
};
|
||||
e.getStartLoc();
|
||||
e.getEndLoc();
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
concept HasOneLoc = requires(T e) { e.getLoc(); } && (!HasStartAndEndLoc<T>);
|
||||
concept HasOneLoc = requires(T e) {
|
||||
e.getLoc();
|
||||
}
|
||||
&&(!HasStartAndEndLoc<T>);
|
||||
|
||||
template <typename T>
|
||||
concept HasOneLocField = requires(T e) { e.Loc; };
|
||||
concept HasOneLocField = requires(T e) {
|
||||
e.Loc;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
concept HasSourceRangeOnly = requires(T e) { e.getSourceRange(); } && (!HasStartAndEndLoc<T>) &&
|
||||
(!HasOneLoc<T>);
|
||||
concept HasSourceRangeOnly = requires(T e) {
|
||||
e.getSourceRange();
|
||||
}
|
||||
&&(!HasStartAndEndLoc<T>)&&(!HasOneLoc<T>);
|
||||
|
||||
swift::SourceRange getSourceRange(const HasStartAndEndLoc auto& locatable) {
|
||||
return {locatable.getStartLoc(), locatable.getEndLoc()};
|
||||
@@ -62,7 +69,9 @@ swift::SourceRange getSourceRange(const llvm::MutableArrayRef<Locatable>& locata
|
||||
} // namespace detail
|
||||
|
||||
template <typename E>
|
||||
concept IsLocatable = requires(E e) { detail::getSourceRange(e); };
|
||||
concept IsLocatable = requires(E e) {
|
||||
detail::getSourceRange(e);
|
||||
};
|
||||
|
||||
class SwiftLocationExtractor {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user