Commit Graph

13 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 2bdac73591 Make IdentifierResolver::isDeclInScope regard declarations of a parent '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
2008-09-09 21:57:58 +00:00
Argyrios Kyrtzidis f4b92e6924 Add a LangOptions member to IdentifierResolver.
Make Sema pass the LangOptions to IdentifierResolver's constructor.

llvm-svn: 56015
2008-09-09 21:32:02 +00:00
Argyrios Kyrtzidis 4f11d78fcc IdentifierResolver cleanup. Make some methods out-of-line.
llvm-svn: 56002
2008-09-09 19:28:27 +00:00
Argyrios Kyrtzidis 85324837ce Make the default constructor of IdentifierResolver::iterator public.
llvm-svn: 54264
2008-08-01 10:20:48 +00:00
Argyrios Kyrtzidis ef34aed1f9 Unify ctx_iterator/ctx_begin()/ctx_end() and iterator/begin()/end() so that 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
2008-07-17 17:49:50 +00:00
Argyrios Kyrtzidis ac1b916441 'Educate' IdentifierResolver about the declaration context of CXXFieldDecls.
llvm-svn: 52698
2008-06-24 23:08:34 +00:00
Argyrios Kyrtzidis 212f91107a Comments fix.
llvm-svn: 51151
2008-05-15 17:26:35 +00:00
Argyrios Kyrtzidis 3722daf62d Change CRLF line endings to LF.
llvm-svn: 51103
2008-05-14 10:49:47 +00:00
Argyrios Kyrtzidis fa8e15bfa5 -Implement proper name lookup for namespaces.
-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
2008-05-09 23:39:43 +00:00
Argyrios Kyrtzidis 25f54c72ac Move IdDeclInfoMap class in an anonymous namespace. Suggestion by Chris Lattner.
llvm-svn: 49628
2008-04-14 00:09:21 +00:00
Douglas Gregor 83a586ec19 Introduce support for finding class and enum names via ordinary name lookup in C++
llvm-svn: 49621
2008-04-13 21:07:44 +00:00
Argyrios Kyrtzidis dfd52220d7 Fixed comments.
Moved IdDeclInfo class to anonymous namespace.
Replaced array with a std::vector.

llvm-svn: 49570
2008-04-12 01:50:47 +00:00
Chris Lattner 9950c80c83 two new files for previous patch, by Argiris Kirtzidis
llvm-svn: 49521
2008-04-11 07:06:57 +00:00