Index: lib/Frontend/VerifyDiagnosticConsumer.cpp
===================================================================
--- lib/Frontend/VerifyDiagnosticConsumer.cpp	(revision 159133)
+++ lib/Frontend/VerifyDiagnosticConsumer.cpp	(working copy)
@@ -18,9 +18,11 @@
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Support/Regex.h"
 #include "llvm/Support/raw_ostream.h"
-#include <climits>
 
 using namespace clang;
+typedef VerifyDiagnosticConsumer::Directive Directive;
+typedef VerifyDiagnosticConsumer::DirectiveList DirectiveList;
+typedef VerifyDiagnosticConsumer::ExpectedData ExpectedData;
 
 VerifyDiagnosticConsumer::VerifyDiagnosticConsumer(DiagnosticsEngine &_Diags)
   : Diags(_Diags), PrimaryClient(Diags.getClient()),
@@ -77,39 +79,6 @@
 
 namespace {
 
-/// Directive - Abstract class representing a parsed verify directive.
-///
-class Directive {
-public:
-  static Directive* Create(bool RegexKind, const SourceLocation &Location,
-                           const std::string &Text, unsigned Count);
-public:
-  /// Constant representing one or more matches aka regex "+".
-  static const unsigned OneOrMoreCount =  UINT_MAX;
-
-  SourceLocation Location;
-  const std::string Text;
-  unsigned Count;
-
-  virtual ~Directive() { }
-
-  // Returns true if directive text is valid.
-  // Otherwise returns false and populates E.
-  virtual bool isValid(std::string &Error) = 0;
-
-  // Returns true on match.
-  virtual bool Match(const std::string &S) = 0;
-
-protected:
-  Directive(const SourceLocation &Location, const std::string &Text,
-            unsigned Count)
-    : Location(Location), Text(Text), Count(Count) { }
-
-private:
-  Directive(const Directive&); // DO NOT IMPLEMENT
-  void operator=(const Directive&); // DO NOT IMPLEMENT
-};
-
 /// StandardDirective - Directive with string matching.
 ///
 class StandardDirective : public Directive {
@@ -150,25 +119,6 @@
   llvm::Regex Regex;
 };
 
-typedef std::vector<Directive*> DirectiveList;
-
-/// ExpectedData - owns directive objects and deletes on destructor.
-///
-struct ExpectedData {
-  DirectiveList Errors;
-  DirectiveList Warnings;
-  DirectiveList Notes;
-
-  ~ExpectedData() {
-    DirectiveList* Lists[] = { &Errors, &Warnings, &Notes, 0 };
-    for (DirectiveList **PL = Lists; *PL; ++PL) {
-      DirectiveList * const L = *PL;
-      for (DirectiveList::iterator I = L->begin(), E = L->end(); I != E; ++I)
-        delete *I;
-    }
-  }
-};  
-
 class ParseHelper
 {
 public:
@@ -495,8 +445,6 @@
 }
 
 void VerifyDiagnosticConsumer::CheckDiagnostics() {
-  ExpectedData ED;
-
   // Ensure any diagnostics go to the primary client.
   bool OwnsCurClient = Diags.ownsClient();
   DiagnosticConsumer *CurClient = Diags.takeClient();
Index: include/clang/Frontend/VerifyDiagnosticConsumer.h
===================================================================
--- include/clang/Frontend/VerifyDiagnosticConsumer.h	(revision 159133)
+++ include/clang/Frontend/VerifyDiagnosticConsumer.h	(working copy)
@@ -12,6 +12,7 @@
 
 #include "clang/Basic/Diagnostic.h"
 #include "llvm/ADT/OwningPtr.h"
+#include <climits>
 
 namespace clang {
 
@@ -68,13 +69,65 @@
 ///
 class VerifyDiagnosticConsumer: public DiagnosticConsumer {
 public:
+  /// Directive - Abstract class representing a parsed verify directive.
+  ///
+  class Directive {
+  public:
+    static Directive* Create(bool RegexKind, const SourceLocation &Location,
+                             const std::string &Text, unsigned Count);
+  public:
+    /// Constant representing one or more matches aka regex "+".
+    static const unsigned OneOrMoreCount =  UINT_MAX;
+
+    SourceLocation Location;
+    const std::string Text;
+    unsigned Count;
+
+    virtual ~Directive() { }
+
+    // Returns true if directive text is valid.
+    // Otherwise returns false and populates E.
+    virtual bool isValid(std::string &Error) = 0;
+
+    // Returns true on match.
+    virtual bool Match(const std::string &S) = 0;
+
+  protected:
+    Directive(const SourceLocation &Location, const std::string &Text,
+              unsigned Count)
+      : Location(Location), Text(Text), Count(Count) { }
+
+  private:
+    Directive(const Directive&); // DO NOT IMPLEMENT
+    void operator=(const Directive&); // DO NOT IMPLEMENT
+  };
+
+  typedef std::vector<Directive*> DirectiveList;
+
+  /// ExpectedData - owns directive objects and deletes on destructor.
+  ///
+  struct ExpectedData {
+    DirectiveList Errors;
+    DirectiveList Warnings;
+    DirectiveList Notes;
+
+    ~ExpectedData() {
+      DirectiveList* Lists[] = { &Errors, &Warnings, &Notes, 0 };
+      for (DirectiveList **PL = Lists; *PL; ++PL) {
+        DirectiveList * const L = *PL;
+        for (DirectiveList::iterator I = L->begin(), E = L->end(); I != E; ++I)
+          delete *I;
+      }
+    }
+  };
+
+private:
   DiagnosticsEngine &Diags;
   DiagnosticConsumer *PrimaryClient;
   bool OwnsPrimaryClient;
   OwningPtr<TextDiagnosticBuffer> Buffer;
   Preprocessor *CurrentPreprocessor;
-
-private:
+  ExpectedData ED;
   FileID FirstErrorFID; // FileID of first diagnostic
   void CheckDiagnostics();
 
