Hello, this small patch improves the diagnostic for a typo of ',' instead of ';' at the end of a statement.
% cat t.c
int foo() {
return 42,
}
Now yields the following :
% clang -fsyntax-only t.c
t.c:2:12: error: expected ';' at end of statement
return 42,
^
;
1 error generated.
Whereas it previously led to :
% clang -fsyntax-only t.c
t.c:3:1: error: expected expression
}
^
t.c:3:2: error: expected '}'
}
^
t.c:1:11: note: to match this '{'
int foo() {
^
2 errors generated.
--
Amaury de la Vieuville
Ahmed Bougacha
PR7606.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
