[all-commits] [llvm/llvm-project] 1095f7: [NFC][Clang] Fix potential dereferencing of nullpt...

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


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

  Changed paths:
    M clang/lib/CodeGen/CGExprComplex.cpp
    M clang/lib/CodeGen/Targets/PPC.cpp
    M clang/lib/Sema/SemaTemplate.cpp

  Log Message:
  -----------
  [NFC][Clang] Fix potential dereferencing of nullptr (#86759)

This patch replaces dyn_cast<> with cast<> to resolve potential static
analyzer bugs for

1. Dereferencing a pointer issue with nullptr GVar when calling
addAttribute() in AIXTargetCodeGenInfo::setTargetAttributes(clang::Decl
const *, llvm::GlobalValue *, clang::CodeGen::CodeGenModule &).

2. Dereferencing a pointer issue with nullptr GG when calling
getCorrespondingConstructor() in
DeclareImplicitDeductionGuidesForTypeAlias(clang::Sema &,
clang::TypeAliasTemplateDecl *, clang::SourceLocation).

3. Dereferencing a pointer issue with nullptr CurrentBT when calling
getKind() in
ComplexExprEmitter::GetHigherPrecisionFPType(clang::QualType).



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