aboutsummaryrefslogtreecommitdiff
path: root/openmp/cmake
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2019-08-15 13:26:55 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2019-08-15 13:26:55 +0000
commitd2ae0c4f443c47e68d33852d2953811648a153ed (patch)
tree2946a6cbb1212e7956507b6dd4425d80af8e9e77 /openmp/cmake
parent4d77e50e6ede51cee37f42f706d8f48b2f6f8acb (diff)
downloadllvm-d2ae0c4f443c47e68d33852d2953811648a153ed.zip
llvm-d2ae0c4f443c47e68d33852d2953811648a153ed.tar.gz
llvm-d2ae0c4f443c47e68d33852d2953811648a153ed.tar.bz2
[OpenMP] Enable warning about "implicit fallthrough"
Fix last warned location in ittnotify_static.cpp using the defined macro KMP_FALLTHROUGH(). Differential Revision: https://reviews.llvm.org/D65871 llvm-svn: 369003
Diffstat (limited to 'openmp/cmake')
-rw-r--r--openmp/cmake/HandleOpenMPOptions.cmake1
-rw-r--r--openmp/cmake/config-ix.cmake1
2 files changed, 2 insertions, 0 deletions
diff --git a/openmp/cmake/HandleOpenMPOptions.cmake b/openmp/cmake/HandleOpenMPOptions.cmake
index 3ed046c..eb7b286 100644
--- a/openmp/cmake/HandleOpenMPOptions.cmake
+++ b/openmp/cmake/HandleOpenMPOptions.cmake
@@ -21,6 +21,7 @@ endif()
# Additional warnings that are not enabled by -Wall.
append_if(OPENMP_HAVE_WCAST_QUAL_FLAG "-Wcast-qual" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(OPENMP_HAVE_WFORMAT_PEDANTIC_FLAG "-Wformat-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+append_if(OPENMP_HAVE_WIMPLICIT_FALLTHROUGH_FLAG "-Wimplicit-fallthrough" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(OPENMP_HAVE_WSIGN_COMPARE_FLAG "-Wsign-compare" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
# Warnings that we want to disable because they are too verbose or fragile.
diff --git a/openmp/cmake/config-ix.cmake b/openmp/cmake/config-ix.cmake
index 8858bc6..ebb2530 100644
--- a/openmp/cmake/config-ix.cmake
+++ b/openmp/cmake/config-ix.cmake
@@ -6,6 +6,7 @@ check_cxx_compiler_flag(-Werror OPENMP_HAVE_WERROR_FLAG)
# Additional warnings that are not enabled by -Wall.
check_cxx_compiler_flag(-Wcast-qual OPENMP_HAVE_WCAST_QUAL_FLAG)
check_cxx_compiler_flag(-Wformat-pedantic OPENMP_HAVE_WFORMAT_PEDANTIC_FLAG)
+check_cxx_compiler_flag(-Wimplicit-fallthrough OPENMP_HAVE_WIMPLICIT_FALLTHROUGH_FLAG)
check_cxx_compiler_flag(-Wsign-compare OPENMP_HAVE_WSIGN_COMPARE_FLAG)
# Warnings that we want to disable because they are too verbose or fragile.