Index: clang/tools/.gitignore
===================================================================
--- /dev/null
+++ clang/tools/.gitignore
@@ -0,0 +1,13 @@
+#==============================================================================#
+# This file specifies intentionally untracked files that git should ignore.
+# See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html
+#
+# This file is intentionally different from the output of `git svn show-ignore`,
+# as most of those are useless.
+#==============================================================================#
+
+#==============================================================================#
+# File extensions to be ignored anywhere in the tree.
+#==============================================================================#
+# The include-what-you-use project, for when building in-tree.
+include-what-you-use
Index: clang/tools/CMakeLists.txt
===================================================================
--- clang/tools/CMakeLists.txt
+++ clang/tools/CMakeLists.txt
@@ -30,3 +30,8 @@
 
 # libclang may require clang-tidy in clang-tools-extra.
 add_clang_subdirectory(libclang)
+
+# if include-what-you-use is cloned for building in-tree, add it here.
+if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include-what-you-use")
+  add_clang_subdirectory(include-what-you-use)
+endif()