[cfe-commits] r141971 - in /cfe/trunk: include/clang/AST/ lib/AST/ lib/Frontend/ lib/Index/ lib/Sema/ lib/StaticAnalyzer/Checkers/ lib/StaticAnalyzer/Core/ lib/StaticAnalyzer/Frontend/ tools/libclang/

Benjamin Kramer benny.kra at googlemail.com
Sat Oct 15 02:55:33 PDT 2011


On 15.10.2011, at 01:10, Richard Smith wrote:

> On Fri, October 14, 2011 19:45, Benjamin Kramer wrote:
>> Author: d0k
>> Date: Fri Oct 14 13:45:37 2011
>> New Revision: 141971
>> 
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=141971&view=rev
>> Log:
>> Change operator<< for raw_ostream and NamedDecl to take a reference instead of
>> a pointer.
>> 
>> Passing a pointer was a bad idea as it collides with the overload for void*.
> 
> This changes behavior for code which used the existing overload, and silently
> breaks out-of-tree projects using clang (as well as work-in-progress changes
> for in-tree developers). Can you add the declaration of the removed overload
> back in (with no definition) so the error at least shows up at link time?

Feel free to add it if you think it's necessary, however we have this kind of (silently) breaking
APIs all the time in LLVM & clang, and we don't want to add compatibility stubs everywhere.

Using a pointer here was a mistake when I added the overload about a year ago, sorry for any
inconvenience caused by that.

- Ben





More information about the cfe-commits mailing list