[llvm-bugs] [Bug 28373] New: clang nullptr dereference in code from r273602 (Implement p0292r2)

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 30 10:47:54 PDT 2016


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

            Bug ID: 28373
           Summary: clang nullptr dereference in code from r273602
                    (Implement p0292r2)
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: yaron.keren at gmail.com
                CC: llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
    Classification: Unclassified

compiling 


void foo() {
  if (!a) {
  }
}



with clang results in a crash in Sema::ActOnIfStmt, when CondExpr is nullptr
and dereferenced.

  Expr *CondExpr = Cond.get().second;
  if (!Diags.isIgnored(diag::warn_comma_operator,
                       CondExpr->getExprLoc()))
    CommaVisitor(*this).Visit(CondExpr);

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160630/a68a7b0e/attachment.html>


More information about the llvm-bugs mailing list