summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
Commit message (Collapse)AuthorAgeFilesLines
* zap more dead code.Chris Lattner2010-09-041-4/+1
| | | | llvm-svn: 113076
* Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ↵Ted Kremenek2010-09-011-2/+3
| | | | | | | | | | | | | ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols (and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is needed to maintain the lexical information of the original source. Fixes <rdar://problem/8380046>. llvm-svn: 112691
* Make inline namespace not be transparent after all. The concept simply ↵Sebastian Redl2010-08-311-3/+7
| | | | | | doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces. llvm-svn: 112637
* Split out a header to hold APIs meant for the Sema implementation from Sema.h.John McCall2010-08-251-0/+1
| | | | | | | Clients of Sema don't need to know (for example) the list of diagnostics we support. llvm-svn: 112093
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-1/+1
| | | | | | to the new constants. llvm-svn: 112047
* Split FunctionScopeInfo and BlockScopeInfo into their own header.John McCall2010-08-251-1/+2
| | | | llvm-svn: 112038
* Remove the DenseSet dependency from Sema.h.John McCall2010-08-251-0/+1
| | | | llvm-svn: 112030
* Move more stuff out of Sema.h.John McCall2010-08-251-1/+19
| | | | llvm-svn: 112026
* More header elimination. The goal of all this is to allow Parser toJohn McCall2010-08-241-0/+1
| | | | | | | #include Sema.h while keeping all the AST declarations opaque. That may not be reasonably attainable, though. llvm-svn: 111907
* DeclPtrTy -> Decl *John McCall2010-08-211-7/+7
| | | | llvm-svn: 111733
* Another step in the process of making the parser depend on Sema:John McCall2010-08-201-1/+1
| | | | | | | | | - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. llvm-svn: 111667
* Extend the code-completion caching infrastructure to include globalDouglas Gregor2010-08-151-3/+36
| | | | | | | | | | | | | | | | | | declarations (in addition to macros). Each kind of declaration maps to a certain set of completion contexts, and the ASTUnit completion logic introduces the completion strings for those declarations if the actual code-completion occurs in one of the contexts where it matters. There are a few new code-completion-context kinds. Without these, certain completions (e.g., after "using namespace") would need to suppress all global completions, which would be unfortunate. Note that we don't get the priorities right for global completions, because we don't have enough type information. We'll need a way to compare types in an ASTContext-agnostic way before this can be implemented. llvm-svn: 111093
* Move Sema's headers into include/clang/Sema, renaming a few along the way.Douglas Gregor2010-08-121-2/+2
| | | | llvm-svn: 110945
* Don't try to implicitly declare special members of an invalid class.John McCall2010-08-111-0/+4
| | | | | | Fixes a crash in a rather large and difficult-to-reduce test case. llvm-svn: 110882
* Added locations and type source info for DeclarationName.Abramo Bagnara2010-08-111-1/+1
| | | | llvm-svn: 110860
* If name lookup finds different type declarations in different scopesDouglas Gregor2010-08-111-21/+39
| | | | | | | | that actually refer to the same underlying type, it is not an ambiguity; add uniquing support based on the canonical type of type declarations. Fixes <rdar://problem/8296180>. llvm-svn: 110806
* Introduce -f{no-}spell-checking options to enable/disableDouglas Gregor2010-07-091-1/+1
| | | | | | | spell-checking. By default, spell-checking is enabled for Clang (obviously) but disabled in CIndex for performance reasons. llvm-svn: 107992
* Lazily declare default constructors. We now delay the construction ofDouglas Gregor2010-07-031-6/+18
| | | | | | | | | | | | | | | | | | declarations for implicit default constructors, copy constructors, copy assignment operators, and destructors. On a "simple" translation unit that includes a bunch of C++ standard library headers, we generate relatively few of these implicit declarations now: 4/159 implicit default constructors created 18/236 implicit copy constructors created 70/241 implicit copy assignment operators created 0/173 implicit destructors created And, on this translation unit, this optimization doesn't really provide any benefit. I'll do some more performance measurements soon, but this completes the implementation work for <rdar://problem/8151045>. llvm-svn: 107551
* Lazily declare implicit copy constructors.Douglas Gregor2010-07-021-8/+22
| | | | llvm-svn: 107543
* Introduce a new routine, LookupConstructors(), and use it for allDouglas Gregor2010-07-021-0/+10
| | | | | | constructor-name lookup. llvm-svn: 107536
* Lazily declare copy-assignment operators.Douglas Gregor2010-07-021-14/+66
| | | | llvm-svn: 107521
* Lazily declare the implicitly-declared destructor in a C++ class.Douglas Gregor2010-07-021-0/+49
| | | | llvm-svn: 107510
* Add a new routine Sema::LookupDestructor and make all destructor-lookup ↵Douglas Gregor2010-07-011-0/+10
| | | | | | calls use that routine llvm-svn: 107444
* Be a bit more careful with undefined CXXRecordDecls. FixesDouglas Gregor2010-07-011-1/+1
| | | | | | rdar://problem/8124080 and PR7118. llvm-svn: 107358
* A more minimal fix for PR6762.John McCall2010-05-281-55/+48
| | | | llvm-svn: 104991
* Roll back r104941.John McCall2010-05-281-4/+0
| | | | llvm-svn: 104990
* Add a new attribute on records, __attribute__((adl_invisible)), and defineJohn McCall2010-05-281-0/+4
| | | | | | | | | | | | the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. llvm-svn: 104941
* Optimize and complete associated-class-and-namespace collection fromJohn McCall2010-05-281-85/+115
| | | | | | a type. llvm-svn: 104938
* Reinstate r104117, Chandler Carruth's change that "[provides] a namingDouglas Gregor2010-05-201-1/+5
| | | | | | | class for UnresolvedLookupExprs, even when occuring on template names" along with a fix for an Objective-C++ crasher it introduced. llvm-svn: 104277
* Remove accidental commitDouglas Gregor2010-05-201-8/+2
| | | | llvm-svn: 104207
* Various small fixes for construction/destruction of Objective-C++Douglas Gregor2010-05-201-2/+8
| | | | | | | | | | instance variables: - Use isRecordType() rather than isa<RecordType>(), so that we see through typedefs in ivar types. - Mark the destructor as referenced - Perform C++ access control on the destructor llvm-svn: 104206
* Revert r104117, "Provide a naming class for UnresolvedLookupExprs, even whenDaniel Dunbar2010-05-191-4/+1
| | | | | | | occuring on..." which breaks some Objective-C code. Working on getting a test case... llvm-svn: 104150
* Provide a naming class for UnresolvedLookupExprs, even when occuring onChandler Carruth2010-05-191-1/+4
| | | | | | | | | | | template names. We were completely missing naming classes for many unqualified lookups, but this didn't trigger code paths that need it. This removes part of an optimization that re-uses the template name lookup done by the parser to determine if explicit template arguments actually form a template-id. Unfortunately the technique for avoiding the duplicate lookup lost needed data such as the class context in which the lookup succeeded. llvm-svn: 104117
* Give a slight edge to the context-sensitive keyword 'super' overDouglas Gregor2010-05-181-1/+20
| | | | | | | | | non-function-local declarations with names similar to what the user typed. For example, this allows us to correct 'supper' to 'super' in an Objective-C message send, even though the C function 'isupper' has the same edit distance. llvm-svn: 104023
* Tweak typo-correction logic a bit regarding "super", so that weDouglas Gregor2010-05-181-0/+6
| | | | | | | | | consider "super" as a candidate whenever we're parsing an expression within an Objective-C method in an interface that has a superclass. At some point, we'd like to give "super" a little edge over non-local names; that will come later. llvm-svn: 104022
* Make sure to search semantic scopes and appropriate template-parameterDouglas Gregor2010-05-141-16/+48
| | | | | | | scopes during unqualified name lookup that has fallen out to namespace scope. Fixes PR7133. llvm-svn: 103766
* It turns out that basically every caller to RequireCompleteDeclContextJohn McCall2010-05-011-1/+1
| | | | | | | already knows what context it's looking in. Just pass that context in instead of (questionably) recalculating it. llvm-svn: 102818
* Fix ADL for types declared in transparent decls, from Alp Toker!Douglas Gregor2010-04-301-18/+16
| | | | llvm-svn: 102695
* When name lookup finds a single declaration that was imported via aDouglas Gregor2010-04-251-2/+3
| | | | | | | | using declaration, look at its underlying declaration to determine the lookup result kind (e.g., overloaded, unresolved). Fixes at least one issue in Boost.Bimap. llvm-svn: 102317
* When performing name lookup for an operator name, be sure to lookDouglas Gregor2010-04-251-4/+5
| | | | | | through using declarations. Fixes ~18 tests in Boost.Fusion. llvm-svn: 102311
* Recommit r102215, this time being more careful to only set the "principalJohn McCall2010-04-241-33/+7
| | | | | | | 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-7/+33
| | | | | | testsuite. llvm-svn: 102224
* Transition the last acceptable-result filter kind in LookupResult over to useJohn McCall2010-04-231-33/+7
| | | | | | a simple IDNS mask by introducing a namespace for non-member operators. llvm-svn: 102215
* Recommit my change to how C++ does elaborated type lookups, now withJohn McCall2010-04-231-32/+21
| | | | | | two bugfixes which fix selfhost and (hopefully) the nightly tests. llvm-svn: 102198
* Revert "C++ doesn't really use "namespaces" for different kinds of names the ↵Daniel Dunbar2010-04-231-22/+32
| | | | | | same", which seems to break most C++ nightly test apps. llvm-svn: 102174
* C++ doesn't really use "namespaces" for different kinds of names the sameJohn McCall2010-04-231-32/+22
| | | | | | | | | | | | | way that C does. Among other differences, elaborated type specifiers are defined to skip "non-types", which, as you might imagine, does not include typedefs. Rework our use of IDNS masks to capture the semantics of different kinds of declarations better, and remove most current lookup filters. Removing the last remaining filter is more complicated and will happen in a separate patch. Fixes PR 6885 as well some spectrum of unfiled bugs. llvm-svn: 102164
* Kill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; theyDouglas Gregor2010-04-221-6/+0
| | | | | | | aren't and never were used. There's a gap in the bit pattern for IDNS now, but I'm sure *someone* will fill it. llvm-svn: 102143
* When searching for code-completion and typo-correction candidates,Douglas Gregor2010-04-191-0/+15
| | | | | | | | look from an Objective-C class or category to its implementation, to pick up synthesized ivars. Fixes a problem reported by David Chisnall. llvm-svn: 101792
* Feed proper source-location information into Sema::LookupSingleResult,Douglas Gregor2010-04-151-3/+6
| | | | | | | | in case it ends up doing something that might trigger diagnostics (template instantiation, ambiguity reporting, access reporting). Noticed while working on PR6831. llvm-svn: 101412
* Teach typo correction about various language keywords. We can'tDouglas Gregor2010-04-141-27/+267
| | | | | | | | | | | | | generally recover from typos in keywords (since we would effectively have to mangle the token stream). However, there are still benefits to typo-correcting with keywords: - We don't make stupid suggestions when the user typed something that is similar to a keyword. - We can suggest the keyword in a diagnostic (did you mean "static_cast"?), even if we can't recover and therefore don't have a fix-it. llvm-svn: 101274
OpenPOWER on IntegriCloud