[cfe-commits] r67999 - in /cfe/trunk: lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaOverload.cpp lib/Sema/SemaOverload.h test/SemaCXX/rval-references.cpp

Chris Lattner clattner at apple.com
Sun Mar 29 09:42:11 PDT 2009


On Mar 29, 2009, at 8:27 AM, Sebastian Redl wrote:

> Author: cornedbee
> Date: Sun Mar 29 10:27:50 2009
> New Revision: 67999
>
> URL: http://llvm.org/viewvc/llvm-project?rev=67999&view=rev
> Log:
> Reintroduce r67870 (rval ref overloading), since I can't reproduce  
> any test failures on i386 or x86_64. If this fails for someone,  
> please contact me.

This definitely causes regressions for me.  I'm seeing:

../TestRunner.sh overload-member-call.cpp
******************** TEST 'overload-member-call.cpp' FAILED!  
********************
Command:
  /Users/sabre/llvm/Debug/bin/clang-cc -fsyntax-only -verify overload- 
member-call.cpp
Incorrect Output:
Errors seen but not expected:
   Line 0: non-const lvalue reference to type 'float' cannot be  
initialized with a value of type 'int'
   Line 0: non-const lvalue reference to type 'float' cannot be  
initialized with a value of type 'int'
******************** TEST 'overload-member-call.cpp' FAILED!  
********************

  ../TestRunner.sh overloaded-operator.cpp
******************** TEST 'overloaded-operator.cpp' FAILED!  
********************
Command:
  /Users/sabre/llvm/Debug/bin/clang-cc -fsyntax-only -verify  
overloaded-operator.cpp
Incorrect Output:
Errors seen but not expected:
   Line 140: call to object of type 'struct Callable' is ambiguous
   Line 148: call to object of type 'struct Callable2' is ambiguous
Notes seen but not expected:
   Line 128: candidate function
   Line 131: candidate function
   Line 135: candidate function
   Line 136: candidate function
******************** TEST 'overloaded-operator.cpp' FAILED!  
********************

Looks like a valgrindable problem (use of uninit data):

==83650== ERROR
==83650==
==83650== Conditional jump or move depends on uninitialised value(s)
==83650==    at 0x20BADA:  
clang 
::Sema 
::CompareStandardConversionSequences(clang::StandardConversionSequence  
const&, clang::StandardConversionSequence const&)+1092 (in /Users/ 
sabre/llvm/Debug/bin/clang-cc)
==83650==    by 0x20BC3A:  
clang 
::Sema 
::CompareImplicitConversionSequences(clang::ImplicitConversionSequence  
const&, clang::ImplicitConversionSequence const&)+98 (in /Users/sabre/ 
llvm/Debug/bin/clang-cc)
==83650==    by 0x20BDAF:  
clang::Sema::isBetterOverloadCandidate(clang::OverloadCandidate  
const&, clang::OverloadCandidate const&)+293 (in /Users/sabre/llvm/ 
Debug/bin/clang-cc)
==83650==    by 0x20D79D:  
clang 
::Sema::BestViableFunction(llvm::SmallVector<clang::OverloadCandidate,  
16>&, clang::OverloadCandidate*&)+101 (in /Users/sabre/llvm/Debug/bin/ 
clang-cc)
==83650==    by 0x212311:  
clang::Sema::BuildCallToMemberFunction(clang::Scope*, clang::Expr*,  
clang::SourceLocation, clang::Expr**, unsigned,  
clang::SourceLocation*, clang::SourceLocation)+705 (in /Users/sabre/ 
llvm/Debug/bin/clang-cc)
==83650==    by 0x1D35E4: clang::Sema::ActOnCallExpr(clang::Scope*,  
clang::ASTOwningResult<&(clang::ActionBase::DeleteExpr(void*))>,  
clang::SourceLocation,  
clang::ASTMultiPtr<&(clang::ActionBase::DeleteExpr(void*))>,  
clang::SourceLocation*, clang::SourceLocation)+904 (in /Users/sabre/ 
llvm/Debug/bin/clang-cc)
==83650==    by 0x2F5F12:  
clang 
::Parser 
::ParsePostfixExpressionSuffix 
(clang::ASTOwningResult<&(clang::ActionBase::DeleteExpr(void*))>)+1676  
(in /Users/sabre/llvm/Debug/bin/clang-cc)
==83650==    by 0x2F7016: clang::Parser::ParseCastExpression(bool,  
bool)+3392 (in /Users/sabre/llvm/Debug/bin/clang-cc)
==83650==    by 0x2F9A27: clang::Parser::ParseAssignmentExpression() 
+135 (in /Users/sabre/llvm/Debug/bin/clang-cc)
==83650==    by 0x2EE83D: clang::Parser::ParseInitializer()+53 (in / 
Users/sabre/llvm/Debug/bin/clang-cc)
==83650==    by 0x2ECF81:  
clang 
::Parser 
::ParseInitDeclaratorListAfterFirstDeclarator(clang::Declarator&)+715  
(in /Users/sabre/llvm/Debug/bin/clang-cc)
==83650==    by 0x2ED6C8:  
clang::Parser::ParseSimpleDeclaration(unsigned)+244 (in /Users/sabre/ 
llvm/Debug/bin/clang-cc)

-Chris




More information about the cfe-commits mailing list