[LLVMbugs] [Bug 22238] New: Clang crashes when bitfield-width contains a functional cast expression for copy-constructing a record

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 15 03:05:40 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22238

            Bug ID: 22238
           Summary: Clang crashes when bitfield-width contains a
                    functional cast expression for copy-constructing a
                    record
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

consider:
extern "C" {
struct T {
  char c;
} a;
struct B {
  x : T(a);
};
}

we diagnose with:
t.cpp:6:3: error: unknown type name 'x'
  x : T(a);

before crashing with:
lib/AST/ExprConstant.cpp:8565: llvm::APSInt
clang::Expr::EvaluateKnownConstInt(const clang::ASTContext&,
llvm::SmallVectorImpl<std::pair<clang::SourceLocation,
clang::PartialDiagnostic> >*) const: Assertion `Result && "Could not evaluate
expression"' failed

-- 
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/20150115/dfa9b902/attachment.html>


More information about the llvm-bugs mailing list