[all-commits] [llvm/llvm-project] e63abd: [clang][driver] Fix null pointer dereference warni...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Feb 5 07:32:38 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e63abde39f530028b0089ea477446c1b671a28f1
      https://github.com/llvm/llvm-project/commit/e63abde39f530028b0089ea477446c1b671a28f1
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-02-05 (Wed, 05 Feb 2020)

  Changed paths:
    M clang/lib/Driver/Driver.cpp

  Log Message:
  -----------
  [clang][driver] Fix null pointer dereference warning inside PrintActions1 (PR43462)

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.

Differential Revision: https://reviews.llvm.org/D74046




More information about the All-commits mailing list