[cfe-dev] c++ templates
Chris Lattner
clattner at apple.com
Thu Nov 13 18:34:27 PST 2008
On Nov 13, 2008, at 6:25 PM, Doug Gregor wrote:
> +#include <iostream>
> +
>
> I know it's just for debugging, but we're moving away from using
> iostreams for anything in Clang.
Yep, please use [f]printf, or one of the other streams. <iostream>
adds a static ctor to the file it is included in, so it is
particularly evil. Here are some more thoughts on the matter:
http://llvm.org/docs/CodingStandards.html#ll_iostream
that said, it is probably better to just use raw_ostream with:
llvm::outs() << foo << bar;
-Chris
More information about the cfe-dev
mailing list