[llvm-commits] [llvm] r76723 - /llvm/trunk/docs/CodingStandards.html

Chris Lattner clattner at apple.com
Wed Jul 22 09:55:20 PDT 2009


On Jul 22, 2009, at 9:35 AM, Daniel Dunbar wrote:
> Thanks!

Thanks, I changed the wording problems.

>> <div class="doc_code">
>>  <pre>
>> -std::cout << std::endl;
>> -std::cout << '\n' << std::flush;
>> +/// SomeCrazyThing - This namespace contains flags for ...
>> +namespace SomeCrazyThing {
>> +  enum foo {
>
> This in itself is frequently bad style, because such enumerations can
> usually be tied to a class, with a shorter type name & less namespace
> pollution. Sure, we need them once in a while, but its not a common
> case.

I changed the example to be more real.  Using a namespace for enums  
makes sense if they are (e.g.) global to a target and the namespace  
contains a bunch of other stuff.

I'll respond to your other points separately,

-Chris




More information about the llvm-commits mailing list