aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-01-23 11:03:04 +0000
committerManuel Klimek <klimek@google.com>2013-01-23 11:03:04 +0000
commit836b58f564e07e806d3d0b41a193fde0921013c7 (patch)
treeea96bbe81e8b669315cafe1e22d1238bc1bf87f4 /lib/Format/UnwrappedLineParser.cpp
parent092a2c7373c02d1653bea1feb1ada05363b02bc2 (diff)
Fixes incorrect handling of the declaration context stack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--lib/Format/UnwrappedLineParser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index 047074135c..c21fa0d74e 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/lib/Format/UnwrappedLineParser.cpp
@@ -33,12 +33,12 @@ public:
ScopedDeclarationState(UnwrappedLine &Line, std::vector<bool> &Stack,
bool MustBeDeclaration)
: Line(Line), Stack(Stack) {
- Stack.push_back(MustBeDeclaration);
Line.MustBeDeclaration = MustBeDeclaration;
+ Stack.push_back(MustBeDeclaration);
}
~ScopedDeclarationState() {
- Line.MustBeDeclaration = Stack.back();
Stack.pop_back();
+ Line.MustBeDeclaration = Stack.back();
}
private:
UnwrappedLine &Line;