summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Lookup.h
Commit message (Collapse)AuthorAgeFilesLines
* Move Sema's headers into include/clang/Sema, renaming a few along the way.Douglas Gregor2010-08-121-681/+0
| | | | llvm-svn: 110945
* Added locations and type source info for DeclarationName.Abramo Bagnara2010-08-111-10/+37
| | | | llvm-svn: 110860
* Fix a point of semantics with using declaration hiding: method templatesJohn McCall2010-06-161-0/+5
| | | | | | | | | | | | | | | | | introduced by using decls are hidden even if their template parameter lists or return types differ from the "overriding" declaration. Propagate using shadow declarations around more effectively when looking up template-ids. Reperform lookup for template-ids in member expressions so that access control is properly set up. Fix some number of latent bugs involving template-ids with totally invalid base types. You can only actually get these with a scope specifier, since otherwise the template-id won't parse as a template-id. Fixes PR7384. llvm-svn: 106093
* Recommit r102215, this time being more careful to only set the "principalJohn McCall2010-04-241-6/+1
| | | | | | | declaration" (i.e. the only which will actually be looked up) to have the non-member-operator bit. llvm-svn: 102231
* Revert r102215. This causes clang crash while compiling a test case from gdb ↵Devang Patel2010-04-241-1/+6
| | | | | | testsuite. llvm-svn: 102224
* Transition the last acceptable-result filter kind in LookupResult over to useJohn McCall2010-04-231-6/+1
| | | | | | a simple IDNS mask by introducing a namespace for non-member operators. llvm-svn: 102215
* Implement C++ [temp.local]p4, which specifies how we eliminateDouglas Gregor2010-04-121-0/+5
| | | | | | | | | name-lookup ambiguities when there are multiple base classes that are all specializations of the same class template. This is part of a general cleanup for ambiguities in template-name lookup. Fixes PR6717. llvm-svn: 101065
* Implement the protected access restriction ([class.protected]), which requiresJohn McCall2010-04-061-0/+13
| | | | | | | | that protected members be used on objects of types which derive from the naming class of the lookup. My first N attempts at this were poorly-founded, largely because the standard is very badly worded here. llvm-svn: 100562
* Handle simple friend-class decls in class templates better by ensuring thatJohn McCall2010-03-251-0/+6
| | | | | | | we look for shadow friend decls in the appropriate scope before injecting a new declaration. llvm-svn: 99552
* Improve access control diagnostics. Perform access control on member-pointerJohn McCall2010-02-101-1/+1
| | | | | | | conversions. Fix an access-control bug where privileges were not considered at intermediate points along the inheritance path. Prepare for friends. llvm-svn: 95775
* Handle redeclarations found by ADL deterministically and reasonably.John McCall2010-01-261-0/+38
| | | | | | | | | This solution relies on an O(n) scan of redeclarations, which means it might scale poorly in crazy cases with tons of redeclarations brought in by a ton of distinct associated namespaces. I believe that avoiding this is not worth the common-case cost. llvm-svn: 94530
* Preserve access bits through overload resolution much better. SomeJohn McCall2010-01-261-0/+4
| | | | | | general refactoring in operator resolution. llvm-svn: 94498
* Implement elementary access control.John McCall2010-01-231-0/+36
| | | | llvm-svn: 94268
* First pass at collecting access-specifier information along inheritance paths.John McCall2010-01-201-2/+8
| | | | | | | | Triggers lots of assertions about missing access information; fix them. Will actually consume this information soon. llvm-svn: 94038
* Give UnresolvedSet the ability to store access specifiers for each declaration.John McCall2010-01-201-35/+27
| | | | | | | Change LookupResult to use UnresolvedSet. Also extract UnresolvedSet into its own header and make it templated over an inline capacity. llvm-svn: 93959
* When performing qualified name lookup into the current instantiation,Douglas Gregor2010-01-151-3/+22
| | | | | | | | | | | | | do not look into base classes if there are any dependent base classes. Instead, note in the lookup result that we couldn't look into any dependent bases. Use that new result kind to detect when this case occurs, so that we can fall back to treating the type/value/etc. as a member of an unknown specialization. Fixes an issue where we were resolving lookup at template definition time and then missing an ambiguity at template instantiation time. llvm-svn: 93497
* Switch the remaining code completions over to LookupVisibleDecls,Douglas Gregor2010-01-141-1/+5
| | | | | | | | after adding the ability to determine whether our lookup is a base-class lookup. Eliminate CollectMemberLookupResults, since it is no longer used (yay). llvm-svn: 93428
* Typo correction for type names when they appear in declarations, e.g., givenDouglas Gregor2009-12-301-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | tring str2; we produce the following diagnostic + fix-it: typo.cpp:15:1: error: unknown type name 'tring'; did you mean 'string'? tring str2; ^~~~~ string To make this really useful, we'll need to introduce typo correction in many more places (wherever we do name lookup), and implement declaration-vs-expression heuristics that cope with typos better. However, for now this will handle the simple cases where we already get good "unknown type name" diagnostics. The LookupVisibleDecls functions are intended to be used by code completion as well as typo correction; that refactoring will happen later. llvm-svn: 92308
* Pull Sema::isAcceptableLookupResult into SemaLookup. Extract the criteria intoJohn McCall2009-12-181-14/+25
| | | | | | | | | | | | | | | different functions and pick the function at lookup initialization time. In theory we could actually divide the criteria functions into N different functions for the N cases, but it's so not worth it. Among other things, lets us invoke LookupQualifiedName without recomputing IDNS info every time. Do some refactoring in SemaDecl to avoid an awkward special case in LQN that was only necessary for redeclaration testing for anonymous structs/unions --- which could be done more efficiently with a scoped lookup anyway. llvm-svn: 91676
* r90313, in which OverloadedFunctionDecl is removed and never spoken of again.John McCall2009-12-021-3/+2
| | | | llvm-svn: 90313
* Rip out the last remaining implicit use of OverloadedFunctionDecl in Sema:John McCall2009-12-021-14/+0
| | | | | | | LookupResult::getAsSingleDecl() is no more. Shift Sema::LookupSingleName to return null on overloaded results. llvm-svn: 90309
* Eliminate the use of OverloadedFunctionDecl in member expressions.John McCall2009-11-301-0/+4
| | | | | | | | Create a new UnresolvedMemberExpr for these lookups. Assorted hackery around qualified member expressions; this will all go away when we implement the correct (i.e. extremely delayed) implicit-member semantics. llvm-svn: 90161
* Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and John McCall2009-11-241-4/+9
| | | | | | | | | | | | DependentScopeDeclRefExpr support storing templateids. Unite the common code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr. This gets us to a point where we don't need to store function templates in the AST using TemplateNames, which is critical to ripping out OverloadedFunction. Also resolves a few FIXMEs. llvm-svn: 89785
* Fix LookupResult's sanity-check to handle shadow decls.John McCall2009-11-221-1/+2
| | | | llvm-svn: 89624
* Consider a FunctionTemplate to be an overload all on its lonesome. TrackJohn McCall2009-11-221-4/+18
| | | | | | this information through lookup rather than rederiving it. llvm-svn: 89570
* "Incremental" progress on using expressions, by which I mean totally rippingJohn McCall2009-11-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | into pretty much everything about overload resolution in order to wean BuildDeclarationNameExpr off LookupResult::getAsSingleDecl(). Replace UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the idea of a non-member lookup that we haven't totally resolved yet, whether by overloading, argument-dependent lookup, or (eventually) the presence of a function template in the lookup results. Incidentally fixes a problem with argument-dependent lookup where we were still performing ADL even when the lookup results contained something from a block scope. Incidentally improves a diagnostic when using an ObjC ivar from a class method. This just fell out from rewriting BuildDeclarationNameExpr's interaction with lookup, and I'm too apathetic to break it out. The only remaining uses of OverloadedFunctionDecl that I know of are in TemplateName and MemberExpr. llvm-svn: 89544
* Overhaul previous-declaration and overload checking to work on lookup resultsJohn McCall2009-11-181-1/+85
| | | | | | | rather than NamedDecl*. This is a major step towards eliminating OverloadedFunctionDecl. llvm-svn: 89263
* Split LookupResult into its own header.John McCall2009-11-181-0/+392
llvm-svn: 89199
OpenPOWER on IntegriCloud