[all-commits] [llvm/llvm-project] 8a75fa: [NFC][CLANG] Fix null pointer dereferences (#86760)

smanna12 via All-commits all-commits at lists.llvm.org
Wed Mar 27 15:13:20 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a75faf4717b8258b59cf9fbb4cbd2f189114d3f
      https://github.com/llvm/llvm-project/commit/8a75faf4717b8258b59cf9fbb4cbd2f189114d3f
  Author: smanna12 <soumi.manna at intel.com>
  Date:   2024-03-27 (Wed, 27 Mar 2024)

  Changed paths:
    M clang/lib/Sema/SemaTemplateDeduction.cpp

  Log Message:
  -----------
  [NFC][CLANG] Fix null pointer dereferences (#86760)

This patch replaces getAs<> with castAs<> to resolve potential static
analyzer bugs for

1. Dereferencing Proto1->param_type_begin(), which is known to be
nullptr
2. Dereferencing Proto2->param_type_begin(), which is known to be
nullptr
3. Dereferencing a pointer issue with nullptr Proto1 when calling
param_type_end()
4. Dereferencing a pointer issue with nullptr Proto2 when calling
param_type_end()

in clang::Sema::getMoreSpecializedTemplate().



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list