[Chapel Merge] Issue: 16866 (chpldoc not properly generated for f

Branch: refs/heads/master
Revision: b674afb
Author: lydia-duncan
Log Message:

Merge pull request #17058 from prashanth018/issue_16866_Fix_2

Issue: 16866 (chpldoc not properly generated for few usecases)
[contributed by @prashanth018, reviewed by Lydia and @cassella]

There were 2 types of usecases specified in the bug.
Type 1:
When the variables are instantiated with a non-Array based looping constructs (for or forall), the documentation thus generated was produced incorrectly. (produces “AppendExpr.Loop04” and “AppendExpr.Loop03”).
Type 2:
When the variables are instantiated with a try or try-bang constructs, the documentation thus generated was produced incorrectly. (produces “AppendExpr.Call09”)

Fix:
Have processed these use cases separately in a different if-else case. Have made changes to AppendExpr method specific to CallExpr for try based usecase and to AppendExpr method specific to LoopExpr for loop based usecase.

Have done sanity testing and Project Tests have passed and the code doesn’t introduce backward incompatibility.

Passed a full paratest with futures and a diff of the built module documentation showed no related
changes.

Modified Files:
R test/chpldoc/globals/variablepatterns.doc.bad
R test/chpldoc/globals/variablepatterns.doc.future
M compiler/AST/AstToText.cpp
M test/chpldoc/globals/variablepatterns.doc.chpl
M test/chpldoc/globals/variablepatterns.doc.good

Compare: Comparing c67bb3446736...b674afb4e279 · chapel-lang/chapel · GitHub