Skip to content

Commit 79f0e73

Browse files
author
git apple-llvm automerger
committed
Merge commit '268f0d4ebe47' from llvm.org/main into next
2 parents b01974e + 268f0d4 commit 79f0e73

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

clang/include/clang/ASTMatchers/ASTMatchersInternal.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -871,14 +871,11 @@ IteratorT matchesFirstInPointerRange(const MatcherT &Matcher, IteratorT Start,
871871
return End;
872872
}
873873

874-
template <typename T, std::enable_if_t<!std::is_base_of<FunctionDecl, T>::value>
875-
* = nullptr>
876-
inline bool isDefaultedHelper(const T *) {
874+
template <typename T> inline bool isDefaultedHelper(const T *FD) {
875+
if constexpr (std::is_base_of_v<FunctionDecl, T>)
876+
return FD->isDefaulted();
877877
return false;
878878
}
879-
inline bool isDefaultedHelper(const FunctionDecl *FD) {
880-
return FD->isDefaulted();
881-
}
882879

883880
// Metafunction to determine if type T has a member called getDecl.
884881
template <typename T>

0 commit comments

Comments
 (0)