diff --git a/clang/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h b/clang/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h index e6ebaea5248ad1..33194c401ea143 100644 --- a/clang/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h +++ b/clang/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h @@ -94,9 +94,9 @@ void visitRefactoringOptions( /// A type trait that returns true when the given type list has at least one /// type whose base is the given base type. template -struct HasBaseOf : std::conditional::value || - HasBaseOf::value, - std::true_type, std::false_type>::type {}; +struct HasBaseOf : std::conditional_t::value || + HasBaseOf::value, + std::true_type, std::false_type> {}; template struct HasBaseOf : std::is_base_of {}; @@ -104,9 +104,9 @@ struct HasBaseOf : std::is_base_of {}; /// A type trait that returns true when the given type list contains types that /// derive from Base. template -struct AreBaseOf : std::conditional::value && - AreBaseOf::value, - std::true_type, std::false_type>::type {}; +struct AreBaseOf : std::conditional_t::value && + AreBaseOf::value, + std::true_type, std::false_type> {}; template struct AreBaseOf : std::is_base_of {}; diff --git a/llvm/include/llvm/ADT/Bitfields.h b/llvm/include/llvm/ADT/Bitfields.h index 18555e676e9d39..aaf876d896d4c7 100644 --- a/llvm/include/llvm/ADT/Bitfields.h +++ b/llvm/include/llvm/ADT/Bitfields.h @@ -203,7 +203,7 @@ template struct ResolveUnderlyingType { template <> struct ResolveUnderlyingType { /// In case sizeof(bool) != 1, replace `void` by an additionnal /// std::conditional. - using type = std::conditional::type; + using type = std::conditional_t; }; } // namespace bitfields_details diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h index c22a1f8a76e0ee..7adc6710cfa86d 100644 --- a/llvm/include/llvm/ADT/DenseMap.h +++ b/llvm/include/llvm/ADT/DenseMap.h @@ -1197,8 +1197,7 @@ class DenseMapIterator : DebugEpochBase::HandleBase { public: using difference_type = ptrdiff_t; - using value_type = - typename std::conditional::type; + using value_type = std::conditional_t; using pointer = value_type *; using reference = value_type &; using iterator_category = std::forward_iterator_tag; diff --git a/llvm/include/llvm/ADT/FunctionExtras.h b/llvm/include/llvm/ADT/FunctionExtras.h index 35e160fc63ad5e..8f04277cdf0e5b 100644 --- a/llvm/include/llvm/ADT/FunctionExtras.h +++ b/llvm/include/llvm/ADT/FunctionExtras.h @@ -99,11 +99,11 @@ template class UniqueFunctionBase { template struct AdjustedParamTBase { static_assert(!std::is_reference::value, "references should be handled by template specialization"); - using type = typename std::conditional< + using type = std::conditional_t< llvm::is_trivially_copy_constructible::value && llvm::is_trivially_move_constructible::value && IsSizeLessThanThresholdT::value, - T, T &>::type; + T, T &>; }; // This specialization ensures that 'AdjustedParam&>' or diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h index 09429ae599be61..803a376b5bdf7f 100644 --- a/llvm/lib/Transforms/Vectorize/VPlan.h +++ b/llvm/lib/Transforms/Vectorize/VPlan.h @@ -2887,9 +2887,8 @@ class VPBlockUtils { template static auto blocksOnly(const T &Range) { // Create BaseTy with correct const-ness based on BlockTy. - using BaseTy = - typename std::conditional::value, - const VPBlockBase, VPBlockBase>::type; + using BaseTy = std::conditional_t::value, + const VPBlockBase, VPBlockBase>; // We need to first create an iterator range over (const) BlocktTy & instead // of (const) BlockTy * for filter_range to work properly. diff --git a/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp b/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp index e73d5aba9ff518..0f0fd7853138b0 100644 --- a/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp @@ -205,12 +205,10 @@ static void replaceIndexOpsByInductionVariables(LinalgOp linalgOp, template static FailureOr linalgOpToLoopsImpl(PatternRewriter &rewriter, LinalgOp linalgOp) { - using LoadOpTy = - typename std::conditional::value, - AffineLoadOp, memref::LoadOp>::type; - using StoreOpTy = - typename std::conditional::value, - AffineStoreOp, memref::StoreOp>::type; + using LoadOpTy = std::conditional_t::value, + AffineLoadOp, memref::LoadOp>; + using StoreOpTy = std::conditional_t::value, + AffineStoreOp, memref::StoreOp>; // The flattened loopToOperandRangesMaps is expected to be an invertible // permutation map (which is asserted in the inverse calculation).