[cfe-commits] r144347 - in /cfe/trunk: include/clang/Lex/HeaderSearch.h lib/Frontend/ASTUnit.cpp lib/Frontend/CompilerInstance.cpp lib/Lex/HeaderSearch.cpp

Matthieu Monrocq matthieu.monrocq at gmail.com
Wed Nov 16 12:16:27 PST 2011


Le 16 novembre 2011 02:14, Douglas Gregor <dgregor at apple.com> a écrit :

>
>
> Sent from my iPhone
>
> On Nov 10, 2011, at 4:58 PM, Chandler Carruth <chandlerc at google.com>
> wrote:
>
> Style nit:
>
> On Thu, Nov 10, 2011 at 4:35 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
>> +HeaderSearch::HeaderSearch(FileManager &FM, DiagnosticsEngine &Diags)
>> +  : FileMgr(FM), Diags(Diags), FrameworkMap(64)
>> +{
>>
>
> Don't the '{'s usually go on the line above?
>
>
> *sigh* I just can't do it. My editor falls over itself and dies with the
> hanging brace, making the code uneditable. I'll be happy to argue for a
> tweak to the style guide :)
>
> I'll be happy to support a style change.

I understand placing the '{' on the same line as the declaration where the
declaration uses a single line, but as soon as the declaration spans
multiple lines, it becomes difficult to differentiate the end of the
declaration from the beginning of the code block without introducing a new
line... where the '{' can be placed on its own.

--Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111116/af4d1605/attachment.html>


More information about the cfe-commits mailing list