THRIFT-2338 First doctext wrongly interpreted as program doctext in some cases
Patch: Jens Geyer
diff --git a/compiler/cpp/src/thriftl.ll b/compiler/cpp/src/thriftl.ll
index 4df4ccb..685bb54 100644
--- a/compiler/cpp/src/thriftl.ll
+++ b/compiler/cpp/src/thriftl.ll
@@ -384,10 +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){
+ if( (g_program_doctext_candidate == NULL) && (g_program_doctext_status == INVALID)){
g_program_doctext_candidate = strdup(g_doctext);
g_program_doctext_lineno = g_doctext_lineno;
g_program_doctext_status = STILL_CANDIDATE;
+ pdebug("%s","program doctext set to STILL_CANDIDATE");
}
}
}