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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to