[cfe-dev] Pushable #pragma diagnostics

Chris Lattner clattner at apple.com
Sun Jul 12 14:22:51 PDT 2009


On Jul 11, 2009, at 11:01 AM, Louis Gerbarg wrote:
>> * Why make DiagMappings be a vector instead of an array here?
>> -  mutable unsigned char DiagMappings[diag::DIAG_UPPER_LIMIT/2];
>> -
>> +
>> +  typedef std::vector<unsigned char> DiagMappings;
>> +  mutable std::vector<DiagMappings> DiagMappingsStack;
>
> I assume you mean C array's and not std:tr1:array?

Right.

> wrap up the C array into a class that STL could cope with anyway. IOW,
> I did it because:
>
> std::vector<unsigned char> BlankDiags(diag::DIAG_UPPER_LIMIT/2, 0);
> DiagMappingsStack.push_back(BlankDiags);

Ah, ok.

>> * Mega bonus points for describing how the existing and new stuff  
>> works in
>> docs/UserManual.html#diagnostics
>
> Done, separate patch attached. I reorganized the diagnostic section a
> bit, and now you can see the horror that is my HTMLFu ;-)

Totally awesome, applied here:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090706/018924.html
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090706/018925.html

Thanks Louis!

-Chris



More information about the cfe-dev mailing list