diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h --- a/libcxx/include/__format/format_context.h +++ b/libcxx/include/__format/format_context.h @@ -144,6 +144,14 @@ #endif }; +template +basic_format_context(_OutIt, + basic_format_args>, + optional<_VSTD::locale>&& __loc = nullopt) -> basic_format_context<_OutIt, _CharT>; +template +basic_format_context(_OutIt, basic_format_args>) + -> basic_format_context<_OutIt, _CharT>; + #endif //_LIBCPP_STD_VER > 17 _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__format/format_parse_context.h b/libcxx/include/__format/format_parse_context.h --- a/libcxx/include/__format/format_parse_context.h +++ b/libcxx/include/__format/format_parse_context.h @@ -89,6 +89,9 @@ size_t __num_args_; }; +template +basic_format_parse_context(basic_string_view<_CharT>, size_t) -> basic_format_parse_context<_CharT>; + using format_parse_context = basic_format_parse_context; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS using wformat_parse_context = basic_format_parse_context; diff --git a/libcxx/include/__format/format_string.h b/libcxx/include/__format/format_string.h --- a/libcxx/include/__format/format_string.h +++ b/libcxx/include/__format/format_string.h @@ -32,6 +32,9 @@ uint32_t __value; }; +template +__parse_number_result(const __parse_number_result<_CharT>&) -> __parse_number_result<_CharT>; + template _LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_CharT> __parse_number(const _CharT* __begin, const _CharT* __end); diff --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h --- a/libcxx/include/__format/parser_std_format_spec.h +++ b/libcxx/include/__format/parser_std_format_spec.h @@ -699,6 +699,9 @@ const _CharT* __last_; }; +template +__column_width_result(__column_width_result<_CharT> const&) -> __column_width_result<_CharT>; + /// Since a column width can be two it's possible that the requested column /// width can't be achieved. Depending on the intended usage the policy can be /// selected. diff --git a/libcxx/include/__functional/operations.h b/libcxx/include/__functional/operations.h --- a/libcxx/include/__functional/operations.h +++ b/libcxx/include/__functional/operations.h @@ -372,6 +372,8 @@ {return __x < __y;} }; +less()->less; + #if _LIBCPP_STD_VER > 11 template <> struct _LIBCPP_TEMPLATE_VIS less diff --git a/libcxx/include/__iterator/back_insert_iterator.h b/libcxx/include/__iterator/back_insert_iterator.h --- a/libcxx/include/__iterator/back_insert_iterator.h +++ b/libcxx/include/__iterator/back_insert_iterator.h @@ -59,6 +59,9 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Container* __get_container() const { return container; } }; +template +back_insert_iterator(_Container&) -> back_insert_iterator<_Container>; + template inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator<_Container> diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp --- a/libcxx/src/filesystem/operations.cpp +++ b/libcxx/src/filesystem/operations.cpp @@ -1409,6 +1409,9 @@ Cleanup cleanup_; }; +template +scope_exit(Cleanup const&) -> scope_exit; + uintmax_t remove_all_impl(int parent_directory, const path& p, error_code& ec) { // First, try to open the path as a directory. const int options = O_CLOEXEC | O_RDONLY | O_DIRECTORY | O_NOFOLLOW; diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -794,6 +794,9 @@ # Prevent bugs that can happen with llvm's brace style. add_flag_if_supported("-Wmisleading-indentation" MISLEADING_INDENTATION_FLAG) + + # Enable -Wctad-maybe-unsupported to catch unintended use of CTAD. + add_flag_if_supported("-Wctad-maybe-unsupported" CTAD_MAYBE_UNSPPORTED_FLAG) endif (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL)) if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT LLVM_ENABLE_WARNINGS) diff --git a/llvm/include/llvm/CodeGen/RDFGraph.h b/llvm/include/llvm/CodeGen/RDFGraph.h --- a/llvm/include/llvm/CodeGen/RDFGraph.h +++ b/llvm/include/llvm/CodeGen/RDFGraph.h @@ -934,6 +934,8 @@ const DataFlowGraph &G; }; + template Print(const T &, const DataFlowGraph &) -> Print; + template struct PrintNode : Print> { PrintNode(const NodeAddr &x, const DataFlowGraph &g)