summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement C++ 'typeid' parsing and sema.Sebastian Redl2008-11-111-0/+13
| | | | llvm-svn: 59042
* Fix PR3031 by silencing follow-on errors in invalid declarations.Chris Lattner2008-11-111-0/+4
| | | | llvm-svn: 59027
* Update C++ status to reflect parser capabilities for chapter 9 (classes). ↵Sebastian Redl2008-11-081-1/+9
| | | | | | Slightly extend the class parser test. llvm-svn: 58909
* "One" line fix for -parse-noop failure, "id" and several other thingsDaniel Dunbar2008-10-311-0/+4
| | | | | | | | were being treated as type names for non-Objective-C files. - Other lines are just because MinimalAction didn't have access to the LangOptions. llvm-svn: 58498
* Implement initialization of a reference (C++ [dcl.init.ref]) as partDouglas Gregor2008-10-291-3/+5
| | | | | | | | | | | | | | | | | | | of copy initialization. Other pieces of the puzzle: - Try/Perform-ImplicitConversion now handles implicit conversions that don't involve references. - Try/Perform-CopyInitialization uses CheckSingleAssignmentConstraints for C. PerformCopyInitialization is now used for all argument passing and returning values from a function. - Diagnose errors with declaring references and const values without an initializer. (Uses a new Action callback, ActOnUninitializedDecl). We do not yet have implicit conversion sequences for reference binding, which means that we don't have any overloading support for reference parameters yet. llvm-svn: 58353
* implement some more FIXMEs, by rejecting more bogus stuff inChris Lattner2008-10-261-1/+16
| | | | | | objc mode. llvm-svn: 58216
* add some simple designator testcases. Reject things like this:Chris Lattner2008-10-261-0/+17
| | | | | | | | | | | 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. llvm-svn: 58215
* Support attributes in *yet another* place. Is there any place you Chris Lattner2008-10-201-0/+12
| | | | | | can't stick an attributes? llvm-svn: 57795
* Fix a parser bug where we let attributes interfere with our disambiguationChris Lattner2008-10-201-4/+43
| | | | | | | | | | | | | | | | | | | of whether a '(' was a grouping paren or the start of a function declarator. This is PR2796. Now we eat the attribute before deciding whether the paren is grouping or not, then apply it to the resultant decl or to the first argument as needed. One somewhat surprising aspect of this is that attributes interact with implicit int in cases like this: void a(x, y) // k&r style function void b(__attribute__(()) x, y); // function with two implicit int arguments void c(x, __attribute__(()) y); // error, can't have attr in identifier list. Fun stuff. llvm-svn: 57790
* Allow variadic arguments without named ones for C++, e.g. "void(...);"Argyrios Kyrtzidis2008-10-061-0/+5
| | | | llvm-svn: 57143
* De-XFAIL test/Parser/pragma-pack.cDaniel Dunbar2008-10-041-3/+2
| | | | llvm-svn: 57069
* Move the expected-warning lines to a place that clang -verify will pick themChris Lattner2008-10-041-13/+16
| | | | | | | up. Speculatularly hacktastic, but strangely beautiful? Daniel, lines 20/21 are rejected, please investigate. llvm-svn: 57067
* Add Parser support for #pragma packDaniel Dunbar2008-10-041-0/+30
| | | | | | | - Uses Action::ActOnPragmaPack - Test case is XFAIL pending verifier fixes. llvm-svn: 57066
* Parser support for prefix __attribute__ on @protocol.Daniel Dunbar2008-09-262-1/+10
| | | | llvm-svn: 56642
* Fix rdar://6222856: the receiver of a message expr is anChris Lattner2008-09-191-0/+5
| | | | | | | arbitrary expr, not just a assign expr. The grammar comment was right, the code was just wrong. llvm-svn: 56353
* Fix test case.Argyrios Kyrtzidis2008-09-091-1/+1
| | | | llvm-svn: 56012
* Implement parser support for the 'condition' part of C++ ↵Argyrios Kyrtzidis2008-09-091-0/+11
| | | | | | | | selection-statements and iteration-statements (if/switch/while/for). Add new 'ActOnCXXConditionDeclarationExpr' action, called when the 'condition' is a declaration instead of an expression. llvm-svn: 56007
* Support "typeof unary-expression" (GNU C++ extension).Argyrios Kyrtzidis2008-09-051-0/+7
| | | | llvm-svn: 55833
* Pull code from last commit. will put back soon.Steve Naroff2008-09-021-1/+2
| | | | llvm-svn: 55637
* Implement block pseudo-storage class modifiers (__block, __byref).Steve Naroff2008-09-021-0/+18
| | | | llvm-svn: 55635
* Add parser/action support for block literal expressions.Steve Naroff2008-08-281-2/+10
| | | | | | Parser support for blocks is almost complete...just need to add support for the __block() storage class qualifier. llvm-svn: 55495
* First wave of changes to support "blocks" (an extension to C).Steve Naroff2008-08-271-0/+18
| | | | | | This commit adds the declaration syntax (and associated type). llvm-svn: 55417
* Fix a minor crash-on-invalid.Eli Friedman2008-08-201-0/+9
| | | | llvm-svn: 55082
* C++ casts, (static_cast. dynamic_cast, etc.) can have postfix-expression pieces.Argyrios Kyrtzidis2008-08-161-0/+5
| | | | llvm-svn: 54850
* continue cleaning up code, and disable sending a message directly to anChris Lattner2008-07-211-2/+5
| | | | | | | | | | | | interface. This fixes a bug where we used to accept: void test2(NSNumber x) { [x METH]; } which doesn't make sense and GCC rejects. llvm-svn: 53841
* Handle unnamed bitfields when parsing C++ classes.Argyrios Kyrtzidis2008-06-281-0/+1
| | | | llvm-svn: 52855
* Add parsing support for C++ classes.Argyrios Kyrtzidis2008-06-241-0/+19
| | | | | | | 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
* "this patch adds code generation hooks for Objective-C constant strings. It ↵Chris Lattner2008-06-211-2/+1
| | | | | | | | also modifies Sema so that Objective-C constant strings are treated as untyped objects if the interface for the constant string class can not be found. This is consistent with Apple GCC. I thought it was consistent with GNU GCC, since this was causing failures when trying to compile GNUstep with (GNU) GCC, but it appears that this is not the case when attempting to produce a simple test case to demonstrate it. Possibly there is a way of making the error go away, but I haven't found out what it is yet." Patch by David Chisnall! llvm-svn: 52599
* Multiple tests in a single test file must be linked with '&&'.Argyrios Kyrtzidis2008-06-122-2/+2
| | | | | | Otherwise, failing tests other than the last one will not be reported. llvm-svn: 52231
* handle the full assignment-expression grammar when using an Chris Lattner2008-06-021-0/+6
| | | | | | objc message send in an initializer expression. llvm-svn: 51882
* Fix a couple crashes on invalid input.Chris Lattner2008-05-271-0/+5
| | | | llvm-svn: 51622
* Change diagnostic per suggestion, to make it a bit clearer what is Eli Friedman2008-05-271-2/+2
| | | | | | happening. llvm-svn: 51574
* fix typoGabor Greif2008-05-231-3/+3
| | | | llvm-svn: 51479
* Test from PR2332; bug already fixed by r51311.Eli Friedman2008-05-201-0/+2
| | | | llvm-svn: 51316
* Fix the scope of K&R-style argument declarations so that they don't Eli Friedman2008-05-201-0/+5
| | | | | | | | | extend beyond the end of the function. I'm not completely sure this is the right way to fix this bug, so someone familiar with the parser should double-check. llvm-svn: 51311
* Extend vector member references to include {.hi, .lo, .e, .o} which return aNate Begeman2008-05-091-2/+1
| | | | | | | | | | | | | vector of the same element type and half the width, with the high, low, even, and odd elements respectively. Allow member references to member references, so that .hi.hi gives you the high quarter of a vector. This is fairly convenient syntax for some insert/extract operations. Remove some unnecessary methods/types in the ExtVectorElementExpr class. llvm-svn: 50892
* Two improvements to initializer parsing:Chris Lattner2008-04-201-0/+8
| | | | | | | | 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. llvm-svn: 49998
* OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.Nate Begeman2008-04-181-3/+3
| | | | llvm-svn: 49942
* reject 'int test(x, x) int x; {}'Chris Lattner2008-04-061-0/+2
| | | | llvm-svn: 49271
* reject 'typedef int y; int test(x, y)'.Chris Lattner2008-04-061-0/+4
| | | | llvm-svn: 49270
* Fix handling of implicit int, resolving PR2012 and reverting (andChris Lattner2008-04-051-1/+1
| | | | | | subsuming) my patch for PR1999. llvm-svn: 49251
* implement simple support for arbitrary token lookahead. Change the Chris Lattner2008-03-101-2/+5
| | | | | | | | objc @try parser to use it, fixing a FIXME. Update the objc-try-catch-1.m file to pass now that we get more reasonable errors. llvm-svn: 48129
* Remove the first layer of support for "portability" warnings. This is Chris Lattner2008-03-051-5/+0
| | | | | | | | | | | | | | | theoretically useful, but not useful in practice. It adds a bunch of complexity, and not much value. It's best to nuke it. One big advantage is that it means the target interfaces will soon lose their SLoc arguments and target queries can never emit diagnostics anymore (yay). Removing this also simplifies some of the core preprocessor which should make it slightly faster. Ted, I didn't simplify TripleProcessor, which can now have at most one triple, and can probably just be removed. Please poke at it when you have time. llvm-svn: 47930
* Fix PR2042. One remaining issue: we don't currently diagnoseChris Lattner2008-02-171-1/+1
| | | | | | | | | int foobar(int); int foobar() {} which requires ifdef'ing out a testcase in predefined-function.c. llvm-svn: 47236
* Fix PR1999, by emitting a hard error only if an argument declarator is ↵Chris Lattner2008-02-101-2/+2
| | | | | | | | | completely missing. Otherwise, it is an implicit int case, which is valid in c90 and invalid elsewhere, but accepted as an extension. llvm-svn: 46938
* Behave correctly if a constraint expression is invalid.Anders Carlsson2008-02-091-0/+5
| | | | llvm-svn: 46910
* Fix Parser::ParseObjCTryStmt() to allow for trailing @-keyword ↵Steve Naroff2008-02-051-0/+10
| | | | | | | | statements/expressions. This bug fix is the result of not having 2-token lookahead to recognize specific @-keywords. llvm-svn: 46768
* make some diagnostics more terse, update testcases.Chris Lattner2008-02-012-5/+5
| | | | | | | | | | Fix Sema::ActOnInstanceMessage to correctly do things in terms of canonical types, fixing bogus errors like: NSDistantObject.m:10383:120: error: bad receiver type 'typeof((id<NSMutableCopying>)self)' id mess = ({ id __inv__ = ((void *)0); id __mb__ = _NSMessageBuilder((id <NSMutableCopying>)self, &__inv__); (void)[(__typeof__((id <NSMutableCopying>)self))__mb__ mutableCopyWithZone:((void *)0)]; if (!objc_collecting_enabled()) object_dispose(__mb__); __inv__; }); llvm-svn: 46633
* Fix PR1965: missing diagnostics for parameters that are missingChris Lattner2008-01-311-1/+1
| | | | | | | type specifiers. This required updating some (buggy) tests, and the testcase was previously accidentally committed. llvm-svn: 46603
* Add support for dispatching an objc message to a variable Chris Lattner2008-01-251-2/+6
| | | | | | in an initializer list. llvm-svn: 46367
OpenPOWER on IntegriCloud