On Jan 23, 2012, at 9:27 AM, Chandler Carruth wrote:

> On Mon, Jan 23, 2012 at 8:58 AM, Argyrios Kyrtzidis <[email protected]> wrote:
> Improve Lexer::getImmediateMacroName to take into account inner macros
> of macro arguments.
> 
> For "MAC1( MAC2(foo) )" and location of 'foo' token it would return
> "MAC1" instead of "MAC2".
> 
> This comment, and the comment on the static helper in the DiagnosticRenderer 
> are at odds... which one is it that returns MAC2 and which one MAC1?

On the above message, I say what Lexer::getImmediateMacroName did *before* the 
commit. On code comments I say what it does now.
Lexer::getImmediateMacroName will return "MAC2"
the static helper in DiagnosticRenderer will return "MAC1"

> 
> It would be good (i think) to call only one of them "immediate", the one 
> returning MAC2.

This or see if DiagnosticRenderer can use the Lexer one.

> 
> Does this impact diagnostic output in any way? If so could you include a 
> testcase that demonstrates that impact?

DiagnosticRenderer was dependent on the previous behavior, 
test/Misc/caret-diags-macros.c would fail; just change the DiagnosticRenderer 
to use the Lexer one and you'll see.

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to