Fix an assertion when -print-prog-name= is invoked without parameter. Returns an empty string.
no test provided, as "obvious"
Differential D45814
Fix an assertion when -print-prog-name= chrib on Apr 19 2018, 6:18 AM. Authored by
Details
Fix an assertion when -print-prog-name= is invoked without parameter. Returns an empty string. no test provided, as "obvious"
Diff Detail
Event TimelineComment Actions I'm torn on this. The other -print options will perform the validation implicitly at the higher level before calling the inner functions. It is certainly reasonable to support that, but, for the common path, this check seems unnecessary (and this function is used elsewhere in clang). There is a similar problem that exists with -print-file-name=. We should probably fix both at the same time. Can you also please add a test case for this? Comment Actions Move the non-null name check out of GetProgramPath and add a test case. Assume that we trust the callers to check for non null ProgramName. Comment Actions Hi Saleem, Thanks for your review. I have amended the patch to avoid checking the name on the common path. |