summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Move code completion for qualified name lookup (foo::) toDouglas Gregor2010-01-141-1/+2
| | | | | | LookupVisibleDecls. Also, a function does not hide another function. llvm-svn: 93421
* 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
* 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
* 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
* 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-131-38/+41
| | | | | | | | 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
* Code-completion for @public, @protected, @private, @package.Douglas Gregor2010-01-131-1/+30
| | | | 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
* Use horizontal-space markers in code-completion results rather thanDouglas Gregor2010-01-121-14/+21
| | | | | | embedding single space characters. <rdar://problem/7485503> llvm-svn: 93231
* Improve code completion by introducing patterns for the various C andDouglas Gregor2010-01-101-20/+529
| | | | | | | | | | | | | | | | | | | | | | C++ grammatical constructs that show up in top-level (namespace-level) declarations, member declarations, template declarations, statements, expressions, conditions, etc. For example, we now provide a pattern for static_cast<type>(expr) when we can have an expression, or using namespace identifier; when we can have a using directive. Also, improves the results of code completion at the beginning of a top-level declaration. Previously, we would see value names (function names, global variables, etc.); now we see types, namespace names, etc., but no values. llvm-svn: 93134
* remove extraneous #includeChris Lattner2009-12-301-1/+0
| | | | llvm-svn: 92310
* Typo correction for type names when they appear in declarations, e.g., givenDouglas Gregor2009-12-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove some dead variables clang-analyzer found.Benjamin Kramer2009-12-251-1/+0
| | | | llvm-svn: 92162
* Objective-C methods can be variadic, too. Who knew.Douglas Gregor2009-12-231-0/+7
| | | | llvm-svn: 91951
* Extend code-completion results with the type of each resultDouglas Gregor2009-12-181-0/+36
| | | | llvm-svn: 91702
* Shift things around so that it's easier to recover from a missingJohn McCall2009-12-161-22/+13
| | | | | | | | | function in a C++ call using an arbitrary call-expression type. Actually exploit this to fix the recovery implemented earlier. The diagnostic is still iffy, though. llvm-svn: 91538
* update to match LLVM API change:Chris Lattner2009-12-151-7/+0
| | | | | | | | | Remove isPod() from DenseMapInfo, splitting it out to its own isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. llvm-svn: 91422
* Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gaveJeffrey Yasskin2009-12-121-1/+1
| | | | | | no extra safety anyway. llvm-svn: 91207
* When code completion of an overload set fails, produce results for ordinary ↵Douglas Gregor2009-12-111-5/+16
| | | | | | name lookup instead. llvm-svn: 91141
* Add a function's cv-qualifiers to the code-completion results as anDouglas Gregor2009-12-111-4/+24
| | | | | | informative chunk. llvm-svn: 91139
* Teach code completion to instantiate templates when it needs toDouglas Gregor2009-12-111-1/+6
| | | | llvm-svn: 91138
* Member function templates can occur after . or ->Douglas Gregor2009-12-111-1/+2
| | | | llvm-svn: 91137
* Tweak code-completion results by suppressing class templateDouglas Gregor2009-12-111-8/+15
| | | | | | | | | specializations and class template partial specializations (they're never named directly). Also, member access expressions only refer to value declarations (fields, functions, enumerators, etc.) and Objective-C property declarations; filter out everything else. llvm-svn: 91133
* Class template (partial) specializations should not show up in code ↵Douglas Gregor2009-12-111-0/+5
| | | | | | completion results llvm-svn: 91125
* When in an Objective-C instance method, super is a valid code-completion resultDouglas Gregor2009-12-071-0/+14
| | | | llvm-svn: 90758
* Code completion for Objective-C @ keywords that are statements or expressionsDouglas Gregor2009-12-071-1/+90
| | | | llvm-svn: 90757
* Code completion for Objective-C @ directivesDouglas Gregor2009-12-071-0/+88
| | | | llvm-svn: 90756
* PointerUnion == PointerUnion does not do what I thought it did. Also, fix a ↵Douglas Gregor2009-12-061-4/+4
| | | | | | thinko in a PointerUnion::get call. llvm-svn: 90719
* Switch the std::multimap shadow map used in code completion to anDouglas Gregor2009-12-061-16/+179
| | | | | | | llvm::DenseMap, for a 20% performance improvement in the Cocoa-big-list performance benchmark. llvm-svn: 90715
* Avoid trashing two temporary strings.Benjamin Kramer2009-12-051-2/+2
| | | | llvm-svn: 90663
* strcasecmp is unportable.Benjamin Kramer2009-12-051-1/+1
| | | | llvm-svn: 90662
* Improve the performance of code completion by 2.2x when completing for ↵Douglas Gregor2009-12-051-6/+46
| | | | | | ordinary names with Cocoa.h included, by drastically improving the performance of our results sorting. llvm-svn: 90661
* Switch the clang-to-CIndex interface for code-completion to a binary format, ↵Douglas Gregor2009-12-011-18/+19
| | | | | | for a massive speedup llvm-svn: 90209
* Remove all of Sema's explicit uses of OverloadedFunctionDecl except forJohn McCall2009-11-301-11/+0
| | | | | | those associated with TemplateNames. llvm-svn: 90162
* Remove useless c_str() calls in SemaCodeComplete.Benjamin Kramer2009-11-291-17/+17
| | | | llvm-svn: 90088
* Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and John McCall2009-11-241-2/+4
| | | | | | | | | | | | 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
* Encapsulate "an array of TemplateArgumentLocs and two angle bracket ↵John McCall2009-11-231-6/+4
| | | | | | | | | | locations" into a new class. Use it pervasively throughout Sema. My fingers hurt. llvm-svn: 89638
* Consider a FunctionTemplate to be an overload all on its lonesome. TrackJohn McCall2009-11-221-2/+4
| | | | | | 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-4/+3
| | | | | | | | | | | | | | | | | | | | | | 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
* Objective-C code completion within properties after "setter = " orDouglas Gregor2009-11-191-31/+139
| | | | | | "getter = ", to provide suitable method names. llvm-svn: 89334
* Improve code completion for Objective-C message sends, so that weDouglas Gregor2009-11-191-22/+76
| | | | | | | | | | | provide completion results before each keyword argument, e.g., [foo Method:arg WithArg1:arg1 WithArg2:arg2] We now complete before "WithArg1" and before "WithArg2", in addition to completing before "Method". llvm-svn: 89290
* Improve the accuracy of code completion for the attributes of an @property ↵Douglas Gregor2009-11-191-8/+38
| | | | | | declaration, so that we don't produce completions for attributes that would conflict with already-specified attributes llvm-svn: 89281
* Improve code-completion results for the flags in an @propertyDouglas Gregor2009-11-191-7/+33
| | | | | | | | | declaration by providing patterns for "getter = <method>" and "setter = <method>". As part of this, invented a new "pattern" result kind that is merely a semantic string. The "pattern" result kind should help with other kinds of code templates. llvm-svn: 89277
* Rename CodeCompleteObjCProperty to something more specific. No functionality ↵Douglas Gregor2009-11-181-1/+1
| | | | | | change. llvm-svn: 89267
* Code completion after @dynamicDouglas Gregor2009-11-181-1/+1
| | | | llvm-svn: 89265
* Code completion for Objective-C @synthesized.Douglas Gregor2009-11-181-10/+85
| | | | llvm-svn: 89259
* Implement code completion for Objective-C category names in @interfaceDouglas Gregor2009-11-181-1/+67
| | | | | | and @implementation declarations. llvm-svn: 89223
OpenPOWER on IntegriCloud