summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-1/+1
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* [C++11] Updating getUsingDirectives to use iterator_range instead of a ↵Aaron Ballman2014-03-071-8/+5
| | | | | | std::pair. llvm-svn: 203239
* [C++11] Replacing iterators redecls_begin() and redecls_end() with ↵Aaron Ballman2014-03-061-3/+2
| | | | | | iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/end forms to be removed entirely. llvm-svn: 203179
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-021-7/+7
| | | | llvm-svn: 202639
* [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.Benjamin Kramer2014-03-021-1/+1
| | | | llvm-svn: 202635
* Don't suggest non-static methods as corrections when they obviouslyKaelyn Uhrain2014-02-281-5/+27
| | | | | | | won't work (i.e. when not doing a member lookup and not in a method from the same class or a descendant class). llvm-svn: 202520
* PR18685: Ignore class template specializations as potentialKaelyn Uhrain2014-02-091-0/+7
| | | | | | | nested-name-specifiers for typos unless the typo already has a nested-name-specifier that is a template specialization. llvm-svn: 201056
* Don't consider records with a NULL identifier as a name for typo correction.Kaelyn Uhrain2014-02-051-1/+1
| | | | | | | | | Because in C++, "anonymous" doesn't mean "nameless" for records. In other words, RecordDecl::isAnonymousStructOrUnion only returns true if the record lacks a name *and* is not used as the type in an object's declaration. llvm-svn: 200868
* Add implicit declarations of allocation functions when looking them up forRichard Smith2014-02-041-21/+19
| | | | | | | | redeclaration, not just when looking them up for a use -- we need the implicit declaration to appropriately check various properties of them (notably, whether they're deleted). llvm-svn: 200729
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-251-1/+1
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* Don't forget about a builtin if we're about to redeclare it and we couldn'tRichard Smith2014-01-221-8/+0
| | | | | | | | | | | | | create an implicit declaration of it (because some type it depends on is unavailable). This had the effect of causing us to not implicitly give it the right attributes. It turns out that glibc's __sigsetjmp is declared before sigjmp_buf is declared, and this resulted in us not implicitly giving it __attribute__((returns_twice)), which in turn resulted in miscompiles in any C code calling glibc's sigsetjmp. (See also the vaguely-related sourceware.org/PR4662.) llvm-svn: 199850
* Introduce and use Decl::getAsFunction() to simplify templated function checksAlp Toker2014-01-221-23/+7
| | | | | | | | | | | | | | Lift the getFunctionDecl() utility out of the parser into a general Decl::getAsFunction() and use it to simplify other parts of the implementation. Reduce isFunctionOrFunctionTemplate() to a simple type check that works the same was as the other is* functions and move unwrapping of shadowed decls to callers so it doesn't get run twice. Shuffle around canSkipFunctionBody() to reduce virtual dispatch on ASTConsumer. There's no need to query when we already know the body can't be skipped. llvm-svn: 199794
* Rename FunctionProtoType accessors from 'arguments' to 'parameters'Alp Toker2014-01-201-8/+9
| | | | | | | | | | | | | | | | | Fix a perennial source of confusion in the clang type system: Declarations and function prototypes have parameters to which arguments are supplied, so calling these 'arguments' was a stretch even in C mode, let alone C++ where default arguments, templates and overloading make the distinction important to get right. Readability win across the board, especially in the casting, ADL and overloading implementations which make a lot more sense at a glance now. Will keep an eye on the builders and update dependent projects shortly. No functional change. llvm-svn: 199686
* Rename language option MicrosoftMode to MSVCCompatAlp Toker2014-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | There's been long-standing confusion over the role of these two options. This commit makes the necessary changes to differentiate them clearly, following up from r198936. MicrosoftExt (aka. fms-extensions): Enable largely unobjectionable Microsoft language extensions to ease portability. This mode, also supported by gcc, is used for building software like FreeBSD and Linux kernel extensions that share code with Windows drivers. MSVCCompat (aka. -fms-compatibility, formerly MicrosoftMode): Turn on a special mode supporting 'heinous' extensions for drop-in compatibility with the Microsoft Visual C++ product. Standards-compilant C and C++ code isn't guaranteed to work in this mode. Implies MicrosoftExt. Note that full -fms-compatibility mode is currently enabled by default on the Windows target, which may need tuning to serve as a reasonable default. See cfe-commits for the full discourse, thread 'r198497 - Move MS predefined type_info out of InitializePredefinedMacros' No change in behaviour. llvm-svn: 199209
* Use the appropriate SourceLocation for the template backtrace when doingNick Lewycky2014-01-111-1/+1
| | | | | | template argument deduction. llvm-svn: 198995
* Eliminate the last trivial NDEBUG uses in clang headersAlp Toker2013-12-071-1/+2
| | | | | | assert(sanity()) reads so much better than preprocessor conditional blocks. llvm-svn: 196657
* Sema: Make helper function static.Benjamin Kramer2013-11-011-1/+1
| | | | llvm-svn: 193857
* PR17731: When determining whether a tag and a non-tag were declared in the sameRichard Smith2013-10-301-2/+17
| | | | | | | scope, be careful about function-scope declarations (which are not declared in their semantic context). llvm-svn: 193671
* Allow CorrectTypo to replace CXXScopeSpecifiers that refer to classes.Kaelyn Uhrain2013-10-191-1/+13
| | | | | | | | | | | Now that CorrectTypo knows how to correctly search classes for typo correction candidates, there is no good reason to only replace an existing CXXScopeSpecifier if it refers to a namespace. While the actual enablement was a matter of changing a single comparison, the fallout from enabling the functionality required a lot more code changes (including my two previous commits). llvm-svn: 193020
* Be smarter about deciding to add a leading '::' to aKaelyn Uhrain2013-10-191-22/+49
| | | | | | NestedNameSpecifier that replaces an existing specifier. llvm-svn: 193019
* Merge NamespaceSpecifierSet's AddNamespace and AddRecord as they areKaelyn Uhrain2013-10-191-75/+9
| | | | | | essentially the same. llvm-svn: 193018
* PR17592: Ensure we diagnose shadowing a template parameter with a local externRichard Smith2013-10-161-2/+4
| | | | | | declaration. llvm-svn: 192846
* Fixed code style of my change.Serge Pavlov2013-10-151-1/+1
| | | | llvm-svn: 192708
* Do not use typo correction that is unaccessible.Serge Pavlov2013-10-141-2/+9
| | | | | | | | This patch fixes PR17019. When doing typo correction, Sema::CorrectTypo uses correction already seen for the same typo. This causes problems if that correction is from another scope and cannot be accessed in the current. llvm-svn: 192594
OpenPOWER on IntegriCloud