summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* In a mem-initializer, a nested-name-specifier followed by anDouglas Gregor2010-01-191-8/+25
| | | | | | | | | identifier always names a type. In the case of a dependent nested-name-specifier, build a TypenameType to describe the dependent base type. I'd like to move more of this behavior up into the parser, but this fixes PR6062. llvm-svn: 93871
* When looking up enumerator names for redeclaration, use theDouglas Gregor2010-01-191-1/+2
| | | | | | | ForRedeclaration flag so that we don't look into base classes. Fixes PR6061. llvm-svn: 93862
* Allow conversion of pointer to an objective-c pointer toFariborz Jahanian2010-01-181-1/+11
| | | | | | a similar pointer. Fixes radar 7552179. llvm-svn: 93803
* Preserve type source information in compound literal expressions.John McCall2010-01-183-31/+39
| | | | | | Patch by Enea Zaffanella! llvm-svn: 93752
* Mostly renaming some methods and updating comments toFariborz Jahanian2010-01-182-31/+40
| | | | | | | reflect what these methods are actually doing. One method template for future work. No change in functionality. llvm-svn: 93742
* Improve source-location information for builtin TypeLocs, from EneaDouglas Gregor2010-01-182-1/+20
| | | | | | Zaffanella (with a couple of my tweaks). llvm-svn: 93733
* Encoding calling conventions in the type system, from Charles Davis!Douglas Gregor2010-01-181-1/+2
| | | | llvm-svn: 93726
* Introduce a second queue of "local" pending implicit instantiation,Douglas Gregor2010-01-163-10/+57
| | | | | | | | | | which are instantiations of the member functions of local classes. These implicit instantiations have to occur at the same time as---and in the same local instantiation scope as---the enclosing function, since the member functions of the local class can refer to locals within the enclosing function. This should really, really fix PR5764. llvm-svn: 93666
* When we are instantiating a member function of a local class, be sureDouglas Gregor2010-01-161-2/+8
| | | | | | | | | to merge the local instantiation scope with the outer local instantiation scope, so that we can instantiate declarations from the function owning the local class. Fixes an assert while instantiating Boost.MPL's BOOST_MPL_ASSERT_MSG. llvm-svn: 93651
* Partial fix for PR6022, where we were complaining when a friendDouglas Gregor2010-01-161-1/+2
| | | | | | | | function template declared within a class template did not match a function in another scope. We really need to rework how friends-in-templates are semantically checked. llvm-svn: 93642
* Improve location information for Objective-C category declarations. WeDouglas Gregor2010-01-161-2/+3
| | | | | | | | | | | | | previously only had a single location (the @ in @interface); now we know where the @ is (for the start of the declaration), where the class name is (that's the normal "location" now for diagnostics), and where the category name is. Also, eliminated the redundant "end" location, since ObjCContainerDecl already has better @end information. The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught CIndex how to use the new locations. llvm-svn: 93639
* Keep track of the source locations for each protocol reference inDouglas Gregor2010-01-162-5/+16
| | | | | | | | Objective-C classes, protocol definitions, forward protocol declarations, and categories. This information isn't actually used yet; that's coming next. llvm-svn: 93636
* Fix a use of uninitialized memory in overload diagnostics.John McCall2010-01-161-1/+4
| | | | llvm-svn: 93629
* Make the AST explicitly represent the cast of the first operand of a Eli Friedman2010-01-161-3/+5
| | | | | | pointer-to-member operator. llvm-svn: 93592
* Generalize handling for unreachable code warnings to all binary operators.Mike Stump2010-01-151-16/+13
| | | | llvm-svn: 93584
* Candidates with arity mismatches are extra-special non-viable and need toJohn McCall2010-01-151-16/+32
| | | | | | | | stand at the back of the line. Thanks to Oliver Hunt for reminding me to do this. llvm-svn: 93583
* Refine location reporting for unreachable code warnings for comma expressions.Mike Stump2010-01-151-12/+45
| | | | llvm-svn: 93574
* Make LookupResult::resolveKind() robust against NotFoundInCurrentInstantiation.John McCall2010-01-151-1/+1
| | | | | | Fixes PR 6049. llvm-svn: 93557
* Preserve type source information for C++ named casts through templateJohn McCall2010-01-153-23/+39
| | | | | | instantiation. llvm-svn: 93533
* Don't lose type source information when rebuilding C-style cast expressions.John McCall2010-01-153-13/+25
| | | | | | Also we don't need to recheck for altivec initializers, I think. llvm-svn: 93529
* Preserve type source information in explicit cast expressions.John McCall2010-01-154-45/+66
| | | | | | Patch by Enea Zaffanella. llvm-svn: 93522
* When determining whether the type is the current instantiation, stripDouglas Gregor2010-01-151-2/+2
| | | | | | qualifiers. Fixes PR6021. llvm-svn: 93513
* Don't repeat lookup when instantiating resolved member expressions.John McCall2010-01-153-20/+46
| | | | | | | | | | Adjust BuildMemberReferenceExpr to perform the inheritance check on implicit member accesses, which can arise from unqualified lookups and therefore may reference decls from enclosing class scopes. Fixes PR 5838. llvm-svn: 93510
* Refine unreachable warnings. WIP.Mike Stump2010-01-151-4/+87
| | | | llvm-svn: 93500
* When performing qualified name lookup into the current instantiation,Douglas Gregor2010-01-155-33/+54
| | | | | | | | | | | | | 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
* fix grammaroChris Lattner2010-01-141-1/+1
| | | | llvm-svn: 93452
* After dyn_cast'ing, it generally makes sense to check the *output* ofDouglas Gregor2010-01-141-1/+1
| | | | | | the dyn_cast against NULL rather than the *input*. Fixes PR6025. llvm-svn: 93435
* When qualified lookup into the current instantiation fails (because itDouglas Gregor2010-01-144-4/+49
| | | | | | | | finds nothing), and the current instantiation has dependent base classes, treat the qualified lookup as if it referred to an unknown specialization. Fixes PR6031. llvm-svn: 93433
* Switch a few callers of MaybeAddResult over to AddResult, when theDouglas Gregor2010-01-141-10/+12
| | | | | | declarations we're adding do not need any name-hiding checks. llvm-svn: 93431
* Switch code-completion's ivar lookup over to LookupVisibleDecls,Douglas Gregor2010-01-141-5/+11
| | | | | | eliminating yet one more ResultBuilder::MaybeAddResult caller. llvm-svn: 93430
* Start migrating code-completion results fromDouglas Gregor2010-01-141-117/+129
| | | | | | ResultBuilder::MaybeAddResult over to ResultBuilder::AddResult. llvm-svn: 93429
* Switch the remaining code completions over to LookupVisibleDecls,Douglas Gregor2010-01-143-130/+50
| | | | | | | | 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
* Move code completion for qualified name lookup (foo::) toDouglas Gregor2010-01-142-1/+8
| | | | | | LookupVisibleDecls. Also, a function does not hide another function. llvm-svn: 93421
* Improve overload diagnostics some more by calling out qualifier mismatchesJohn McCall2010-01-141-3/+55
| | | | | | | for special diagnostics. Unfortunately, the non-overload diagnostics are not this good. llvm-svn: 93420
* Eliminate the code-completion-specifier CollectLookupResults in favorDouglas Gregor2010-01-141-73/+10
| | | | | | of the more general LookupVisibleDecls. llvm-svn: 93419
* Simplify the code-completion logic for nested-name-specifiers: ratherDouglas Gregor2010-01-141-31/+43
| | | | | | | than traversing visible declarations twice, only perform one traversal and recognize nested-name-specifiers as special. llvm-svn: 93418
* Don't assume a random access iterator, instead just use CFG::iterator.Mike Stump2010-01-141-3/+3
| | | | | | Thanks Ted. llvm-svn: 93413
* Avoid snowballing errors into additional warnings. To do better, we'dMike Stump2010-01-141-2/+4
| | | | | | | | need an error term for the CFG. I suspect we'll always have to cope with getCFG returning 0, though, I'd love to see even that possibility removed. llvm-svn: 93411
* When providing completions for a member access expression in C++,Douglas Gregor2010-01-141-8/+3
| | | | | | | provided nested-name-specifier results for base classes (only), rather than everything that could possibly be a nested-name-specifier. llvm-svn: 93398
* Switch code-completion for ordinary names over to the new(ish)Douglas Gregor2010-01-141-4/+80
| | | | | | | | | | LookupVisibleDecls, unifying the name lookup mechanisms used by code completion and typo correction. Aside from the software-engineering improvements, this makes code-completion see through using directives and see ivars when performing unqualified name lookup in an Objective-C instance method. llvm-svn: 93397
* Improve the diagnostic for bad conversions in overload resolution to talkJohn McCall2010-01-141-1/+1
| | | | | | about 'object argument' vs. 'nth argument'. llvm-svn: 93395
* More refactoring of ResultBuilder::MaybeAddResult. No intendedDouglas Gregor2010-01-141-40/+39
| | | | | | functionality change. llvm-svn: 93386
* Refactor the "is this declaration interesting" logic inDouglas Gregor2010-01-141-33/+51
| | | | | | code-completion's ResultBuilder::MaybeAddResult for later reuse. llvm-svn: 93379
* Look through using declarations when determining whether one decl hides anotherDouglas Gregor2010-01-141-0/+3
| | | | llvm-svn: 93378
* Banish the notion of a "rank" for code-completion results, since weDouglas Gregor2010-01-131-256/+197
| | | | | | are no longer using it for anything. No intended functionality change. llvm-svn: 93376
* Improve the sorting of code-completion results. We now always sort byDouglas Gregor2010-01-132-44/+46
| | | | | | | | the "typed" text, first, then take into account nested-name-specifiers, name hiding, etc. This means that the resulting sort is actually alphabetical :) llvm-svn: 93370
* Don't report ambiguities in the user-defined conversion if we weren't supposedJohn McCall2010-01-131-1/+1
| | | | | | | | | | | | to be considering user-defined conversions in the first place. Doug, please review; I'm not sure what we should be doing if we see a real ambiguity in selecting a copy constructor when otherwise suppressing user-defined conversions. Fixes PR6014. llvm-svn: 93365
* Don't a.k.a. through the primary typedef of an anonymous tag decl.John McCall2010-01-131-0/+6
| | | | llvm-svn: 93362
* Code-completion for @public, @protected, @private, @package.Douglas Gregor2010-01-132-1/+31
| | | | llvm-svn: 93361
* Whenever completing ordinary names for an Objective-C source, alsoDouglas Gregor2010-01-131-99/+159
| | | | | | | | | | | provide completions for @ keywords. Previously, we only provided @-completions after an @ was actually typed, which is useful but probably not the common case. Also, make sure a few Objective-C 2.0 completions only show up when Objective-C 2.0 support is enabled (the default). llvm-svn: 93354
OpenPOWER on IntegriCloud