summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse
Commit message (Collapse)AuthorAgeFilesLines
* Enter the scope of an initializer for direct-initialization as well asDouglas Gregor2009-12-221-0/+16
| | | | | | for copy-initialization. llvm-svn: 91909
* fix PR5500: clang fails to parse inline asm with :: in C++ mode Chris Lattner2009-12-201-7/+22
| | | | llvm-svn: 91802
* refactor asm stmt parsing to avoid nesting as much, andChris Lattner2009-12-201-39/+38
| | | | | | pull ':' eating out of ParseAsmOperandsOpt. llvm-svn: 91801
* Don't inject the class name until that magical lbrace.John McCall2009-12-201-0/+2
| | | | | | | | | | | | | | | | Because of the rules of base-class lookup* and the restrictions on typedefs, it was actually impossible for this to cause any problems more serious than the spurious acceptance of template <class T> class A : B<A> { ... }; instead of template <class T> class A : B<A<T> > { ... }; but I'm sure we can all agree that that is a very important restriction which is well worth making another Parser->Sema call for. (*) n.b. clang++ does not implement these rules correctly; we are not ignoring non-type names llvm-svn: 91792
* Parse base specifiers within the scope of the class. This is possibly notJohn McCall2009-12-191-12/+18
| | | | | | quite right; I'll come back to it later. It does fix PR 5741. llvm-svn: 91789
* Refactor to remove more dependencies on PreDeclaratorDC. I seem to have madeJohn McCall2009-12-191-2/+8
| | | | | | | the redeclaration problems in the [temp.explicit]p3 testcase worse, but I can live with that; they'll need to be fixed more holistically anyhow. llvm-svn: 91771
* Just push a new scope when parsing an out-of-line variable definition.John McCall2009-12-191-2/+6
| | | | | | | Magically fixes all the terrible lookup problems associated with not pushing a new scope. Resolves an ancient xfail and an LLVM misparse. llvm-svn: 91769
* eliminate a call to NextToken() when parsing ::fooChris Lattner2009-12-191-5/+6
| | | | llvm-svn: 91738
* Teach TryAnnotateTypeOrScopeToken to deal with already-annotatedJohn McCall2009-12-192-8/+19
| | | | | | | scope specifiers. Fix a tentative parsing bug that came up in LLVM. Incidentally fixes some random FIXMEs in an existing testcase. llvm-svn: 91734
* Check in a rudimentary FullExpr class that isn't used anywhere yet. Rename ↵Anders Carlsson2009-12-162-9/+9
| | | | | | Action::FullExpr to Action::MakeFullExpr to avoid name clashes. llvm-svn: 91494
* Remember the type name's scope specifier in the DeclSpec.John McCall2009-12-122-9/+10
| | | | llvm-svn: 91215
* Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gaveJeffrey Yasskin2009-12-121-6/+6
| | | | | | no extra safety anyway. llvm-svn: 91207
* Don't enter a new scope for a namespace-qualified declarator unless we'reJohn McCall2009-12-111-3/+4
| | | | | | | in a file context. In well-formed code, only happens with friend functions. Fixes PR 5760. llvm-svn: 91146
* Implement access declarations. Most of the work here is parsing them, whichJohn McCall2009-12-112-1/+42
| | | | | | | | | | | | is difficult because they're so terribly, terribly ambiguous. We implement access declarations in terms of using declarations, which is quite reasonable. However, we should really persist the access/using distinction in the AST and use the appropriate name in diagnostics. This isn't a priority, so I'll just file a PR and hope someone else does it. :) llvm-svn: 91095
* Implement just a bit more of inline assembly.Mike Stump2009-12-111-1/+14
| | | | llvm-svn: 91079
* Privatize class members.Benjamin Kramer2009-12-101-2/+2
| | | | llvm-svn: 91067
* If we enter parens, colons can become un-sacred, allowing us to emitChris Lattner2009-12-102-5/+12
| | | | | | a better diagnostic in the second example. llvm-svn: 91040
* fix a more evil case of : / :: confusion arising in ?:.Chris Lattner2009-12-101-0/+3
| | | | llvm-svn: 91039
* fix incorrect parsing of bitfields pointed out by Doug. I choseChris Lattner2009-12-102-4/+11
| | | | | | | to use ColonProtectionRAIIObject in the C codepath even though it won't matter for consistency. llvm-svn: 91037
* Second half of r91023, saving files is good.Chris Lattner2009-12-101-0/+1
| | | | llvm-svn: 91024
* move GreaterThanIsOperatorScope into RAIIObjectsForParser. Add some moreChris Lattner2009-12-101-3/+21
| | | | | | | TODOs for other classes that could be moved out of Parser.h. I don't plan to do these in the near term though. llvm-svn: 91023
* fix PR5740: a colon is sacred when parsing case statement expressions!Chris Lattner2009-12-102-1/+14
| | | | llvm-svn: 91016
* refactor the 'ColonIsSacred' argument to ParseOptionalCXXScopeSpecifierChris Lattner2009-12-104-11/+31
| | | | | | | to be a bool in Parser that is twiddled by the ColonProtectionRAIIObject class. No functionality change. llvm-svn: 91014
* rename ExtensionRAIIObject.h -> RAIIObjectsForParser.hChris Lattner2009-12-106-9/+10
| | | | llvm-svn: 91008
* spread 'const' love to some variables. this considerably reduces the amount ↵Nuno Lopes2009-12-101-1/+1
| | | | | | of dirty data around. llvm-svn: 91002
* Fixes a bogus error when declaring an extern "C" array.Fariborz Jahanian2009-12-092-5/+13
| | | | | | (fixes radar 7457109). llvm-svn: 90986
* reduce nesting.Chris Lattner2009-12-071-3/+9
| | | | llvm-svn: 90769
* Code completion for Objective-C @ keywords that are statements or expressionsDouglas Gregor2009-12-071-1/+10
| | | | llvm-svn: 90757
* Code completion for Objective-C @ directivesDouglas Gregor2009-12-071-1/+15
| | | | llvm-svn: 90756
* remove some defaulted params for consistency.Chris Lattner2009-12-071-3/+3
| | | | llvm-svn: 90731
* reapply my patch for PR4451, which improves diagnostics for :: vs : confusion.Chris Lattner2009-12-072-6/+28
| | | | | | This time with a fix to bail out when in a dependent context. llvm-svn: 90730
* fix a crash on invalid I found when working on something unrelated.Chris Lattner2009-12-071-1/+3
| | | | llvm-svn: 90729
* revert my previous patch, it is breaking something and I don't have timeChris Lattner2009-12-062-28/+6
| | | | | | to fix it ATM. llvm-svn: 90717
* implement PR4451, improving error recovery for a mistaken : where a :: wasChris Lattner2009-12-062-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | intended. On the first testcase in the bug, we now produce: cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier y:a a2; ^ :: instead of: t.cc:8:1: error: C++ requires a type specifier for all declarations x:a a2; ^ t.cc:8:2: error: invalid token after top level declarator x:a a2; ^ ; t.cc:9:11: error: use of undeclared identifier 'a2' x::a a3 = a2; ^ llvm-svn: 90713
* simplify logic.Chris Lattner2009-12-061-6/+7
| | | | llvm-svn: 90712
* remove some extraneous syntax: sourceloc implicitly converts to sourcerange.Chris Lattner2009-12-064-7/+7
| | | | llvm-svn: 90710
* Lift the ObjCPropertyCallback out of local scope to unbreak VS2005 builds.John McCall2009-12-031-55/+59
| | | | | | | Make it an inner class of Parser to assuage access control. No functionality change. llvm-svn: 90491
* Introduce the notion of literal types, as specified in C++0x.Sebastian Redl2009-12-032-0/+2
| | | | llvm-svn: 90361
* Add DeclarationName support for C++0x operator literals. They should now work asAlexis Hunt2009-11-291-2/+1
| | | | | | | function names outside of templates - they'll probably cause some damage there as they're largely untested. llvm-svn: 90064
* Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.Benjamin Kramer2009-11-281-2/+1
| | | | llvm-svn: 90044
* Fix test and handle IK_LiteralOperatorId in a few more places.Alexis Hunt2009-11-281-5/+9
| | | | llvm-svn: 90030
* Add Parser support for C++0x literal operators ('operator "" i').Alexis Hunt2009-11-281-0/+21
| | | | | | DeclarationName can't handle them yet, so right now Parser just errors out on them. llvm-svn: 90027
* Fix attribute between function decl ')' and '{' or '=0'John Thompson2009-11-251-0/+7
| | | | llvm-svn: 89894
* When the condition of a switch() statement is semantically invalid,Douglas Gregor2009-11-251-3/+1
| | | | | | | still parse the body of the switch to try to avoid spurious diagnostics. Fixes PR5606. llvm-svn: 89847
* Parse C++ member check attributes - base_check, hiding, and override.Alexis Hunt2009-11-252-7/+13
| | | | | | The attributes are currently ignored. llvm-svn: 89837
* Some fancy footwork to move the decision on how Fariborz Jahanian2009-11-251-11/+11
| | | | | | to build casted expression-list AST to Sema. llvm-svn: 89827
* Eliminate CXXConditionDeclExpr with extreme prejudice.Douglas Gregor2009-11-252-45/+71
| | | | | | | | | | | | | | | | | All statements that involve conditions can now hold on to a separate condition declaration (a VarDecl), and will use a DeclRefExpr referring to that VarDecl for the condition expression. ForStmts now have such a VarDecl (I'd missed those in previous commits). Also, since this change reworks the Action interface for if/while/switch/for, use FullExprArg for the full expressions in those expressions, to ensure that we're emitting Note that we are (still) not generating the right cleanups for condition variables in for statements. That will be a follow-on commit. llvm-svn: 89817
* Have the parser tell sema whether a member declaration is a function ↵Sebastian Redl2009-11-242-1/+3
| | | | | | definition. This allows sema to not emit spurious diagnostics in some invalid code. llvm-svn: 89816
* "Do" loops cannot have condition variables, so don't parse them.Douglas Gregor2009-11-241-4/+3
| | | | llvm-svn: 89801
* Fix a recent regression probably caused by addition of altivec-styleFariborz Jahanian2009-11-231-1/+2
| | | | | | type-casts in the parser. llvm-svn: 89691
OpenPOWER on IntegriCloud