[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

S. B. Tam via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 06:56:03 PDT 2019


cpplearner added a comment.

In D65050#1608777 <https://reviews.llvm.org/D65050#1608777>, @efriedma wrote:

> > this looks like it could be a Core Issue
>
> I think the issue is clang-specific. clang splits the standard notion of a dependent type into two separate bits, for the sake of diagnostics: `isDependentType()`, and `isInstantiationDependentType()`.  `isInstantiationDependentType()` reflects the actual standard definition of a dependent type; `isDependentType()` is a type that can actually vary across instantiations.


According to comment in `include/clang/AST/Type.h` (https://github.com/llvm/llvm-project/blob/llvmorg-8.0.1/clang/include/clang/AST/Type.h#L1426), `Dependent` reflects the standard definition, while `InstantiationDependent` reflects "whether this type somehow involves a template parameter, even if the resolution of the type does not depend on a template parameter" (e.g. `decltype(sizeof(T))`).

Therefore, I agree with Aaron that this could be a Core issue.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65050/new/

https://reviews.llvm.org/D65050





More information about the cfe-commits mailing list