From 4cdc0cde1396df5d937c39c626abe99760197654 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Wed, 24 Apr 2013 12:46:44 +0000 Subject: clang-format support for multiple input files. Summary: Added support for multiple input files, that can be used both with and without in-place edit (-i) option. Added checks for -offset and -length options: don't allow them on multiple files, check that they don't fall outside input file, made both options unsigned, so that there's no need to check for negative values. Removed "-1 can be used for end-of-file" from -length description. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D719 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180185 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Format/multiple-inputs-error.cpp | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/Format/multiple-inputs-error.cpp (limited to 'test/Format/multiple-inputs-error.cpp') diff --git a/test/Format/multiple-inputs-error.cpp b/test/Format/multiple-inputs-error.cpp new file mode 100644 index 0000000000..71f87e0b15 --- /dev/null +++ b/test/Format/multiple-inputs-error.cpp @@ -0,0 +1,6 @@ +// RUN: cp %s %t-1.cpp +// RUN: cp %s %t-2.cpp +// RUN: clang-format 2>&1 >/dev/null -offset=1 -length=0 %t-1.cpp %t-2.cpp |FileCheck %s +// CHECK: error: "-offset" and "-length" can only be used for single file. + +int i ; -- cgit v1.2.3-70-g09d2