[cfe-commits] r143204 - in /cfe/trunk: include/clang/AST/ASTContext.h include/clang/AST/Expr.h lib/AST/ExprConstant.cpp test/CodeGenCXX/static-data-member.cpp test/SemaCXX/constant-expression-cxx11.cpp

Chad Rosier mcrosier at apple.com
Mon Oct 31 13:27:00 PDT 2011


Thanks again for the timely fix.

 Chad

On Oct 31, 2011, at 1:24 PM, Richard Smith wrote:

> Hi Chad,
> 
> The assert is gone in r143360.
> 
> Richard
> 
> On Mon, October 31, 2011 19:39, Chad Rosier wrote:
>> This is blocking some number gathering for the upcoming LLVM Developers
>> Meeting.  Do you have an ETA on this fix?  If not soon (~1 hour), would you
>> mind reverting this and any other associated patches?
>> 
>> Regards,
>> Chad
>> 
>> 
>> On Oct 31, 2011, at 10:36 AM, Chad Rosier wrote:
>> 
>> 
>>> Hey Richard,
>>> I have another one for you.   I'm seeing the following assert:
>>> 
>>> 
>>> Assertion failed: ((E->isGLValue() || E->getType()->isFunctionType() ||
>>> E->getType()->isVoidType() || isa<CXXTemporaryObjectExpr>(E)) && "can't
>>> evaluate expression as an lvalue"), function EvaluateLValue, file
>>> /Users/mcrosier/llvm-clean/llvm/tools/clang/lib/AST/ExprConstant.cpp,
>>> line 913. 0  clang             0x000000010a8fe222 _ZL15PrintStackTracePv + 34
>>> 1  clang             0x000000010a8fe749 _ZL13SignalHandleri + 697
>>> 2  libsystem_c.dylib 0x00007fff8d815cfa _sigtramp + 26
>>> 3  libsystem_c.dylib 0x00007fff0000a63d _sigtramp + 18446744071335528797
>>> 4  clang             0x000000010a8fe476 abort + 22
>>> 5  clang             0x000000010a8fe435 __assert_rtn + 53
>>> 6  clang             0x0000000109e331b4
>>> _ZL14EvaluateLValuePKN5clang4ExprERN12_GLOBAL__N_16LValueERNS3_8EvalInfoE +
>>> 132
>>> 7  clang             0x0000000109e37028 (anonymous
>>> namespace)::PointerExprEvaluator::VisitCastExpr(clang::CastExpr const*) +
>>> 968
>>> 8  clang             0x0000000109e363c5
>>> clang::StmtVisitorBase<clang::make_const_ptr, (anonymous
>>> namespace)::PointerExprEvaluator, bool>::Visit(clang::Stmt const*) + 1013
>>> 9  clang             0x0000000109e3505c
>>> clang::StmtVisitorBase<clang::make_const_ptr, (anonymous
>>> namespace)::LValueExprEvaluator, bool>::Visit(clang::Stmt const*) + 1180
>>> 10 clang             0x0000000109e331ef
>>> _ZL14EvaluateLValuePKN5clang4ExprERN12_GLOBAL__N_16LValueERNS3_8EvalInfoE +
>>> 191
>>> 11 clang             0x0000000109e32400
>>> _ZL8EvaluateRN12_GLOBAL__N_17CCValueERNS_8EvalInfoEPKN5clang4ExprE + 128
>>> 12 clang             0x0000000109e321eb
>>> clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&, clang::ASTContext
>>> const&) const + 107 13 clang             0x000000010990010f (anonymous
>>> namespace)::GetExprRange(clang::ASTContext&, clang::Expr*, unsigned int) +
>>> 79
>>> 14 clang             0x00000001098fe93e (anonymous
>>> namespace)::CheckImplicitConversion(clang::Sema&, clang::Expr*,
>>> clang::QualType, clang::SourceLocation, bool*) + 3758
>>> 15 clang             0x00000001098fa78a (anonymous
>>> namespace)::AnalyzeImplicitConversions(clang::Sema&, clang::Expr*,
>>> clang::SourceLocation) + 106
>>> 16 clang             0x00000001098fadf0 (anonymous
>>> namespace)::AnalyzeImplicitConversions(clang::Sema&, clang::Expr*,
>>> clang::SourceLocation) + 1744
>>> 17 clang             0x0000000109a26e06
>>> clang::Sema::ActOnFinishFullExpr(clang::Expr*) + 134
>>> 18 clang             0x00000001098a75e8
>>> clang::Parser::ParseExprStatement(clang::ParsedAttributes&) + 296
>>> 19 clang             0x00000001098a6dce
>>> clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::St
>>> mt*, 32u>&, bool) + 2142 20 clang             0x00000001098aa2f6
>>> clang::Parser::ParseForStatement(clang::ParsedAttributes&) + 2982
>>> 21 clang             0x00000001098a6ec6
>>> clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::St
>>> mt*, 32u>&, bool) + 2390 22 clang             0x00000001098ac950
>>> clang::Parser::ParseCompoundStatementBody(bool) + 1344
>>> 23 clang             0x00000001098a69b0
>>> clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::St
>>> mt*, 32u>&, bool) + 1088 24 clang             0x00000001098a8915
>>> clang::Parser::ParseIfStatement(clang::ParsedAttributes&) + 533
>>> 25 clang             0x00000001098a6e84
>>> clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::St
>>> mt*, 32u>&, bool) + 2324 26 clang             0x00000001098ac950
>>> clang::Parser::ParseCompoundStatementBody(bool) + 1344
>>> 27 clang             0x00000001098a69b0
>>> clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::St
>>> mt*, 32u>&, bool) + 1088 28 clang             0x00000001098aa2f6
>>> clang::Parser::ParseForStatement(clang::ParsedAttributes&) + 2982
>>> 29 clang             0x00000001098a6ec6
>>> clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::St
>>> mt*, 32u>&, bool) + 2390 30 clang             0x00000001098ac950
>>> clang::Parser::ParseCompoundStatementBody(bool) + 1344
>>> 31 clang             0x00000001098a69b0
>>> clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::St
>>> mt*, 32u>&, bool) + 1088 32 clang             0x00000001098aa2f6
>>> clang::Parser::ParseForStatement(clang::ParsedAttributes&) + 2982
>>> 33 clang             0x00000001098a6ec6
>>> clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::St
>>> mt*, 32u>&, bool) + 2390 34 clang             0x00000001098ac950
>>> clang::Parser::ParseCompoundStatementBody(bool) + 1344
>>> 35 clang             0x00000001098adfbb
>>> clang::Parser::ParseFunctionStatementBody(clang::Decl*,
>>> clang::Parser::ParseScope&) + 171
>>> 36 clang             0x00000001098bb9b1
>>> clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
>>> clang::Parser::ParsedTemplateInfo const&) + 2241
>>> 37 clang             0x000000010986db0c
>>> clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned
>>> int, bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1020 38
>>> clang             0x00000001098bab6a
>>> clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingD
>>> eclSpec&, clang::AccessSpecifier) + 858 39 clang
>>> 0x00000001098bad69
>>> clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes
>>> &, clang::AccessSpecifier) + 393
>>> 40 clang             0x00000001098b9d1f
>>> clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWith
>>> Range&, clang::Parser::ParsingDeclSpec*) + 3295
>>> 41 clang             0x00000001098b8fc7
>>> clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) +
>>> 247
>>> 42 clang             0x0000000109863abd clang::ParseAST(clang::Sema&, bool)
>>> + 317
>>> 43 clang             0x0000000109832180
>>> clang::CodeGenAction::ExecuteAction() + 1040
>>> 44 clang             0x000000010963f42b
>>> clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 955
>>> 45 clang             0x00000001096296a5
>>> clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2789
>>> 46 clang             0x0000000109621dd3 cc1_main(char const**, char const**,
>>> char const*, void*) + 5267 47 clang             0x0000000109625adf main +
>>> 687
>>> 48 clang             0x0000000109620934 start + 52
>>> 49 clang             0x0000000000000045 start + 18446744069257164613
>>> 
>>> 
>>> Here's a reduced test case:
>>> <joe.i>
>>> 
>>> 
>>> Reproduce with:
>>> clang -Os -arch i386 -c joe.i -o /dev/null
>>> 
>>> Please take a moment to investigate.
>>> 
>>> 
>>> Regards,
>>> Chad
>>> 
>>> 
>>> 
>>> On Oct 28, 2011, at 4:37 PM, Chad Rosier wrote:
>>> 
>>> 
>>>> No problem.  Thanks for fixing promptly.
>>>> 
>>>> 
>>>> Chad
>>>> 
>>>> 
>>>> On Oct 28, 2011, at 4:30 PM, Richard Smith wrote:
>>>> 
>>>> 
>>>>> Hi Chad,
>>>>> 
>>>>> 
>>>>> Thanks for the excellent testcase! Fixed in r143250.
>>>>> 
>>>> 
>>>> _______________________________________________
>>>> cfe-commits mailing list cfe-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>> 
>>> 
>> 
>> 
> 




More information about the cfe-commits mailing list