summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-19 18:33:28 +0000
committerDan Gohman <gohman@apple.com>2010-04-19 18:33:28 +0000
commit0557cd7d89d71b5ea9571387d524064199094b45 (patch)
treef26d7191420cdebf10f79319f4b831f218af9cf5 /llvm
parentcf3309165976a3148ebe7ef7af098fe37f9d779a (diff)
downloadbcm5719-llvm-0557cd7d89d71b5ea9571387d524064199094b45.tar.gz
bcm5719-llvm-0557cd7d89d71b5ea9571387d524064199094b45.zip
Enable -Wcast-qual for C++ files, where intentional qualifier-stripping can
be done with const_cast. llvm-svn: 101798
Diffstat (limited to 'llvm')
-rw-r--r--llvm/Makefile.rules2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules
index 9414f634adc..0c8469a3133 100644
--- a/llvm/Makefile.rules
+++ b/llvm/Makefile.rules
@@ -633,6 +633,8 @@ CompileCommonOpts += -pedantic -Wno-long-long
endif
CompileCommonOpts += -Wall -W -Wno-unused-parameter -Wwrite-strings \
$(EXTRA_OPTIONS)
+# Enable cast-qual for C++; the workaround is to use const_cast.
+CXX.Flags += -Wcast-qual
ifeq ($(HOST_OS),HP-UX)
CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
OpenPOWER on IntegriCloud