summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Have TypoCorrectionConsumer remember the TypoCorrections it returned.Kaelyn Takata2014-10-271-4/+12
| | | | | | | | | | | Two additional methods are provided: one to return the current correction (the last correction returned by getNextCorrection), and one to "reset" the state so that getNextCorrection will return the previous corrections before returning any new corrections. Also ensure that all TypoCorrections have valid source ranges. llvm-svn: 220694
* Pass around CorrectionCandidateCallbacks as unique_ptrs soKaelyn Takata2014-10-271-11/+16
| | | | | | TypoCorrectionConsumer can keep the callback around as long as needed. llvm-svn: 220693
* Move TypoCorrectionConsumer into a header.Kaelyn Takata2014-10-271-151/+2
| | | | | | | | | This makes it available outside of SemaLookup.cpp, as needed for the forthcoming TypoExpr AST node which will keep a TypoCorrectionConsumer that provides the possible typo corrections for that TypoExpr. llvm-svn: 220691
* Factor code into CXXRecordDecl::getTemplateInstantiationPattern() helperReid Kleckner2014-10-141-15/+2
| | | | | | | | | | | | | | | | | This moves some code from SemaType.cpp's hasVisibleDefinition() into DeclCXX.cpp so that it can be used elsewhere. I found one other instance of code trying to do the same thing, there are probably more. Search for getInstantiatedFrom() to try to find more. No functionality change. Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5783 llvm-svn: 219714
* -ms-extensions: Allow __super in return stements.Nikola Smiljanic2014-10-041-2/+11
| | | | llvm-svn: 219050
* -ms-extensions: Implement __super scope specifier (PR13236).Nikola Smiljanic2014-09-261-0/+21
| | | | | | | | | We build a NestedNameSpecifier that records the CXXRecordDecl in which __super appeared. Name lookup is performed in all base classes of the recorded CXXRecordDecl. Use of __super is allowed only inside class and member function scope. llvm-svn: 218484
* Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor ↵Craig Topper2014-08-301-2/+2
| | | | | | and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>. llvm-svn: 216824
* Factor out exception specification information fromRichard Smith2014-07-311-2/+1
| | | | | | | | FunctionProtoType::ExtProtoInfo. Most of the users of these fields don't care about the other ExtProtoInfo bits and just want to talk about the exception specification. llvm-svn: 214450
* Add another keyword-selection flag to CorrectionCandidateCallback.Kaelyn Takata2014-07-281-1/+9
| | | | | | | | | | The new flag, WantFunctionLikeCasts, covers a subset of the keywords covered by WantTypeSpecifiers that can be used in casts that look like function calls, e.g. "return long(5);", while excluding the keywords like "enum" and "const" that would be included when WantTypeSpecifiers is true but cannot be used in something that looks like a function call. llvm-svn: 214109
* Switching some iterator-based for loops to use range-based for loops. No ↵Aaron Ballman2014-07-151-49/+28
| | | | | | functional changes intended. llvm-svn: 213098
* Added the pack_elements range accessor. Refactoring some for loops to use ↵Aaron Ballman2014-07-151-4/+2
| | | | | | range-based for loops instead. No functional changes intended. llvm-svn: 213095
* Fix typos.Nikola Smiljanic2014-07-091-1/+1
| | | | llvm-svn: 212589
* Propagate isAddressOfMember into typo correction so that we don't correct ↵Nick Lewycky2014-06-231-6/+19
| | | | | | &qualified-id into &unqualified-id. Also make sure to set the naming class when we find the qualified-id in a different class than the nested name specifier specified so far. Fixes PR19681! llvm-svn: 211551
* Fix the caller of checkCorrectionVisibility too.Kaelyn Takata2014-06-171-1/+1
| | | | | | | | That's what I get for hurredly splitting the small change out of a much bigger change that had moved where checkCorrectionVisibility was being called. llvm-svn: 211134
* Remove an unused argument from checkCorrectionVisibility.Kaelyn Takata2014-06-171-2/+1
| | | | llvm-svn: 211133
* Fix the VS2012 build.Hans Wennborg2014-06-111-5/+7
| | | | | | It didn't handle the in-class member initializer and compound literal. llvm-svn: 210707
* Add some comments to TypoCorrectionConsumer.Kaelyn Takata2014-06-111-26/+49
| | | | | | | | | | | Also move the constructor for NamespaceSpecifierSet out of line to improve the class' readability. I meant to do these two things while cleaning up the previous TypoCorrectionConsumer changes and have them folded into those changes. No functionality changed. llvm-svn: 210686
* Sink SpecifierInfo into the only class that uses it.Kaelyn Takata2014-06-111-18/+13
| | | | | | | | | | | | | SpecifierInfo is not used outside of NamespaceSpecifierSet except indirectly through NamespaceSpecifierSet's iterator, so clean up the code a bit by moving SpecifierInfo into NamespaceSpecifierSet. Also drop SpecifierInfo's trivial yet verbose constructor since brace initiialization is sufficient in the only two places the constructor was being explicitly called. No functionality changed. llvm-svn: 210672
* Make a couple of helper classes private to TypoCorrectionConsumer.Kaelyn Takata2014-06-111-81/+87
| | | | | | | | | | | The SpecifierInfo and NamespaceSpecifierSet are now only used by TypoCorrectionConsumer, so treat them as the implementation details of TypoCorrectionConsumer that they are. Also make NamespaceSpecifierSet's method names more style guide compliant. No functionality changed. llvm-svn: 210671
* Clean up the TypoCorrectionConsumer's interface a bit.Kaelyn Takata2014-06-111-37/+26
| | | | | | No functionality changed. llvm-svn: 210670
* Move TypoCorrection filtering into the TypoCorrectionConsumer and make it ↵Kaelyn Takata2014-06-111-257/+253
| | | | | | | | | | | | incremental. The only external/visible functional change that fell out of this refactoring is that there was one less case where the typo caching and/or counting didn't work properly. The result is that a test case had to be moved from typo-correction.cpp to typo-correction-pt2.cpp to avoid the hard-coded limit on per file/TU typo correction attempts. llvm-svn: 210669
* Move a few classes to be before TypoCorrectionConsumer.Kaelyn Takata2014-06-111-129/+134
| | | | | | | | | | | This is in preparation for moving TypoCorrection filtering into the TypoCorrectionConsumer, to separate out some of the purely mechanical churn. It also makes some of the method names in NamespaceSpecifierSet be more style guide compliant. No functionality changed. llvm-svn: 210668
* Remove a redundant conditional when caching typo failures.Kaelyn Takata2014-06-101-6/+5
| | | | | | No functionality change. llvm-svn: 210583
* [C++11] Use 'nullptr'. Sema edition.Craig Topper2014-05-261-44/+45
| | | | llvm-svn: 209613
* fmodules-search-all: Removed dead code and added some comments.John Thompson2014-05-071-6/+5
| | | | llvm-svn: 208259
* If an instantiation of a template is required to be a complete type, checkRichard Smith2014-05-071-3/+3
| | | | | | | whether the definition of the template is visible rather than checking whether the instantiated definition happens to be in an imported module. llvm-svn: 208150
* Fix a bunch of mislayered clang/Lex includes from SemaAlp Toker2014-05-031-2/+2
| | | | llvm-svn: 207896
* Quick fix for layering that broke shared library build.John Thompson2014-04-231-27/+7
| | | | llvm-svn: 207011
* Initial implementation of -modules-earch-all option, for searching for ↵John Thompson2014-04-231-2/+34
| | | | | | symbols in non-imported modules. llvm-svn: 206977
* Implement [over.match.oper]p3 properly, by filtering the non-candidates outRichard Smith2014-04-171-84/+6
| | | | | | | when building the candidate set, rather than trying to contort name lookup into handling this. llvm-svn: 206436
* PR19452: Implement more of [over.match.oper]p3's restrictions on which ↵Richard Smith2014-04-171-14/+18
| | | | | | non-member overloaded operators can be found when no operand is of class type. We used to fail to implement this rule if there was an operand of dependent type. llvm-svn: 206435
* Fix handling of redeclaration lookup for using declarations, where the priorRichard Smith2014-04-111-3/+6
| | | | | | | | | | | declaration is not visible. Previously we didn't find hidden friend names in this redeclaration lookup, because we forgot to treat it as a redeclaration lookup. Conversely, we did find some local extern names, but those don't actually conflict with a namespace-scope using declaration, because the only conflicts we can get are scope conflicts, not conflicts due to the entities being members of the same namespace. llvm-svn: 206011
* Try harder about not suggesting methods as corrections when theyKaelyn Takata2014-04-041-9/+11
| | | | | | | | obviously won't work. Specifically, don't suggest methods (static or not) from unrelated classes when the expression is a method call through a specific object. llvm-svn: 205653
* Fix self-referential comment.Richard Smith2014-04-011-2/+1
| | | | llvm-svn: 205340
* Be a bit smarter about what nested name qualifiers to allow whenKaelyn Uhrain2014-03-211-7/+11
| | | | | | performing typo correction on very short (1 or 2 char) identifiers. llvm-svn: 204525
* [C++11] Simplify some loops in Sema::CorrectTypo as range-based for loops.Kaelyn Uhrain2014-03-211-24/+14
| | | | llvm-svn: 204524
* [C++11] Replacing DeclContext iterators using_directives_begin() and ↵Aaron Ballman2014-03-171-9/+7
| | | | | | using_directives_end() with iterator_range using_directives(). Updating all of the usages of the iterators with range-based for loops, and removing the no-longer-needed iterator versions. Also used as an opportunity to normalize the name from getUsingDirectives() to using_directives(). llvm-svn: 204061
* [C++11] Replacing Scope iterators using_directives_begin() and ↵Aaron Ballman2014-03-171-4/+2
| | | | | | using_directives_end() with iterator_range using_directives(). Updating all of the usages of the iterators with range-based for loops, and removing the no-longer-needed iterator versions. llvm-svn: 204053
* [C++11] Replacing Scope iterators decl_begin() and decl_end() with ↵Aaron Ballman2014-03-171-3/+2
| | | | | | iterator_range decls(). Updating all of the usages of the iterators with range-based for loops, and removing the no-longer-needed iterator versions. llvm-svn: 204052
* [C++11] Replacing ObjCObjectPointerType iterators qual_begin() and ↵Aaron Ballman2014-03-171-4/+2
| | | | | | qual_end() with iterator_range quals(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204048
* [C++11] Replacing FunctionProtoType iterators param_type_begin() and ↵Aaron Ballman2014-03-171-5/+2
| | | | | | param_type_end() with iterator_range param_types(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204045
* Call RequireCompleteType when performing ADL even if the type is alreadyRichard Smith2014-03-141-6/+8
| | | | | | | | complete. We hook into this check from a couple of other places (modules, debug info) so it's not OK to elide the check if the type was already complete. llvm-svn: 203978
* [C++11] Removing the types_begin() and types_end() APIs and replacing with a ↵Aaron Ballman2014-03-141-4/+2
| | | | | | range-only types() API. llvm-svn: 203971
* [C++11] Replacing DeclContext iterators lookups_begin() and lookups_end() ↵Aaron Ballman2014-03-141-7/+3
| | | | | | with iterator_range lookups(). Similar for noload_lookups(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203933
* [C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-141-3/+2
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203922
* [C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-131-3/+2
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203863
* [C++11] Replacing ObjCInterfaceDecl iterators visible_categories_begin() and ↵Aaron Ballman2014-03-131-5/+2
| | | | | | visible_categories_end() with iterator_range visible_categories(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203851
* [C++11] Replacing ObjCInterfaceDecl iterators ↵Aaron Ballman2014-03-131-4/+2
| | | | | | all_referenced_protocol_begin() and all_referenced_protocol_end() with iterator_range all_referenced_protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203848
* [C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with ↵Aaron Ballman2014-03-131-8/+4
| | | | | | iterator_range bases(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203803
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-121-3/+3
| | | | | | class. llvm-svn: 203640
OpenPOWER on IntegriCloud