about summary refs log tree commit diff
path: root/absl/copts.bzl
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2017-12-12T19·23-0800
committerTitus Winters <titus@google.com>2017-12-12T19·25-0500
commit04edad3801ec0b1091df9157b879d8f6a50c5036 (patch)
tree58bbb0af82117ec59f79481468317a1ff244eaed /absl/copts.bzl
parentdc0282d09809f3337529fd790c57a92d63752451 (diff)
Changes imported from Abseil "staging" branch:
  - 46a4bd582619bfc4799c1a907316e914ed0c0105 Fixes to mutex_nonprod.  Apparently this has never built.... by Greg Falcon <gfalcon@google.com>
  - 4bcf6f013aeee53057527d70100de8535aec9b93 Add some comments to copts.bzl by Tom Manshreck <shreck@google.com>
  - 54cf717b1c5dfb814721f92a8eb9df5587f5f758 Internal change by Abseil Team <absl-team@google.com>
  - d1f1c7e6e61358300963b7bd50c203740a49297d Eliminate kFast{UInt,Int}{32,64}ToBufferSize constants by Jorg Brown <jorg@google.com>

GitOrigin-RevId: 46a4bd582619bfc4799c1a907316e914ed0c0105
Change-Id: I129b6b3d27d9ae2c6eb21d6e44a52d10399ef8aa
Diffstat (limited to 'absl/copts.bzl')
-rw-r--r--absl/copts.bzl14
1 files changed, 13 insertions, 1 deletions
diff --git a/absl/copts.bzl b/absl/copts.bzl
index f687f58ffa24..22f3e54f39e2 100644
--- a/absl/copts.bzl
+++ b/absl/copts.bzl
@@ -29,12 +29,18 @@ GCC_TEST_FLAGS = [
     "-Wno-unused-private-field",
 ]
 
+
+# Docs on single flags is preceded by a comment.
+# Docs on groups of flags is preceded by ###.
+
 LLVM_FLAGS = [
     "-Wall",
     "-Wextra",
     "-Weverything",
+    # Abseil does not support C++98
     "-Wno-c++98-compat-pedantic",
     "-Wno-comma",
+    # Turns off all implicit conversion warnings. Most are re-enabled below.
     "-Wno-conversion",
     "-Wno-covered-switch-default",
     "-Wno-deprecated",
@@ -47,6 +53,7 @@ LLVM_FLAGS = [
     "-Wno-float-conversion",
     "-Wno-float-equal",
     "-Wno-format-nonliteral",
+    # Too aggressive: warns on Clang extensions enclosed in Clang-only code paths.
     "-Wno-gcc-compat",
     "-Wno-global-constructors",
     "-Wno-nested-anon-types",
@@ -54,6 +61,7 @@ LLVM_FLAGS = [
     "-Wno-old-style-cast",
     "-Wno-packed",
     "-Wno-padded",
+    # Warns on preferred usage of non-POD types such as string_view
     "-Wno-range-loop-analysis",
     "-Wno-reserved-id-macro",
     "-Wno-shorten-64-to-32",
@@ -63,9 +71,12 @@ LLVM_FLAGS = [
     "-Wno-undef",
     "-Wno-unknown-warning-option",
     "-Wno-unreachable-code",
+    # Causes warnings on include guards
     "-Wno-unused-macros",
     "-Wno-weak-vtables",
-    # flags below are also controlled by -Wconversion which is disabled
+    ###
+    # Implicit conversion warnings turned off by -Wno-conversion
+    # which are re-enabled below.
     "-Wbitfield-enum-conversion",
     "-Wbool-conversion",
     "-Wconstant-conversion",
@@ -76,6 +87,7 @@ LLVM_FLAGS = [
     "-Wnull-conversion",
     "-Wobjc-literal-conversion",
     "-Wstring-conversion",
+    ###
 ]
 
 LLVM_TEST_FLAGS = [