Thrift: Allow whole program doctext.

Summary:
Allow docstrings at the top of the program.

Blame Rev: 52687

Reviewed By: mcslee

Test Plan:
../compiler/cpp/thrift -cpp DocTest.thrift
(with dump_docs on)
and looked at the output.
Generated C++ is identical to installed thrift.

Revert Plan: Do 52687 also.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665183 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/parse/t_doc.h b/compiler/cpp/src/parse/t_doc.h
index 9e3795a..bfa66ef 100644
--- a/compiler/cpp/src/parse/t_doc.h
+++ b/compiler/cpp/src/parse/t_doc.h
@@ -15,6 +15,8 @@
 class t_doc {
 
  public:
+  t_doc() : has_doc_(false) {}
+
   void set_doc(const std::string& doc) {
     doc_ = doc;
     has_doc_ = true;