LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 4296 - Add parser detection/error recovery for nested functions
Summary: Add parser detection/error recovery for nested functions
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: Frontend (show other bugs)
Version: unspecified
Hardware: PC Linux
: P normal
Assignee: Serge Pavlov
URL:
Keywords:
: 5324 9260 10885 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-02 03:16 PDT by Eli Friedman
Modified: 2013-04-16 11:02 PDT (History)
8 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eli Friedman 2009-06-02 03:16:48 PDT
Even if clang never ends up supporting nested functions, it would be nice if we could detect what's going on and give an easily recognizable error message.  Currently, it gives "expected ';' at end of declaration", which isn't obvious without going in and looking at the file in question.
Comment 1 Daniel Dunbar 2009-06-02 11:18:55 PDT
Related:
<rdar://problem/6880357> improve parse failure with nested functions and "missing }"
Comment 2 Anton Korobeynikov 2011-02-19 05:44:00 PST
*** Bug 9260 has been marked as a duplicate of this bug. ***
Comment 3 Elias Pipping 2011-07-17 12:32:53 PDT
*** Bug 5324 has been marked as a duplicate of this bug. ***
Comment 4 Eli Friedman 2011-09-07 18:20:58 PDT
*** Bug 10885 has been marked as a duplicate of this bug. ***
Comment 5 Douglas Gregor 2013-04-16 11:02:57 PDT
Fixed in r179603