summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/IdentifierResolver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Updated IdentifierResolver to deal with DeclarationNames. The names ofDouglas Gregor2008-11-171-26/+25
| | | | | | | | | | | | | | | | | | | | | C++ constructors, destructors, and conversion functions now have a FETokenInfo field that IdentifierResolver can access, so that these special names are handled just like ordinary identifiers. A few other Sema routines now use DeclarationNames instead of IdentifierInfo*'s. To validate this design, this code also implements parsing and semantic analysis for id-expressions that name conversion functions, e.g., return operator bool(); The new parser action ActOnConversionFunctionExpr takes the result of parsing "operator type-id" and turning it into an expression, using the IdentifierResolver with the DeclarationName of the conversion function. ActOnDeclarator pushes those conversion function names into scope so that the IdentifierResolver can find them, of course. llvm-svn: 59462
* Implement C++ 'typeid' parsing and sema.Sebastian Redl2008-11-111-1/+1
| | | | llvm-svn: 59042
* Preliminary support for function overloadingDouglas Gregor2008-10-211-1/+3
| | | | llvm-svn: 57909
* Make IdentifierResolver::isDeclInScope regard declarations of a parent ↵Argyrios Kyrtzidis2008-09-091-3/+21
| | | | | | | | | | | | | | | 'control' scope as part of the current scope. The 'control' scope is the 'condition' scope of if/switch/while statements and the scope that contains the for-init-statement and 'condition' of a for statement. e.g: if (int x = 0 /*'control' scope*/) { // x will be regarded as part of this substatement scope. } else { // and as part of this substatement scope too. } llvm-svn: 56020
* Add a LangOptions member to IdentifierResolver.Argyrios Kyrtzidis2008-09-091-1/+3
| | | | | | Make Sema pass the LangOptions to IdentifierResolver's constructor. llvm-svn: 56015
* IdentifierResolver cleanup. Make some methods out-of-line.Argyrios Kyrtzidis2008-09-091-0/+110
| | | | llvm-svn: 56002
* Unify ctx_iterator/ctx_begin()/ctx_end() and iterator/begin()/end() so that ↵Argyrios Kyrtzidis2008-07-171-33/+45
| | | | | | a single iterator type is used for both traversing decls of the same declaration context *and* of the parent declaration contexts, depending on the value of the bool parameter 'LookInParentCtx' that is passed to IdentifierResolver::begin(). llvm-svn: 53724
* Comments fix.Argyrios Kyrtzidis2008-05-151-1/+1
| | | | llvm-svn: 51151
* -Implement proper name lookup for namespaces.Argyrios Kyrtzidis2008-05-091-137/+68
| | | | | | | -identifierResolver exposes an iterator interface to get all decls through the scope chain. -The semantic staff (checking IdentifierNamespace and Doug's checking for shadowed tags were moved out of IdentifierResolver and back into Sema. IdentifierResolver just gives an iterator for all reachable decls of an identifier. llvm-svn: 50923
* Argiris Kirtzidis's fix for handling empty IdDeclInfo's in ↵Douglas Gregor2008-04-141-1/+1
| | | | | | IdentifierResolver::AddDecl llvm-svn: 49631
* Move IdDeclInfoMap class in an anonymous namespace. Suggestion by Chris Lattner.Argyrios Kyrtzidis2008-04-141-8/+12
| | | | llvm-svn: 49628
* Introduce support for finding class and enum names via ordinary name lookup ↵Douglas Gregor2008-04-131-4/+23
| | | | | | in C++ llvm-svn: 49621
* Use std::list's push_back instead of resize to add an element.Argyrios Kyrtzidis2008-04-121-2/+2
| | | | llvm-svn: 49582
* Fixed comments.Argyrios Kyrtzidis2008-04-121-27/+29
| | | | | | | Moved IdDeclInfo class to anonymous namespace. Replaced array with a std::vector. llvm-svn: 49570
* two new files for previous patch, by Argiris KirtzidisChris Lattner2008-04-111-0/+235
llvm-svn: 49521
OpenPOWER on IntegriCloud