summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-08-23 21:12:35 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-23 21:12:35 +0000
commit3a3a3690bc4c0b8d50756014dbe2ea85f3075fdc (patch)
tree5a1bcf6a9bf6a1ea6a6d1465d074987459a1fd27
parent203339a2aa88bb31576233220d7ced73920a596f (diff)
downloadpdfium-3a3a3690bc4c0b8d50756014dbe2ea85f3075fdc.tar.xz
Enable warnings for shadowed variables
This CL adds in -Wshadow that will throw a warning whenever a variable is being shadowed. BUG=pdfium:1137 Change-Id: I879683fbf2f84c6609cf496308ddadb74c2f26aa Reviewed-on: https://pdfium-review.googlesource.com/41250 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
-rw-r--r--BUILD.gn3
1 files changed, 3 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index b3a56f70b0..99e71cfbc8 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -72,6 +72,9 @@ config("pdfium_core_config") {
cflags = []
configs = [ ":pdfium_common_config" ]
defines = [ "V8_DEPRECATION_WARNINGS" ]
+ if (is_clang) {
+ cflags += [ "-Wshadow" ]
+ }
if (is_linux) {
if (current_cpu == "x64") {
defines += [ "_FX_CPU_=_FX_X64_" ]