[PATCH] Add diagnostic capabilities in LLVM (frontend part)
Quentin Colombet
qcolombet at apple.com
Tue Dec 17 16:30:51 PST 2013
I have created a phabricator for this:
http://llvm-reviews.chandlerc.com/D2430
We can continue the discussion here.
On Dec 17, 2013, at 4:17 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> On Tue, Dec 17, 2013 at 4:15 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>> Hi Hal,
>>
>> Thanks for you feedbacks.
>>
>> On Dec 17, 2013, at 3:53 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>>
>> Hi Quentin,
>>
>> Any reason you did not use phabricator for this patch?
>>
>> I thought it was trivial enough not to require a phabricator.
>>
>>
>> +def BackendInlineAsm : DiagGroup<"backend-inline-asm">;
>>
>> +def BackendStackSize : DiagGroup<"backend-stack-size">;
>>
>> +def BackendPlugin : DiagGroup<"backend-plugin">;
>>
>> Are these group names user-visible?
>>
>> I think they are. At least, I get this name when a warning is issued:
>> warning: stack size exceeded (168) in main [-Wbackend-stack-size]
>> 1 warning generated.
>>
>> If they are, do we want "backend" in the name?
>>
>> I do not have any strong opinion on that.
>> This prefix makes it clear that these diagnostics are issued by the backend.
>> I thought it may be useful to have a naming convention for those.
>
> At least for built-in diagnostics, inline-asm and stack-size, users
> don't really care which part of the compiler produces the diagnostic.
> Also, which flag does GCC use for these? We should be compatible if
> possible.
The stack size more or less matches this warning in GCC:
-Wframe-larger-than=<limit>
Though we do not have a way to reproduce that behavior in clang at the moment, see the Missing Points.
For inline asm, I do not know what GCC has.
-Quentin
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list