summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/c-index-test')
-rw-r--r--clang/tools/c-index-test/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/tools/c-index-test/Makefile b/clang/tools/c-index-test/Makefile
index 4df90e62abe..5aaabefdf6f 100644
--- a/clang/tools/c-index-test/Makefile
+++ b/clang/tools/c-index-test/Makefile
@@ -37,4 +37,12 @@ USEDLIBS = clang.a \
include $(CLANG_LEVEL)/Makefile
LIBS += $(LIBXML2_LIBS)
+
+# Headers in $(LIBXML2_INC) should not be checked with clang's -Wdocumentation.
+# Use -isystem instead of -I then.
+# FIXME: Could autoconf detect clang or availability of -isystem?
+ifneq ($(findstring -Wdocumentation,$(OPTIMIZE_OPTION)),)
+CPPFLAGS += $(subst -I,-isystem ,$(LIBXML2_INC))
+else
CPPFLAGS += $(LIBXML2_INC)
+endif
OpenPOWER on IntegriCloud