[PATCH] D131727: Enable -Wctad-maybe-unsupported in LLVM build
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 15 16:37:23 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc63f2581f4f8: Enable -Wctad-maybe-unsupported in LLVM build (authored by dblaikie).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131727/new/
https://reviews.llvm.org/D131727
Files:
libcxx/CMakeLists.txt
llvm/cmake/modules/HandleLLVMOptions.cmake
llvm/include/llvm/CodeGen/RDFGraph.h
Index: llvm/include/llvm/CodeGen/RDFGraph.h
===================================================================
--- llvm/include/llvm/CodeGen/RDFGraph.h
+++ llvm/include/llvm/CodeGen/RDFGraph.h
@@ -934,6 +934,8 @@
const DataFlowGraph &G;
};
+ template <typename T> Print(const T &, const DataFlowGraph &) -> Print<T>;
+
template <typename T>
struct PrintNode : Print<NodeAddr<T>> {
PrintNode(const NodeAddr<T> &x, const DataFlowGraph &g)
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ 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)
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -592,6 +592,7 @@
-Wno-user-defined-literals
-Wno-covered-switch-default
-Wno-suggest-override
+ -Wno-ctad-maybe-unsupported
)
if (LIBCXX_TARGETING_CLANG_CL)
target_add_compile_flags_if_supported(${target} PRIVATE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131727.452845.patch
Type: text/x-patch
Size: 1543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220815/15663650/attachment.bin>
More information about the llvm-commits
mailing list