diff options
Diffstat (limited to 'clang/tools/clang-format/ClangFormat.cpp')
-rw-r--r-- | clang/tools/clang-format/ClangFormat.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/tools/clang-format/ClangFormat.cpp b/clang/tools/clang-format/ClangFormat.cpp index 340ef5587ff..764200308d0 100644 --- a/clang/tools/clang-format/ClangFormat.cpp +++ b/clang/tools/clang-format/ClangFormat.cpp @@ -226,7 +226,7 @@ static bool format(std::string FileName) { Rewrite.getEditBuffer(ID).write(FileStream); FileStream.flush(); } else { - if (Cursor != 0) + if (Cursor.getNumOccurrences() != 0) outs() << "{ \"Cursor\": " << tooling::shiftedCodePosition( Replaces, Cursor) << " }\n"; Rewrite.getEditBuffer(ID).write(outs()); |