[cfe-commits] r125640 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaChecking.cpp lib/Sema/SemaExpr.cpp test/Analysis/out-of-bounds.c test/Sema/array-bounds.c

Ted Kremenek kremenek at apple.com
Wed Feb 16 15:43:02 PST 2011


Fixed: r125693
On Feb 16, 2011, at 3:00 PM, Devang Patel wrote:

> Ted,
> 
> This is causing regressions in gdb testsuite. Can you take a look ?
> Thanks,
> -
> Devang
> 
> $ clang -c templates.cc
> 
> Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /Volumes/Lalgate/clean/llvm/include/llvm/Support/Casting.h, line 202.
> 0  clang             0x000000010132944e PrintStackTrace(void*) + 38
> 1  clang             0x0000000101329a09 SignalHandler(int) + 254
> 2  libSystem.B.dylib 0x00007fff866be67a _sigtramp + 26
> 3  libSystem.B.dylib 0x000000010581d360 _sigtramp + 2132143360
> 4  clang             0x000000010132938b raise + 27
> 5  clang             0x000000010132939b abort + 14
> 6  clang             0x0000000101329428 PrintStackTrace(void*) + 0
> 7  clang             0x0000000100276a5c llvm::cast_retty<clang::VarDecl, clang::ValueDecl const*>::ret_type llvm::cast<clang::VarDecl, clang::ValueDecl const*>(clang::ValueDecl const* const&) + 78
> 8  clang             0x0000000100301806 clang::Sema::CheckArrayAccess(clang::ArraySubscriptExpr const*) + 96
> 9  clang             0x00000001003cc925 clang::Sema::DefaultLvalueConversion(clang::Expr*&) + 397
> 10 clang             0x00000001003ce08a clang::Sema::DefaultFunctionArrayLvalueConversion(clang::Expr*&) + 42
> 11 clang             0x00000001003cf177 clang::Sema::UsualUnaryConversions(clang::Expr*&) + 29
> 12 clang             0x00000001003dbd8c clang::Sema::UsualArithmeticConversions(clang::Expr*&, clang::Expr*&, bool) + 72
> 13 clang             0x00000001003dd5d4 clang::Sema::CheckCompareOperands(clang::Expr*&, clang::Expr*&, clang::SourceLocation, unsigned int, bool) + 1966
> 14 clang             0x00000001003e1189 clang::Sema::CreateBuiltinBinOp(clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) + 753
> 15 clang             0x00000001003e1827 clang::Sema::BuildBinOp(clang::Scope*, clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) + 567
> 16 clang             0x00000001003e190c clang::Sema::ActOnBinOp(clang::Scope*, clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*) + 202
> 17 clang             0x00000001002ae5fa clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*, true>, clang::prec::Level) + 1920
> 18 clang             0x00000001002a9276 clang::Parser::ParseAssignmentExpression() + 172
> 19 clang             0x00000001002a9543 clang::Parser::ParseExpression() + 21
> 20 clang             0x00000001002b2bc8 clang::Parser::ParseCXXCondition(clang::ActionResult<clang::Expr*, true>&, clang::Decl*&, clang::SourceLocation, bool) + 156
> 21 clang             0x00000001002c3e0a clang::Parser::ParseParenExprOrCondition(clang::ActionResult<clang::Expr*, true>&, clang::Decl*&, clang::SourceLocation, bool) + 94
> 22 clang             0x00000001002c5eda clang::Parser::ParseIfStatement(clang::ParsedAttributes&) + 434
> 23 clang             0x00000001002c4567 clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&, bool) + 1583
> 24 clang             0x00000001002c6e32 clang::Parser::ParseCompoundStatementBody(bool) + 256
> 25 clang             0x00000001002c7268 clang::Parser::ParseFunctionStatementBody(clang::Decl*) + 198
> 26 clang             0x00000001002d2102 clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&) + 844
> 27 clang             0x00000001002ca8ab clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&, clang::AccessSpecifier) + 1185
> 28 clang             0x00000001002cad99 clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int, clang::SourceLocation&, clang::AccessSpecifier) + 945
> 29 clang             0x00000001002cae7c clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int, clang::SourceLocation&, clang::AccessSpecifier) + 158
> 30 clang             0x000000010029d5d5 clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 409
> 31 clang             0x00000001002d072a clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::Parser::ParsingDeclSpec*) + 1714
> 32 clang             0x00000001002d0b78 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 176
> 33 clang             0x000000010028fbcb clang::ParseAST(clang::Sema&, bool) + 276
> 34 clang             0x000000010006d5e7 clang::ASTFrontendAction::ExecuteAction() + 233
> 35 clang             0x0000000100263558 clang::CodeGenAction::ExecuteAction() + 794
> 36 clang             0x000000010006d6ee clang::FrontendAction::Execute() + 256
> 37 clang             0x000000010004d6e8 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 710
> 38 clang             0x000000010000d0b3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 731
> 39 clang             0x0000000100001df4 cc1_main(char const**, char const**, char const*, void*) + 941
> 40 clang             0x00000001000099db main + 450
> 41 clang             0x0000000100001534 start + 52
> 
> <templates.cc>
> 





More information about the cfe-commits mailing list