THRIFT-2320 Program level doctext does not get attached by parser
Patch: Craig Peterson & Jens Geyer
diff --git a/compiler/cpp/src/thriftl.ll b/compiler/cpp/src/thriftl.ll
index a1faa6b..4df4ccb 100644
--- a/compiler/cpp/src/thriftl.ll
+++ b/compiler/cpp/src/thriftl.ll
@@ -384,6 +384,11 @@
g_doctext[strlen(g_doctext) - 1] = '\0';
g_doctext = clean_up_doctext(g_doctext);
g_doctext_lineno = yylineno;
+ if(g_program_doctext_candidate == NULL){
+ g_program_doctext_candidate = strdup(g_doctext);
+ g_program_doctext_lineno = g_doctext_lineno;
+ g_program_doctext_status = STILL_CANDIDATE;
+ }
}
}