TGParser::ParseValue contains two recursive calls, one to parse the RHS of a list paste operator and one to parse the RHS of a paste operator in a class/def name. Both of these calls neglect to check the return value to see if it is null (because of some error). This causes a crash in the next line of code, which uses the return value. The code now checks for null returns.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Do I need to reformat the code as Lint suggests? Most of the if (!xxx) return ... tests in the code are on one line.
Comment Actions
Do I need to reformat the code as Lint suggests? Most of the if (!xxx) return ... tests in the code are on one line.
Yes, please do. Those single-line checks are increasingly rare in the LLVM code base for IMHO good reasons, let's not add new ones even if this code happens to be fairly old and not follow newer customs.
The change LGTM apart from that, thanks!
Comment Actions
Reformatted the two lines of code correctly.
@nhaehnle, could you do me the favor of committing this?
Comment Actions
Hmm, forgot to adjust the author field to you for that commit. Sorry about that, I'm doing it for the other ones.
clang-format: please reformat the code