summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Added operator overloading for unary operators, post-increment, andDouglas Gregor2008-11-191-5/+5
| | | | | | | | | | | | | post-decrement, including support for generating all of the built-in operator candidates for these operators. C++ and C have different rules for the arguments to the builtin unary '+' and '-'. Implemented both variants in Sema::ActOnUnaryOp. In C++, pre-increment and pre-decrement return lvalues. Update Expr::isLvalue accordingly. llvm-svn: 59638
* remove uses of IdentifierInfo::getName()Chris Lattner2008-11-191-1/+1
| | | | llvm-svn: 59603
* Change a couple of the Parser::Diag methods to return DiagnosticInfoChris Lattner2008-11-181-4/+4
| | | | | | | | | and let the clients push whatever they want into the DiagnosticInfo instead of hard coding a few forms. Also switch various clients to use Diag(Tok, ...) instead of Diag(Tok.getLocation(), ...) as the canonical form to simplify the code a bit. llvm-svn: 59509
* Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof ↵Sebastian Redl2008-11-111-5/+8
| | | | | | expressions, both of values and types. llvm-svn: 59057
* Implement C++ 'typeid' parsing and sema.Sebastian Redl2008-11-111-1/+7
| | | | llvm-svn: 59042
* Implement support for C++ nested-name-specifiers ('foo::bar::x') in the ↵Argyrios Kyrtzidis2008-11-081-22/+17
| | | | | | | | Parser side. No Sema functionality change, just the signatures of the Action/Sema methods. llvm-svn: 58913
* Initial, rudimentary implementation of operator overloading for binaryDouglas Gregor2008-11-061-2/+2
| | | | | | | | | | | | | | | | | | operators. For example, one can now write "x + y" where x or y is a class or enumeration type, and Clang will perform overload resolution for "+" based on the overloaded operators it finds. The other kinds of overloadable operators in C++ will follow this same approach. Three major issues remain: 1) We don't find member operators 2) Since we don't have user-defined conversion operators, we can't call any of the built-in overloaded operators in C++ [over.built]. 3) Once we've done the semantic checks, we drop the overloaded operator on the floor; it doesn't get into the AST at all. llvm-svn: 58821
* Parsing, ASTs, and semantic analysis for the declaration of overloadedDouglas Gregor2008-11-061-1/+24
| | | | | | | | | operators in C++. Overloaded operators can be called directly via their operator-function-ids, e.g., "operator+(foo, bar)", but we don't yet implement the semantics of operator overloading to handle, e.g., "foo + bar". llvm-svn: 58817
* Add the remaining C++0x keywordsDouglas Gregor2008-11-061-1/+6
| | | | llvm-svn: 58802
* -Add support for cv-qualifiers after function declarators.Argyrios Kyrtzidis2008-10-241-1/+1
| | | | | | -Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier. llvm-svn: 58120
* implement a couple fixme's by implementing __extension__ properly.Chris Lattner2008-10-201-4/+2
| | | | llvm-svn: 57806
* Final phase of converting BlockDecls over to DeclContext. This is ↵Steve Naroff2008-10-101-1/+4
| | | | | | unfortunately a largish/complex diff, however it was necessry to pass all the current block tests. llvm-svn: 57337
* Handle ambiguities between expressions and type-ids that occur inside ↵Argyrios Kyrtzidis2008-10-051-1/+1
| | | | | | | | | parentheses, e.g.: sizeof(int()) -> "int()" is type-id sizeof(int()+1) -> "int()+1" is expression. llvm-svn: 57131
* Remove support for BlockExprExpr. For example...Steve Naroff2008-09-161-14/+2
| | | | | | | | ^(expression) or ^(int arg1, float arg2)(expression) ...is no longer supported. All block literals now require a compound statement. llvm-svn: 56257
* Add parser/action support for block literal expressions.Steve Naroff2008-08-281-0/+78
| | | | | | Parser support for blocks is almost complete...just need to add support for the __block() storage class qualifier. llvm-svn: 55495
* Add support for C++'s "type-specifier ( expression-list )" expression:Argyrios Kyrtzidis2008-08-221-2/+44
| | | | | | | | | | -The Parser calls a new "ActOnCXXTypeConstructExpr" action. -Sema, depending on the type and expressions number: -If the type is a class, it will treat it as a class constructor. [TODO] -If there's only one expression (i.e. "int(0.5)" ), creates a new "CXXFunctionalCastExpr" Expr node -If there are no expressions (i.e "int()" ), creates a new "CXXZeroInitValueExpr" Expr node. llvm-svn: 55177
* Fix a minor crash-on-invalid.Eli Friedman2008-08-201-1/+1
| | | | llvm-svn: 55082
* "Remove the 'else' since the code is fallthrough after it." - suggestion by ↵Argyrios Kyrtzidis2008-08-181-2/+2
| | | | | | Chris. llvm-svn: 54952
* Put (argument)-expression-list parsing in a separate function so that it can ↵Argyrios Kyrtzidis2008-08-161-14/+30
| | | | | | be re-used. llvm-svn: 54851
* C++ casts, (static_cast. dynamic_cast, etc.) can have postfix-expression pieces.Argyrios Kyrtzidis2008-08-161-1/+3
| | | | llvm-svn: 54850
* Move handling of postfix-expression suffixes out of ParseCXXThis and into ↵Argyrios Kyrtzidis2008-08-161-1/+3
| | | | | | | | ParseCastExpression. No functionality change, this follows the convention of how postfix-expressions are handled. llvm-svn: 54849
* rename PreDefinedExpr -> PredefinedExprChris Lattner2008-08-101-1/+1
| | | | llvm-svn: 54605
* Add 'this' in the comments of Parser::ParseCastExpression to indicate that ↵Argyrios Kyrtzidis2008-07-161-0/+1
| | | | | | it is handled. llvm-svn: 53665
* Simplify the parser a bit by looking at the next token without consuming it ↵Argyrios Kyrtzidis2008-07-091-63/+0
| | | | | | | | | (by Preprocessor::LookNext): -Remove ParseExpressionWithLeadingIdentifier and ParseAssignmentExprWithLeadingIdentifier. -Separate ParseLabeledStatement from ParseIdentifierStatement. llvm-svn: 53376
* Add parsing support for C++ classes.Argyrios Kyrtzidis2008-06-241-0/+2
| | | | | | | Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place. Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass. llvm-svn: 52694
* handle the full assignment-expression grammar when using an Chris Lattner2008-06-021-0/+21
| | | | | | objc message send in an initializer expression. llvm-svn: 51882
* Don't call into objc front-end when not parsing objc code. This avoidsChris Lattner2008-05-091-1/+3
| | | | | | crashes because objc types aren't set up right. llvm-svn: 50884
* Use token lookahead to simplify some code that is rarely executed.Chris Lattner2008-04-061-36/+0
| | | | | | | Since it is rare, the cost is not significant and we enjoy the simplification. llvm-svn: 49263
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-0/+1081
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. llvm-svn: 48402
OpenPOWER on IntegriCloud