diff options
author | Daniel Jasper <djasper@google.com> | 2013-07-11 21:27:40 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-07-11 21:27:40 +0000 |
commit | 51efbad7324659943d3a7ae32cbb516b7539486b (patch) | |
tree | 81c2c433107c679ba38f56f2cdfb770f5573da7e /clang/lib/Format/Format.cpp | |
parent | 29b3fdc8c2d5502196b3aa2da0012fda65c6b531 (diff) | |
download | bcm5719-llvm-51efbad7324659943d3a7ae32cbb516b7539486b.tar.gz bcm5719-llvm-51efbad7324659943d3a7ae32cbb516b7539486b.zip |
clang-format: Fix bug concerning the alignment of "}".
Before:
int i; // indented 2 space more than clang-format would use.
SomeReturnType // clang-format invoked on this line.
SomeFunctionMakingLBraceEndInColumn80() {
} // This is the indent clang-format would prefer.
After:
int i; // indented 2 space more than clang-format would use.
SomeReturnType // clang-format invoked on this line.
SomeFunctionMakingLBraceEndInColumn80() {
}
llvm-svn: 186120
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 680bb130131..a98d565caa4 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -536,7 +536,7 @@ private: if (Current.BlockKind == BK_BracedInit) State.Column = State.Stack[State.Stack.size() - 2].LastSpace; else - State.Column = Line.Level * Style.IndentWidth; + State.Column = FirstIndent; } else if (Current.is(tok::string_literal) && State.StartOfStringLiteral != 0) { State.Column = State.StartOfStringLiteral; |