[cfe-dev] line number of matching curly

Niklas Angare li51ckf02 at sneakemail.com
Wed Sep 8 17:49:56 PDT 2010


"Chris Lattner" wrote:
> On Aug 31, 2010, at 4:57 PM, Glenn Kasten wrote:
>
>> Can you please add the line number of the matching open curly
>> for the expected close curly (in this case line 2)?
>
> Makes sense, fixed in r112709.  Thanks,

Sorry to barge in, but I'm wondering what the likelihood is of the compiler 
actually pointing to the correct left brace.

I'm pretty sure it will point to the wrong one in this case:

void test(int i)
{
	if(i > 3)
	{
		i *= 2;
	//} <-- missing brace

	fudge(i);
}

If it points to the incorrect one a lot of times I'd say it does more harm 
than good.

Regards

Niklas Angare
 





More information about the cfe-dev mailing list