summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/CompilerFlags.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/CompilerFlags.cmake b/cmake/CompilerFlags.cmake
index 2019b554b..afd0760f6 100644
--- a/cmake/CompilerFlags.cmake
+++ b/cmake/CompilerFlags.cmake
@@ -112,10 +112,13 @@ function(set_default_compile_options target)
-Wno-invalid-offsetof
-Wno-newline-eof
-Wno-return-std-move
- # Enabled warnings:
+ # Allowed warnings:
# If a function returns an address/reference to a local, we want it to
# produce an error, because it probably means something very bad.
-Werror=return-local-addr
+ # Allow unused variables with a pattern of `if (auto v = as<...>(...))`.
+ # This pattern is very common in Slang code base.
+ -Wno-error=unused-but-set-variable
# Some warnings which are on by default in MSVC
-Wnarrowing
)