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

smanna12 via All-commits all-commits at lists.llvm.org
Tue Mar 26 09:48:59 PDT 2024


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

  Changed paths:
    M clang/lib/Sema/Sema.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp

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

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

1. Dereferencing a pointer issue with nullptr FPT when calling
ResolveExceptionSpec() in
    checkEscapingByref(clang::VarDecl *, clang::Sema &).

3. Dereferencing a pointer issue with nullptr ElementTy->getAs() when
calling getElementType() in
clang::Sema::SemaBuiltinFPClassification(clang::CallExpr *, unsigned
int).

4. Dereferencing a pointer issue with nullptr ConvType->getAs() when
calling getKeyword() in
clang::Sema::ActOnConversionDeclarator(clang::CXXConversionDecl *).



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