This is an archive of the discontinued LLVM Phabricator instance.

[clang][driver] Fix null pointer dereference warning inside PrintActions1 (PR43462)
ClosedPublic

Authored by RKSimon on Feb 5 2020, 6:03 AM.

Details

Summary

As detailed on PR43462, clang static analyzer is complaining about a null pointer dereference as we provide a 'host' toolchain fallback if the ToolChain pointer is null, but then use that pointer anyhow to report the triple.

Tests indicate the ToolChain pointer is always valid and the 'host' code path is redundant.

Diff Detail

Event Timeline

RKSimon created this revision.Feb 5 2020, 6:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2020, 6:03 AM
This revision is now accepted and ready to land.Feb 5 2020, 6:24 AM
This revision was automatically updated to reflect the committed changes.