http://llvm.org/bugs/show_bug.cgi?id=13596
Bug #: 13596
Summary: Recover better from missing closing braces
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Nicos-MacBook-Pro:src thakis$ cat test.cc
bool f(bool b) {
if (b) {
;
}
void g(int i, int j) {
}
Nicos-MacBook-Pro:src thakis$ third_party/llvm-build/Release+Asserts/bin/clang
-c test.cc
test.cc:6:21: error: expected ';' at end of declaration
void g(int i, int j) {
^
;
test.cc:7:2: error: expected '}'
}
^
test.cc:1:16: note: to match this '{'
bool f(bool b) {
^
2 errors generated.
If clang sees a "{" after a function declaration, chances are that before that
decl a closing brace is missing. clang should error on that and then proceed if
it was there.
(bug 7555 is somewhat related)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs