http://llvm.org/bugs/show_bug.cgi?id=10107
Enea Zaffanella <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |[email protected] Resolution|INVALID | --- Comment #3 from Enea Zaffanella <[email protected]> 2012-01-11 13:35:43 CST --- As of r147790, clang still crashes on the following line of code, if -W[no-]address-of-temporary is used: $ cat bug.cc int (*pa)[1] = &(int[]) { 1 }; $ clang++ -c bug.cc bug.cc:1:16: error: taking the address of a temporary object of type 'int [1]' [-Waddress-of-temporary] int (*pa)[1] = &(int[]) { 1 }; ^~~~~~~~~~~~~~ 1 error generated. $ clang++ -Waddress-of-temporary -c bug.cc bug.cc:1:16: warning: taking the address of a temporary object of type 'int [1]' [-Waddress-of-temporary] int (*pa)[1] = &(int[]) { 1 }; ^~~~~~~~~~~~~~ clang: <path>/tools/clang/lib/AST/ExprConstant.cpp:2479: bool EvaluateLValue(const clang::Expr*, <unnamed>::LValue&, <unnamed>::EvalInfo&): Assertion `(E->isGLValue() || E->getType()->isFunctionType() || E->getType()->isVoidType() || isa<CXXTemporaryObjectExpr>(E)) && "can't evaluate expression as an lvalue"' failed. [...] -- Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email ------- 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
