Add a flag for clang-format that instructs the tool to strip 0 leading slashes from the file names.

I have clang-format-3.3 installed and it appears to default to stripping one leading slash.

BUG=294188

Review URL: https://chromiumcodereview.appspot.com/24217002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225705 0039d316-1c4b-4281-b951-d872f2087c98
parent 87b9bf02
......@@ -2241,7 +2241,7 @@ def CMDformat(parser, args):
'clang-format-diff.py')
if not os.path.exists(cfd_path):
DieWithError('Could not find clang-format-diff at %s.' % cfd_path)
cmd = [sys.executable, cfd_path, '-style', 'Chromium']
cmd = [sys.executable, cfd_path, '-p0', '-style', 'Chromium']
RunCommand(cmd, stdin=diff_output, cwd=top_dir)
return 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment