[clang] [ASTMatchers] Simplify isDefaultedHelper (NFC) (PR #137571)
Jakub Kuderski via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 27 21:10:12 PDT 2025
================
@@ -871,14 +871,11 @@ IteratorT matchesFirstInPointerRange(const MatcherT &Matcher, IteratorT Start,
return End;
}
-template <typename T, std::enable_if_t<!std::is_base_of<FunctionDecl, T>::value>
- * = nullptr>
-inline bool isDefaultedHelper(const T *) {
+template <typename T> inline bool isDefaultedHelper(const T *FD) {
+ if constexpr (std::is_base_of<FunctionDecl, T>::value)
----------------
kuhar wrote:
```suggestion
if constexpr (std::is_base_of_v<FunctionDecl, T>)
```
https://github.com/llvm/llvm-project/pull/137571
More information about the cfe-commits
mailing list