llvm-project/clang/lib/Sema
Douglas Gregor 678d76c026 Introduce the notion of instantiation dependence into Clang's AST. A
type/expression/template argument/etc. is instantiation-dependent if
it somehow involves a template parameter, even if it doesn't meet the
requirements for the more common kinds of dependence (dependent type,
type-dependent expression, value-dependent expression).

When we see an instantiation-dependent type, we know we always need to
perform substitution into that instantiation-dependent type. This
keeps us from short-circuiting evaluation in places where we
shouldn't, and lets us properly implement C++0x [temp.type]p2.

In theory, this would also allow us to properly mangle
instantiation-dependent-but-not-dependent decltype types per the
Itanium C++ ABI, but we aren't quite there because we still mangle
based on the canonical type in cases like, e.g.,

  template<unsigned> struct A { };
  template<typename T>
    void f(A<sizeof(sizeof(decltype(T() + T())))>) { }
  template void f<int>(A<sizeof(sizeof(int))>);

and therefore get the wrong answer.

llvm-svn: 134225
2011-07-01 01:22:09 +00:00
..
AnalysisBasedWarnings.cpp Teach CFG building how to deal with CXXMemberCallExprs and BoundMemberTy, 2011-05-11 07:19:11 +00:00
AttributeList.cpp Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'. 2011-06-24 00:08:59 +00:00
CMakeLists.txt Move all of Sema's member-access-related checking out of SemaExpr.cpp 2011-06-23 00:49:38 +00:00
CodeCompleteConsumer.cpp Implement a new 'availability' attribute, that allows one to specify 2011-03-23 00:50:03 +00:00
DeclSpec.cpp Fix a couple more issues related to r133854: 2011-06-25 02:28:38 +00:00
DelayedDiagnostic.cpp Automatic Reference Counting. 2011-06-15 23:02:42 +00:00
IdentifierResolver.cpp Fix the insertion of label declarations into the identifier chain in 2011-03-24 10:35:39 +00:00
JumpDiagnostics.cpp Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'. 2011-06-24 00:08:59 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
Scope.cpp Store a parameter index and function prototype depth in every 2011-05-01 22:35:37 +00:00
Sema.cpp Add support for C++ namespace-aware typo correction, e.g., correcting 2011-06-28 16:20:02 +00:00
SemaAccess.cpp Implement caching of default constructors on the resolution table. This 2011-06-10 03:50:41 +00:00
SemaAttr.cpp Add ms_struct attribute on record typee 2011-04-26 17:54:40 +00:00
SemaCXXCast.cpp ^cat^cast^ 2011-06-21 18:21:32 +00:00
SemaCXXScopeSpec.cpp Add support for C++ namespace-aware typo correction, e.g., correcting 2011-06-28 16:20:02 +00:00
SemaChecking.cpp objc-arc: Check on a variety of unsafe assignment of retained 2011-06-24 18:25:34 +00:00
SemaCodeComplete.cpp Automatic Reference Counting. 2011-06-15 23:02:42 +00:00
SemaDecl.cpp When redeclaring a local extern in the same scope, make sure that we 2011-06-29 21:22:02 +00:00
SemaDeclAttr.cpp Fix an obvious typo in an attribute's diagnostics. 2011-06-30 08:14:54 +00:00
SemaDeclCXX.cpp Add support for C++ namespace-aware typo correction, e.g., correcting 2011-06-28 16:20:02 +00:00
SemaDeclObjC.cpp Add support for C++ namespace-aware typo correction, e.g., correcting 2011-06-28 16:20:02 +00:00
SemaExceptionSpec.cpp Implement support for C++11 in-class initialization of non-static data members. 2011-06-11 17:19:42 +00:00
SemaExpr.cpp Add support for C++ namespace-aware typo correction, e.g., correcting 2011-06-28 16:20:02 +00:00
SemaExprCXX.cpp Perform lvalue-to-rvalue conversions on both operands of ->* 2011-06-30 17:15:34 +00:00
SemaExprMember.cpp Add support for C++ namespace-aware typo correction, e.g., correcting 2011-06-28 16:20:02 +00:00
SemaExprObjC.cpp Add support for C++ namespace-aware typo correction, e.g., correcting 2011-06-28 16:20:02 +00:00
SemaInit.cpp Check for deprecated/unavailable/etc attributes on fields that are 2011-06-29 21:51:31 +00:00
SemaLookup.cpp Fix non-determinism in selecting between equal-length names which refer 2011-06-28 22:48:40 +00:00
SemaObjCProperty.cpp objc-arc/mrc: Allow ns_returns_not_retained attribute on properties 2011-06-25 00:17:46 +00:00
SemaOverload.cpp Fix missing braces around two statements that were intended to be part 2011-06-27 08:31:58 +00:00
SemaStmt.cpp Improve the wording of the warning when returning a value from 2011-06-30 08:56:22 +00:00
SemaTemplate.cpp Introduce the notion of instantiation dependence into Clang's AST. A 2011-07-01 01:22:09 +00:00
SemaTemplateDeduction.cpp Accept no-return stripping conversions for pointer type arguments after 2011-06-18 01:19:03 +00:00
SemaTemplateInstantiate.cpp Introduce the notion of instantiation dependence into Clang's AST. A 2011-07-01 01:22:09 +00:00
SemaTemplateInstantiateDecl.cpp Introduce the notion of instantiation dependence into Clang's AST. A 2011-07-01 01:22:09 +00:00
SemaTemplateVariadic.cpp Add support for C++ namespace-aware typo correction, e.g., correcting 2011-06-28 16:20:02 +00:00
SemaType.cpp Introduce Declarator::CXXNewContext and remove 'AutoAllowedInTypeName' parameter 2011-06-28 03:01:23 +00:00
TargetAttributesSema.cpp Support for C++11 (non-template) alias declarations. 2011-04-15 14:24:37 +00:00
TargetAttributesSema.h Remove Sema.h's dependency on DeclCXX.h. 2010-08-25 07:42:41 +00:00
TreeTransform.h When instantiating a C++ "new" expression, don't fake source locations 2011-06-27 16:55:54 +00:00
TypeLocBuilder.h Remove more unnecessary #include <llvm/ADT/SmallVector.h> 2011-06-20 06:11:46 +00:00