This is an archive of the discontinued LLVM Phabricator instance.

[Clang][Driver] recheck for nullptr
Needs ReviewPublic

Authored by nickdesaulniers on May 21 2019, 8:34 PM.

Details

Reviewers
rsmith
sfantao
Summary

This was flagged in https://www.viva64.com/en/b/0629/ under "Snippet No.
47".

Looks like TC is checked for nullptr once, but not the second time.
Fixes r275645.

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2019, 8:34 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

According to the coverage report we don't have any coverage of TC == null at all - not sure if its (a) possible to add tests or (b) if we can ever have a non-null TC - so should we just assert?

http://lab.llvm.org:8080/coverage/coverage-reports/clang/coverage/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/lib/Driver/Driver.cpp.html