[cfe-commits] [patch][pr11822] Error on mismatched #pragma GCC visibility push/pop

Richard Smith richard at metafoo.co.uk
Mon Jan 30 11:11:24 PST 2012


2012/1/30 Rafael EspĂ­ndola <rafael.espindola at gmail.com>

> 2012/1/30 Rafael EspĂ­ndola <rafael.espindola at gmail.com>:
> >> Is it possible to error on the #prama, even when diagnosing the case
> about
> >> the namespace end? That would be ideal...
> >
> > Not sure what you mean. We do error on:
>
> I think I figured it out. You want the error to be in the pragma line
> and the note to point to the end of the namespace, right?
>
> The attached patch implements this. Let me know what do you think.
>

I think we could be more explicit that the problem is caused by the
namespace having a visibility attribute. Possible wording for the three
cases:

error: #pragma visibility push with no matching #pragma visibility pop
note: surrounding namespace with visibility attribute ends here

error: #pragma visibility pop with no matching #pragma visibility push
note: surrounding namespace with visibility attribute starts here

error: #pragma visibility pop with no matching #pragma visibility push

- Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120130/9ca6f7cc/attachment.html>


More information about the cfe-commits mailing list