summaryrefslogtreecommitdiffstats
path: root/clang/Driver/PrintParserCallbacks.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move <root>/Driver into <root>/tools/clang-cc.Daniel Dunbar2009-03-241-819/+0
| | | | | | Again, I tried to update cmake but it is untested. llvm-svn: 67605
* InitListDesignations hasn't been used (ever). Eliminate it, andDouglas Gregor2009-03-201-1/+0
| | | | | | | simplify the parsing and action interface for designated initializers. llvm-svn: 67415
* Handle static_asserts when instantiating structs.Anders Carlsson2009-03-151-2/+1
| | | | llvm-svn: 67031
* Convert a bunch of actions to smart pointers, and also bring ↵Sebastian Redl2009-03-151-32/+209
| | | | | | PrintParserCallbacks a bit more in line with reality. llvm-svn: 67029
* Implemented access check for ivars accessed insideFariborz Jahanian2009-03-041-1/+2
| | | | | | c-style functions declared inside objc @implementations. llvm-svn: 66087
* Change Parser::ParseCaseStatement to use an iterative approach to parsingChris Lattner2009-03-041-2/+1
| | | | | | | | | | | | | | | | | | multiple sequential case statements instead of doing it with recursion. This fixes a problem where we run out of stack space parsing 100K directly nested cases. There are a couple other problems that prevent this from being useful in practice (right now the example only parses correctly with -disable-free and doesn't work with -emit-llvm), but this is a start. I'm not including a testcase because it is large and uninteresting for regtesting. Sebastian, I would appreciate it if you could scrutinize the smart pointer gymnastics I do. llvm-svn: 66011
* Fix <rdar://problem/6640991> Exception handling executes wrong clause ↵Steve Naroff2009-03-031-1/+1
| | | | | | | | | | | (Daniel, please verify). Also necessary to fix: <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements llvm-svn: 65964
* Minor name change (move the ObjC prefix to a more appropriate place).Steve Naroff2009-02-281-1/+1
| | | | llvm-svn: 65695
* Fix <rdar://problem/6243503> [sema] @throw; accepted outside catch block.Steve Naroff2009-02-111-1/+2
| | | | llvm-svn: 64318
* Semantic checking for class template declarations andDouglas Gregor2009-02-061-2/+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
* Put the invalid flag of OwningResult into the Action pointer.Sebastian Redl2009-02-051-1/+1
| | | | | | | | This shrinks OwningResult by one pointer. Since it is no longer larger than OwningPtr, merge the two. This leads to simpler client code and speeds up my benchmark by 2.7%. For some reason, this exposes a previously hidden bug, causing a regression in SemaCXX/condition.cpp. llvm-svn: 63867
* Allow taking the address of data members, resulting in a member pointer.Sebastian Redl2009-02-031-3/+5
| | | | | | Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted. llvm-svn: 63655
* Convert more expression actions to smart pointers.Sebastian Redl2009-01-191-23/+26
| | | | llvm-svn: 62537
* Convert more expression actions to smart pointers.Sebastian Redl2009-01-191-32/+30
| | | | | | Fix type of logical negation for C++. llvm-svn: 62475
* Convert a few expression actions to smart pointers.Sebastian Redl2009-01-181-23/+40
| | | | | | These actions are extremely widely used (identifier expressions and literals); still no performance regression. llvm-svn: 62468
* Convert ObjC statement actions to smart pointers.Sebastian Redl2009-01-181-22/+23
| | | | llvm-svn: 62465
* Convert asm statement action to smart pointers.Sebastian Redl2009-01-181-14/+13
| | | | llvm-svn: 62464
* Convert more statement actions to smart pointers.Sebastian Redl2009-01-181-16/+17
| | | | llvm-svn: 62463
* Convert some more statement actions to smart pointers.Sebastian Redl2009-01-161-16/+18
| | | | | | Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression. llvm-svn: 62380
* Convert some more actions to smart pointers.Sebastian Redl2009-01-111-16/+19
| | | | | | | No performance regression in my basic test. Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt). llvm-svn: 62032
* Convert a two more statement actions to smart pointers.Sebastian Redl2008-12-281-8/+11
| | | | llvm-svn: 61456
* 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
* Don't explicitly represent OverloadedFunctionDecls withinDouglas Gregor2008-12-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | DeclContext. Instead, just keep the list of currently-active declarations and only build the OverloadedFunctionDecl when we absolutely need it. This is a half-step toward eliminating the need to explicitly build OverloadedFunctionDecls that store sets of overloaded functions. This was suggested by Argiris a while back, and it's a good thing for several reasons: first, it eliminates the messy logic that currently tries to keep the OverloadedFunctionDecl in sync with the declarations that are being added. Second, it will (eventually) eliminate the need to allocate memory for overload sets, which could help performance. Finally, it helps set us up for when name lookup can return multiple (possibly ambiguous) results, as can happen with lookup of class members in C++. Next steps: make the IdentifierResolver store overloads as separate entries in its list rather than replacing them with an OverloadedFunctionDecl now, then see how far we can go toward eliminating OverloadedFunctionDecl entirely. llvm-svn: 61357
* Parser support for C++ try-catch.Sebastian Redl2008-12-211-1/+21
| | | | llvm-svn: 61312
* Convert a few Stmt actions to smart pointers.Sebastian Redl2008-12-211-13/+15
| | | | llvm-svn: 61309
* Fix PrintParserCallbacks for the new ActOnLinkageSpec actionsDouglas Gregor2008-12-171-3/+16
| | | | llvm-svn: 61115
* Some utilities for using the smart pointers in Actions, especially Sema. ↵Sebastian Redl2008-12-131-3/+3
| | | | | | Convert a few functions. llvm-svn: 60983
* Unifies the name-lookup mechanisms used in various parts of the ASTDouglas Gregor2008-12-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). llvm-svn: 60878
* Add support for calls to dependent names within templates, e.g.,Douglas Gregor2008-12-061-1/+2
| | | | | | | | | | | | | | | | | | template<typename T> void f(T x) { g(x); // g is a dependent name, so don't even bother to look it up g(); // error: g is not a dependent name } Note that when we see "g(", we build a CXXDependentNameExpr. However, if none of the call arguments are type-dependent, we will force the resolution of the name "g" and replace the CXXDependentNameExpr with its result. GCC actually produces a nice error message when you make this mistake, and even offers to compile your code with -fpermissive. I'll do the former next, but I don't plan to do the latter. llvm-svn: 60618
* Handle new by passing the Declaration to the Action, not a processed type.Sebastian Redl2008-12-021-1/+1
| | | | llvm-svn: 60413
* Implementation of new and delete parsing and sema.Sebastian Redl2008-11-211-1/+1
| | | | | | This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first. llvm-svn: 59835
* Support overloading of the subscript operator[], including support forDouglas Gregor2008-11-191-2/+3
| | | | | | | | | built-in operator candidates. Test overloading of '&' and ','. In C++, a comma expression is an lvalue if its right-hand subexpression is an lvalue. Update Expr::isLvalue accordingly. llvm-svn: 59643
* Added operator overloading for unary operators, post-increment, andDouglas Gregor2008-11-191-3/+3
| | | | | | | | | | | | | 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
* Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof ↵Sebastian Redl2008-11-111-3/+2
| | | | | | expressions, both of values and types. llvm-svn: 59057
* Implement support for C++ nested-name-specifiers ('foo::bar::x') in the ↵Argyrios Kyrtzidis2008-11-081-3/+5
| | | | | | | | 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-1/+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
* "One" line fix for -parse-noop failure, "id" and several other thingsDaniel Dunbar2008-10-311-3/+3
| | | | | | | | 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
* pass designators into sema. This completes parser-level designatorChris Lattner2008-10-261-0/+1
| | | | | | support as far as I know. llvm-svn: 58217
* Pass postfix attributes to ActOnFields.Daniel Dunbar2008-10-031-1/+2
| | | | llvm-svn: 56992
* rename PreDefinedExpr -> PredefinedExprChris Lattner2008-08-101-1/+1
| | | | llvm-svn: 54605
* Move AsmLabel into Declarator instead of just a parameter toDaniel Dunbar2008-08-051-2/+2
| | | | | | ActOnDeclarator. llvm-svn: 54353
* Add more Parser/Sema support for GCC asm-label extension.Daniel Dunbar2008-08-051-2/+2
| | | | | | | | | | | | | - ActOnDeclarator now takes an additional parameter which is the AsmLabel if used. Its unfortunate that this bubbles up this high, but we cannot just lump it in as an attribute without mistakenly *accepting* it as an attribute. - The actual asm-label itself is, however, encoded as an AsmLabelAttr on the FunctionDecl. - Slightly improved parser error recovery on malformed asm-labels. - CodeGen support still missing... llvm-svn: 54339
* Add more output to clang -parse-print-callbacksDaniel Dunbar2008-08-011-7/+521
| | | | | | | - Just added prints for all the action functions. Ideally this would be extended to print all the information for the actions. llvm-svn: 54259
* Change uses of std::cerr/std::cout to llvm::Lcerr/llvm::cout, and removeTed Kremenek2008-01-141-6/+6
| | | | | | | | #include<iostream>. Patch provided by Sam Bishop. llvm-svn: 45962
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* Implement ObjC built-in types in MinimalAction.Steve Naroff2007-10-311-2/+5
| | | | | | This fixes the recent regression with selector-1.m and -parse-noop. llvm-svn: 43575
* Fix a latent bug in MinimalActions (created by a recent name change).Steve Naroff2007-10-101-5/+5
| | | | llvm-svn: 42829
* move IdentifierTable.h from liblex to libbasic.Chris Lattner2007-10-071-1/+0
| | | | llvm-svn: 42730
* Start converting Action methods from Parse-prefix to ActOn-prefix.Steve Naroff2007-09-151-4/+4
| | | | | | The previous naming scheme was confusing, since it resulted in both the Parser and Action modules having methods with the same name. In addition, the Action module never does any parsing... llvm-svn: 41986
* Fix the following bug submitted by Ted Kremenek:Steve Naroff2007-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | void func() { int xx = xx; // incorrectly diagnosed 'xx' as an undeclared identifier. } This smallish bug resulted in a largish fix. Here are some highlights: - Needed to make sure ParseDeclarator is called *before* parsing any initializer. Removed the "Init" argument to ParseDeclarator. - Added AddInitializerToDecl() to the Action & Sema classes. In Sema, this hook is responsible for validating the initializer and installing it into the respective decl. - Moved several semantic checks from ParseDeclarator() to FinalizeDeclaratorGroup(). Previously, this hook was only responsible for reversing a list. Now it plays a much larger semantic role. All of the above changes ended up simplifying ParseDeclarator(), which is goodness... llvm-svn: 41877
OpenPOWER on IntegriCloud