https://bugs.llvm.org/show_bug.cgi?id=32447

            Bug ID: 32447
           Summary: llvm/tools/clang/lib/Sema/SemaOverload.cpp:
                    PVS-Studio: CWE-476 (NULL Pointer Dereference)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

We have found a weakness using PVS-Studio tool. PVS-Studio is a static code
analyzer for C, C++ and C#: https://www.viva64.com/en/pvs-studio/

Analyzer warning: V595 The 'Initializer' pointer was utilized before it was
verified against nullptr. Check lines: 335, 338. semaoverload.cpp 335

NarrowingKind
StandardConversionSequence::getNarrowingKind(....) const {
  ....
  const Expr *Initializer = IgnoreNarrowingConversion(Converted);

  if (Initializer->isValueDependent()) // <=
    return NK_Dependent_Narrowing;

  if (Initializer &&                   // <=
      Initializer->isIntegerConstantExpr(IntConstantValue, Ctx)){
  ....
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to