not be a pack expansion type. Using a pack expansion type for a pack declaration makes sense, but general expressions should never have pack expansion types. If we have a pack `T *...V`, then the type of `V` is the type `T *`, which contains an unexpanded pack, and is a pointer type. This allows us to better diagnose issues where a template is invalid due to some non-dependent portion of a dependent type of a non-type template parameter pack.
14 lines
287 B
C++
14 lines
287 B
C++
// RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s
|
|
|
|
// CHECK: PackExpansionExpr
|
|
// CHECK-SAME: '<dependent type>'
|
|
// CHECK-NEXT: DeclRefExpr
|
|
// CHECK-SAME: 'T'
|
|
// CHECK-SAME: ParmVar
|
|
// CHECK-SAME: 'a'
|
|
// CHECK-SAME: 'T...'
|
|
|
|
void expr() {
|
|
f();
|
|
}
|