[cfe-commits] [patch][PR11797] Call ActOnFinishNamespaceDef before consumeClose

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Thu Jan 19 18:34:18 PST 2012


The attached patch fixes PR11797. The problem is that
Tracker.consumeClose will check what is after the '}'. If it is a
#pragma, it will be handled before ActOnFinishNamespaceDef.

This caused Sema to view the testcase in the PR as

namespace std __attribute__ ((__visibility__ ("default"))) {
#pragma GCC visibility push(default)
}
void foo()  {
}
#pragma GCC visibility pop

This patch swaps the order of the calls, which unfortunately means that
we now have to call setRBraceLoc from outside Sema::ActOnFinishNamespaceDef.

Is the patch OK?

Cheers,
Rafael

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr11797.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120119/a8ec6e53/attachment.ksh>


More information about the cfe-commits mailing list