summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser
Commit message (Collapse)AuthorAgeFilesLines
...
* Add svn:eol-style=native to some filesCedric Venet2009-02-142-16/+16
| | | | | | Correct two files with inconsistent lines endings. llvm-svn: 64564
* Fix capitalization in a diagnosticDouglas Gregor2009-02-131-1/+1
| | | | llvm-svn: 64472
* Turn warning into error. Minor incompatibility with GCC (for scalar types, ↵Steve Naroff2009-02-121-1/+1
| | | | | | GCC only produces a warning). llvm-svn: 64375
* Fix <rdar://problem/6206858> [sema] type check @throw statements.Steve Naroff2009-02-111-1/+1
| | | | | | Added a FIXME to handle 'rethrow' check. llvm-svn: 64308
* Implement parsing, semantic analysis and ASTs for default templateDouglas Gregor2009-02-101-2/+2
| | | | | | | | | arguments. This commit covers checking and merging default template arguments from previous declarations, but it does not cover the actual use of default template arguments when naming class template specializations. llvm-svn: 64229
* Semantic checking for class template declarations andDouglas Gregor2009-02-061-1/+1
| | | | | | | | | | | | | | | redeclarations. For example, checks that a class template redeclaration has the same template parameters as previous declarations. Detangled class-template checking from ActOnTag, whose logic was getting rather convoluted because it tried to handle C, C++, and C++ template semantics in one shot. Made some inroads toward eliminating extraneous "declaration does not declare anything" errors by adding an "error" type specifier. llvm-svn: 63973
* Basic representation of C++ class templates, from Andrew Sutton.Douglas Gregor2009-02-041-3/+3
| | | | llvm-svn: 63750
* Fix for PR3418: make sure to handle the RHS of expressions starting with Eli Friedman2009-01-271-0/+4
| | | | | | __extension__. This sort of construct shows up in the gcc source code. llvm-svn: 63100
* Centralize error reporting of improper uses of incomplete types in theDouglas Gregor2009-01-191-1/+1
| | | | | | | | | | new DiagnoseIncompleteType. It provides additional information about struct/class/union/enum types when possible, either by pointing to the forward declaration of that type or by pointing to the definition (if we're in the process of defining that type). Fixes <rdar://problem/6500531>. llvm-svn: 62521
* Update support for vector component access on ExtVectors.Nate Begeman2009-01-181-28/+0
| | | | llvm-svn: 62440
* Diagnose that property name cannot be a bitfieldFariborz Jahanian2009-01-171-0/+12
| | | | llvm-svn: 62432
* Catch a foreach parse error.Fariborz Jahanian2009-01-171-0/+7
| | | | llvm-svn: 62382
* Refactor name lookup.Douglas Gregor2009-01-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change refactors and cleans up our handling of name lookup with LookupDecl. There are several aspects to this refactoring: - The criteria for name lookup is now encapsulated into the class LookupCriteria, which replaces the hideous set of boolean values that LookupDecl currently has. - The results of name lookup are returned in a new class LookupResult, which can lazily build OverloadedFunctionDecls for overloaded function sets (and, eventually, eliminate the need to allocate member for OverloadedFunctionDecls) and contains a placeholder for handling ambiguous name lookup (for C++). - The primary entry points for name lookup are now LookupName (for unqualified name lookup) and LookupQualifiedName (for qualified name lookup). There is also a convenience function LookupParsedName that handles qualified/unqualified name lookup when given a scope specifier. Together, these routines are meant to gradually replace the kludgy LookupDecl, but this won't happen until after we have base class lookup (which forces us to cope with ambiguities). - Documented the heck out of name lookup. Experimenting a little with using Doxygen's member groups to make some sense of the Sema class. Feedback welcome! - Fixes some lingering issues with name lookup for nested-name-specifiers, which now goes through LookupName/LookupQualifiedName. llvm-svn: 62245
* Implement support for anonymous structs and unions in C. Both C andDouglas Gregor2009-01-121-1/+1
| | | | | | | | | | | | | | C++ handle anonymous structs/unions in the same way. Addresses several bugs: <rdar://problem/6259534> <rdar://problem/6481130> <rdar://problem/6483159> The test case in PR clang/1750 now passes with -fsyntax-only, but CodeGen for inline assembler still fails. llvm-svn: 62112
* Allow multiple Microsoft calling-convention keywords. Fixes ↵Douglas Gregor2009-01-101-0/+2
| | | | | | rdar://problem/6486133 llvm-svn: 62018
* Fix rdar://6480479 - [parser] infinite loop on invalid inputChris Lattner2009-01-091-0/+6
| | | | llvm-svn: 61975
* Another tweak to handle the MS extensions (<rdar://problem/5956221>).Steve Naroff2009-01-061-0/+5
| | | | llvm-svn: 61821
* Fix <rdar://problem/5956221> clang ObjC rewriter: Microsoft-specific ↵Steve Naroff2009-01-061-1/+1
| | | | | | | | __fastcall keyword unrecognized. This fix is C++ specific. llvm-svn: 61816
* - Various comment typo fixes in Sema.hChris Lattner2009-01-061-1/+2
| | | | | | | | | - Simplify ParseDeclCXX to use early exit on error instead of nesting. - Change ParseDeclCXX to using the 'skip on error' form of ExpectAndConsume. - If we don't see the ; in a using directive, still call the action, for hopefully better error recovery. llvm-svn: 61801
* rename these tests to match the attribute.Chris Lattner2009-01-051-0/+0
| | | | llvm-svn: 61770
* Parser support for C++ using directives, from Piotr RakDouglas Gregor2008-12-301-0/+32
| | | | llvm-svn: 61486
* Diagnose declarations that don't declare anything, and fix PR3020.Sebastian Redl2008-12-281-4/+6
| | | | | | | | Examples: int; typedef int; llvm-svn: 61454
* Add parser support for __forceinline, __w64, __ptr64.Steve Naroff2008-12-251-0/+15
| | | | llvm-svn: 61431
* Add parser support for __cdecl, __stdcall, and __fastcall.Steve Naroff2008-12-251-0/+8
| | | | | | Change preprocessor implementation of _cdecl to reference __cdecl. llvm-svn: 61430
* Keep track of template arguments when we parse them. Right now, we don't ↵Douglas Gregor2008-12-241-1/+2
| | | | | | actually do anything with the template arguments, but they'll be used to create template declarations llvm-svn: 61413
* Parser support for C++ try-catch.Sebastian Redl2008-12-211-0/+25
| | | | llvm-svn: 61312
* Merge function-return.c into function.cChris Lattner2008-12-181-1/+1
| | | | | | | Fix PR2790 by making a warning an EXTWARN instead of EXTENSION. Add a new EXTENSION warning for "return (some void expression);" llvm-svn: 61187
* implement PR3177 - "__extension__ union" not supported in C++ modeChris Lattner2008-12-181-0/+9
| | | | llvm-svn: 61180
* Oops, accidentally commited the wrong version of the test (original Eli Friedman2008-12-171-1/+1
| | | | | | commit r61160). llvm-svn: 61162
* Do proper recovery from an invalid switch condiition. Fixes PR3229.Eli Friedman2008-12-171-0/+3
| | | | llvm-svn: 61160
* diagnose C99 6.9.1p5, C arguments in definitions that are lackingChris Lattner2008-12-171-1/+1
| | | | | | a name. This implements PR3208. llvm-svn: 61127
* fix a buggy fall through that caused a crash-on-invalid. rdar://6248081Chris Lattner2008-12-121-1/+7
| | | | llvm-svn: 60961
* rename recovery-3 to recovery.cChris Lattner2008-12-121-0/+0
| | | | llvm-svn: 60931
* merge recovery-1 into recovery-3.Chris Lattner2008-12-122-16/+15
| | | | llvm-svn: 60930
* merge recovery-2.c into recovery-3.c.Chris Lattner2008-12-122-8/+32
| | | | | | | | | | Substantially improve error recovery after broken if conditions by parsing the full if when we have a semantic error instead of using parser recovery techniques to recover from a semantic error. This fixes rdar://6094870 - spurious error after invalid 'if' condition llvm-svn: 60929
* Fix PR3172: if we see an eof or } at the top level, reject it.Chris Lattner2008-12-081-0/+5
| | | | | | | This is important because ParseDeclarationOrFunctionDefinition skips to, but does not consume, an } on error. llvm-svn: 60719
* Improve VLA diagnostics/sema checking. Fixes PR2361 and PR2352.Anders Carlsson2008-12-071-2/+2
| | | | llvm-svn: 60638
* Representation of template type parameters and non-type templateDouglas Gregor2008-12-051-1/+25
| | | | | | | | | | | | | | | parameters, with some semantic analysis: - Template parameters are introduced into template parameter scope - Complain about template parameter shadowing (except in Microsoft mode) Note that we leak template parameter declarations like crazy, a problem we'll remedy once we actually create proper declarations for templates. Next up: dependent types and value-dependent/type-dependent expressions. llvm-svn: 60597
* instead of forcing blocks on by default, make them default to off, but letChris Lattner2008-12-041-1/+1
| | | | | | | | specific targets default them to on. Default blocks to on on 10.6 and later. Add a -fblocks option that allows the user to override the target's default. Use -fblocks in the various testcases that use blocks. llvm-svn: 60563
* A little more scaffolding for parsing templates:Douglas Gregor2008-12-021-3/+2
| | | | | | | | | - Template parameter scope to hold the template parameters - Template parameter context for parsing declarators - Actions for template type parameters and non-type template parameters llvm-svn: 60387
* Basic support for parsing templates, from Andrew SuttonDouglas Gregor2008-12-011-0/+50
| | | | llvm-svn: 60384
* Objective-C keywords are not always identifiers. Some are also C++ keywordsDouglas Gregor2008-12-011-2/+2
| | | | llvm-svn: 60373
* Simple parsing of exception specifications, with no semantic analysis yetDouglas Gregor2008-11-251-0/+15
| | | | llvm-svn: 60005
* Change a whole lot of diagnostics to take QualType's directly Chris Lattner2008-11-242-5/+5
| | | | | | | | instead of converting them to strings first. This also fixes a bunch of minor inconsistencies in the diagnostics emitted by clang and adds a bunch of FIXME's to DiagnosticKinds.def. llvm-svn: 59948
* make the 'to match this' diagnostic a note.Chris Lattner2008-11-232-2/+2
| | | | llvm-svn: 59921
* Make all the 'redefinition' diagnostics more consistent, and make the Chris Lattner2008-11-231-1/+1
| | | | | | "previously defined here" diagnostics all notes. llvm-svn: 59920
* Convert IdentifierInfo's to be printed the same as DeclarationNames Chris Lattner2008-11-231-7/+7
| | | | | | | | | | | | | | | | | | | | | with implicit quotes around them. This has a bunch of follow-on effects and requires tweaking to a whole lot of code. This causes a regression in two tests (xfailed) by causing it to emit things like: Line 10: duplicate interface declaration for category 'MyClass1' ('Category1') instead of: Line 10: duplicate interface declaration for category 'MyClass1(Category1)' I will fix this in a follow-up commit. As part of this, I had to start switching stuff to use ->getDeclName() instead of Decl::getName() for consistency. This is good, but I was planning to do this as an independent patch. There will be several follow-on patches to clean up some of the mess, but this patch is already too big. llvm-svn: 59917
* Implement parsing and semantic checking of the 'mutable' keyword.Sebastian Redl2008-11-141-0/+1
| | | | | | Thanks to Doug for the review. Actual effects of mutable to follow. llvm-svn: 59331
* Fix a couple of suboptimalities in error recovery.Chris Lattner2008-11-131-0/+7
| | | | | | | | | | | | | | | | | | | 1. In the top level of ParseStatementOrDeclaration, don't eat a } if we just parsed a statement if it list there. Also, don't even bother emitting an error about a missing semicolon if the statement had a bug (an rbrace is fine). 2. In do/while parsing, don't require a 'while' to be present if the do body didn't parse. This allows us to generate a clean diagnostic for this code: t.c:1:22: error: expected expression void foo (void) { do . while (0); } ^ Thanks to Neil for pointing this out. llvm-svn: 59256
* implement a fixme :), switch to -verify mode.Chris Lattner2008-11-131-6/+6
| | | | llvm-svn: 59253
OpenPOWER on IntegriCloud