From: Renato Golin Date: Fri, 8 May 2015 17:05:24 +0000 (+0000) Subject: Revert "clang-format: Only output IncompleteFormat if -cursor is given." X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8ea585c7be49956cf28c1829414192ed43e9eda;p=clang Revert "clang-format: Only output IncompleteFormat if -cursor is given." This reverts commit r236867, as it was breaking multiple buildbots. Daniel will look into it later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236882 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Format/incomplete.cpp b/test/Format/incomplete.cpp index b66d5f816e..ade38b66a3 100644 --- a/test/Format/incomplete.cpp +++ b/test/Format/incomplete.cpp @@ -1,7 +1,7 @@ // RUN: grep -Ev "// *[A-Z-]+:" %s > %t2.cpp // RUN: clang-format -style=LLVM %t2.cpp > %t.cpp -// RUN: FileCheck -strict-whitespace -cursor=0 -input-file=%t.cpp %s -// CHECK: {{"IncompleteFormat": true}} +// RUN: FileCheck -strict-whitespace -input-file=%t.cpp %s +// CHECK: {{^\{ "IncompleteFormat": true }} // CHECK: {{^int\ \i;$}} int i; // CHECK: {{^f \( g \(;$}} diff --git a/tools/clang-format/ClangFormat.cpp b/tools/clang-format/ClangFormat.cpp index 5037e901f3..ae2180c837 100644 --- a/tools/clang-format/ClangFormat.cpp +++ b/tools/clang-format/ClangFormat.cpp @@ -226,8 +226,7 @@ static bool format(StringRef FileName) { FormatStyle FormatStyle = getStyle( Style, (FileName == "-") ? AssumeFilename : FileName, FallbackStyle); bool IncompleteFormat = false; - tooling::Replacements Replaces = - reformat(FormatStyle, Sources, ID, Ranges, &IncompleteFormat); + tooling::Replacements Replaces = reformat(FormatStyle, Sources, ID, Ranges, &IncompleteFormat); if (OutputXML) { llvm::outs() << "\n