I'm using clang 2.7.
I've been enjoying clang's great diagnostics.
So I was surprised by this one below.
Can you please add the line number of the matching open curly
for the expected close curly (in this case line 2)?
Thanks,
Glenn
gkasten$ cat test.c
int test(void)
{
int i;
$ clang test.c
test.c:3:7: error: expected '}'
int i;
^
1 diagnostic generated.
$
I'm using clang 2.7.
I've been enjoying clang's great diagnostics.
So I was surprised by this one below.
Can you please add the line number of the matching open curly
for the expected close curly (in this case line 2)?
You're right that the compiler doesn't know what you meant... the idea of pointing out the opening braces is so that *you* know what the compiler is "thinking".
In any case, it's the right thing to do for consistency with other diagnostics in clang.