[LLVMbugs] Incorrect return types for Statistic operators
    Chris Lattner 
    sabre at nondot.org
       
    Wed Oct 30 18:58:10 PST 2002
    
    
  
> The lvalue-returning Statistic<> operators (e.g., ++, =, +=, -=) should
> return a reference to *this, not a reference to the contained Data value.
Good point.  They should return const references, to disallow bizarre
things like:  (A += B) = C;
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20021028/001167.html
Thanks again for the patch!
-Chris
-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/
    
    
More information about the llvm-bugs
mailing list