[Chapel Merge] Fix clang++ 12 build by removing temporary char* v

Branch: refs/heads/main
Revision: 8d34a8f
Author: bradcray
Log Message:

Merge pull request #18362 from bradcray/fix-clang12-build

Fix clang++ 12 build by removing temporary char* variable

[reviewed by @ronawho]

@dlongnecke-cray and @arezaii reported on Slack that PR #18329 (they think)
broke the compilation of driver.cpp, though this seems to be specific to
newer versions of clang++ (at least, it didn't show up with my default
version). The error was:

driver.cpp:1514:32: error: object backing the pointer will be destroyed at the end of the
      full-expression [-Werror,-Wdangling-gsl]
            executableFilename:std::to_string(getpid()).c_str();

This PR fixes the issue by eliminating the temporary variable and
inserting the expression directly into the sprintf() that uses it. Not
as pretty, but it does the trick.

Modified Files:
M compiler/main/driver.cpp

Compare: https://github.com/chapel-lang/chapel/compare/8ce7fbd57b2a...8d34a8f035d5