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
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index 0470741..c21fa0d 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/lib/Format/UnwrappedLineParser.cpp
@@ -33,12 +33,12 @@
   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;