[PATCH] Allow compile_commands.json files in subdirectories

Yung, Douglas douglas_yung at playstation.sony.com
Wed Mar 25 15:55:50 PDT 2015


Hi, I just wanted to resend this and was hoping to get someone to review my small change. Thanks!

Douglas Yung

From: Yung, Douglas
Sent: Thursday, March 19, 2015 1:20
To: llvm-commits at cs.uiuc.edu
Subject: [PATCH] Allow compile_commands.json files in subdirectories

Hi,

In the top-level .gitignore file of the llvm project, there is an entry in the .gitignore file to ignore the file compile_commands.json. This was added by David Blaikie in 162305 to ignore the compile_commands.json that may be present at the root of the LLVM source tree. The problem with how it was done though is that it is excluding compile_commands.json files anywhere in the LLVM source tree. In our case, we included the clang extra user tools in our repository under tools/clang/tools/extra, which contains 3 instances of the file compile_commands.json under tools/clang/tools/extra which were being ignored causing tests to fail due to this missing file. The proposed fix as seen below is to simply restrict the ignoring of compile_commands.json to an instance at the root of the LLVM source tree.

Douglas Yung

Files:
  .gitignore

Index: .gitignore
===================================================================
--- .gitignore    (revision 232698)
+++ .gitignore    (working copy)
@@ -37,7 +37,7 @@
cscope.out
autoconf/aclocal.m4
autoconf/autom4te.cache
-compile_commands.json
+/compile_commands.json

 #==============================================================================#
# Directories to ignore (do not add trailing '/'s, they skip symlinks).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150325/6ae2f23b/attachment.html>


More information about the llvm-commits mailing list