Summary: Previously, if we pass multiple files or a file pattern (e.g. /path/to/*.cc) to include-fixer, include-fixer will apply all replacements to the first argument, which probably causes crashes. With this patch, include-fixer can process multiple files now. Vim and Emacs integration are tested manually. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23266 llvm-svn: 278102
14 lines
650 B
C++
14 lines
650 B
C++
// REQUIRES: shell
|
|
// RUN: sed -e 's#//.*$##' %s > %t.cpp
|
|
// RUN: mkdir -p %T/include-fixer/multiple-fixes
|
|
// RUN: echo 'foo f;' > %T/include-fixer/multiple-fixes/foo.cpp
|
|
// RUN: echo 'bar b;' > %T/include-fixer/multiple-fixes/bar.cpp
|
|
// RUN: clang-include-fixer -db=fixed -input='foo= "foo.h";bar= "bar.h"' %T/include-fixer/multiple-fixes/*.cpp --
|
|
// RUN: FileCheck -input-file=%T/include-fixer/multiple-fixes/bar.cpp %s -check-prefix=CHECK-BAR
|
|
// RUN: FileCheck -input-file=%T/include-fixer/multiple-fixes/foo.cpp %s -check-prefix=CHECK-FOO
|
|
//
|
|
// CHECK-FOO: #include "foo.h"
|
|
// CHECK-FOO: foo f;
|
|
// CHECK-BAR: #include "bar.h"
|
|
// CHECK-BAR: bar b;
|