aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseInit.cpp
AgeCommit message (Collapse)Author
2008-12-10Modify the move emulation according to the excellent design of Howard ↵Sebastian Redl
Hinnant. Makes for much nicer syntax when smart pointers are used consistently. Also, start converting internal argument passing of Parser to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60809 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09Kick out the proof-of-concept ASTOwner and replace it with ASTOwningResultSebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60791 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09Consistently use smart pointers for stmt and expr nodes in parser local ↵Sebastian Redl
variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60761 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25Use RAII objects to ensure proper destruction of expression and statement ↵Sebastian Redl
AST nodes in the parser in most cases, even on error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60057 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19Fix <rdar://problem/6150376> [sema] crash on invalid message send.Steve Naroff
The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59639 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03Fix PR3001: if we have an error parsing an initializer, make sure to removeChris Lattner
the designator corresponding to it, otherwise Sema and later parsing will get confused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58603 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26pass designators into sema. This completes parser-level designatorChris Lattner
support as far as I know. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58217 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26implement some more FIXMEs, by rejecting more bogus stuff inChris Lattner
objc mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58216 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26add some simple designator testcases. Reject things like this:Chris Lattner
struct foo Y[10] = { [4] .arr [2] 4 // expected-error {{expected '=' or another designator}} }; because the "missing equals" extension only is valid if there is exactly one array designator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58215 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26improve comments, build array and array range designator nodes, Chris Lattner
fix an obscure memory leak. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58213 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26improve comments, build a Designation for field designators andChris Lattner
improve diagnostic for a malformed field designator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58212 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26restructure ParseInitializerWithPotentialDesignator to make itChris Lattner
easier to understand and hack on, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58210 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26improve MayBeDesignationStart to do the entire determination Chris Lattner
about whether a leading identifier is a designator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58207 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26inline the decision logic that chooses between an assign expr and braceChris Lattner
initializer, avoiding an extra level of calls for silly things like 'int x = 4'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58206 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26This patch continues parser-level implementation of designators:Chris Lattner
1. It introduces new parser level abstractions for designators that are used to communicate between parser and sema. 2. This fixes a FIXME where "identifier ':'" was considered to be a designator even if it wasn't the first in a designator list. 3. In the "identifier ':'" case, it actually builds the designator representation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58205 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26minor cleanupsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58203 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09Simplify the parser a bit by looking at the next token without consuming it ↵Argyrios Kyrtzidis
(by Preprocessor::LookNext): -Remove ParseExpressionWithLeadingIdentifier and ParseAssignmentExprWithLeadingIdentifier. -Separate ParseLabeledStatement from ParseIdentifierStatement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53376 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-02handle the full assignment-expression grammar when using an Chris Lattner
objc message send in an initializer expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51882 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20Two improvements to initializer parsing:Chris Lattner
1. If we hit a semantic error, try harder to recover to emit diagnostics for later initializer errors (PR2241). 2. Don't leak parsed initializers on an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49998 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8