hanchenye-llvm-project/clang/lib/Sema
Richard Smith 152bcd2d0d Switch the template specialization kind for a non-defining declaration of a
non-template function instantiated from a friend declaration in a class
template from TSK_ImplicitInstantiation to TSK_Undeclared.

It doesn't make sense for a non-template function to be flagged as being
instantiated from a template; that property really belongs to the entity
as a whole and not an individual declaration of it. There's some history
here:

 * r137934 started marking these functions as instantiations in order to
   work around an issue where we might instantiate a class template while
   we're still parsing its member definitions, and would otherwise fail
   to instantiate the friend definition

 * r177003 fixed the same issue but for friend templates, but did so by
   making the friends claim to be definitions even before we'd parsed
   their actual bodies; this made the r137934 change redundant

 * r293558 worked around a problem caused by the marking of a non-template
   function as a template instantiation in r137934

This change reverts the code changes from r293358 and r137934 and retains
all the tests.

llvm-svn: 293367
2017-01-28 02:56:07 +00:00
..
AnalysisBasedWarnings.cpp Avoid multiple -Wunreachable-code diagnostics that are triggered by 2017-01-12 10:48:03 +00:00
AttributeList.cpp Retire llvm::alignOf in favor of C++11 alignof. 2016-10-20 14:27:22 +00:00
CMakeLists.txt
CodeCompleteConsumer.cpp Retire llvm::alignOf in favor of C++11 alignof. 2016-10-20 14:27:22 +00:00
DeclSpec.cpp Recommit r289979 [OpenCL] Allow disabling types and declarations associated with extensions 2016-12-18 05:18:55 +00:00
DelayedDiagnostic.cpp [Sema] Delay partial availability diagnostics, just like deprecated 2016-10-28 21:39:27 +00:00
IdentifierResolver.cpp
JumpDiagnostics.cpp [Sema] Handle CaseStmt and DefaultStmt as SwitchCase 2016-10-26 02:00:00 +00:00
MultiplexExternalSemaSource.cpp [Sema] Use unique_ptr instead of raw pointers in the late-parsed templates map. 2016-10-10 16:26:08 +00:00
Scope.cpp
ScopeInfo.cpp [Sema][NFC] Reset HasFallthroughStmt when clearing FunctionScopeInfo 2016-11-09 22:52:23 +00:00
Sema.cpp Recommit r289979 [OpenCL] Allow disabling types and declarations associated with extensions 2016-12-18 05:18:55 +00:00
SemaAccess.cpp P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991: 2016-06-28 19:03:57 +00:00
SemaAttr.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
SemaCUDA.cpp [Sema] Replace remove_if+erase with erase_if. NFC. 2017-01-04 19:16:29 +00:00
SemaCXXScopeSpec.cpp PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310). 2017-01-19 21:00:13 +00:00
SemaCast.cpp Recommit r289979 [OpenCL] Allow disabling types and declarations associated with extensions 2016-12-18 05:18:55 +00:00
SemaChecking.cpp Change how we handle diagnose_if attributes. 2017-01-28 02:19:40 +00:00
SemaCodeComplete.cpp [CodeCompletion] Ensure that ObjC root class completes instance 2017-01-24 14:15:08 +00:00
SemaConsumer.cpp
SemaCoroutine.cpp Remove redundant passing around of a "ContainsAutoType" flag. 2017-01-12 02:27:38 +00:00
SemaDecl.cpp PR31783: Don't request the alignment of an invalid declaration. 2017-01-27 21:28:37 +00:00
SemaDeclAttr.cpp Add the diagnose_if attribute to clang. 2017-01-09 04:12:14 +00:00
SemaDeclCXX.cpp [Sema] Fix assumption about typo corrections containing no decl. 2017-01-24 12:49:59 +00:00
SemaDeclObjC.cpp Remove redundant passing around of a "ContainsAutoType" flag. 2017-01-12 02:27:38 +00:00
SemaExceptionSpec.cpp Fix completely bogus types for some builtins: 2016-12-19 23:59:34 +00:00
SemaExpr.cpp Change how we handle diagnose_if attributes. 2017-01-28 02:19:40 +00:00
SemaExprCXX.cpp Change how we handle diagnose_if attributes. 2017-01-28 02:19:40 +00:00
SemaExprMember.cpp PR23135: Don't instantiate constexpr functions referenced in unevaluated operands where possible. 2017-01-07 00:48:55 +00:00
SemaExprObjC.cpp More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_. 2016-12-02 23:00:28 +00:00
SemaFixItUtils.cpp
SemaInit.cpp PR31742: Don't emit a bogus "zero size array" extwarn when initializing a 2017-01-24 23:18:28 +00:00
SemaLambda.cpp [Sema] Add warning for unused lambda captures 2017-01-13 15:01:06 +00:00
SemaLookup.cpp Change how we handle diagnose_if attributes. 2017-01-28 02:19:40 +00:00
SemaObjCProperty.cpp Move checks for creation of objects of abstract class type from the various 2016-12-15 02:28:18 +00:00
SemaOpenMP.cpp [OpenMP] Support for thread_limit-clause on the 'target teams' directive. 2017-01-25 11:44:35 +00:00
SemaOverload.cpp Change how we handle diagnose_if attributes. 2017-01-28 02:19:40 +00:00
SemaPseudoObject.cpp More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_. 2016-12-02 23:00:28 +00:00
SemaStmt.cpp Remove redundant passing around of a "ContainsAutoType" flag. 2017-01-12 02:27:38 +00:00
SemaStmtAsm.cpp Fix build error caused by r290539. 2016-12-26 13:16:40 +00:00
SemaStmtAttr.cpp [OpenCL] Enable unroll hint for OpenCL 1.x. 2016-12-13 14:02:35 +00:00
SemaTemplate.cpp When converting a template argument representing &array to an expression for a 2017-01-28 00:38:35 +00:00
SemaTemplateDeduction.cpp PR0091R3: Implement parsing support for using templates as types. 2017-01-26 20:40:47 +00:00
SemaTemplateInstantiate.cpp Finish implementation of C++ DR1310 (http://wg21.link/cwg1310). 2017-01-20 00:20:39 +00:00
SemaTemplateInstantiateDecl.cpp Switch the template specialization kind for a non-defining declaration of a 2017-01-28 02:56:07 +00:00
SemaTemplateVariadic.cpp [c++1z] P0195R2: Support pack-expansion of using-declarations. 2016-12-20 21:35:28 +00:00
SemaType.cpp [OpenCL] Add missing address spaces in IR generation of blocks 2017-01-27 15:11:34 +00:00
TreeTransform.h PR0091R3: Implement parsing support for using templates as types. 2017-01-26 20:40:47 +00:00
TypeLocBuilder.cpp
TypeLocBuilder.h Retire llvm::alignOf in favor of C++11 alignof. 2016-10-20 14:27:22 +00:00