aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard@metafoo.co.uk>2020-07-28 12:09:16 -0700
committerRichard Smith <richard@metafoo.co.uk>2020-07-28 13:23:13 -0700
commit740a164dec483225cbd02ab6c82199e2747ffacb (patch)
treeb6b2150f1741dffbb75a9169831d707484f6705f /clang/lib/CodeGen/CodeGenFunction.cpp
parentb46176bbb094610460667edad950a9c99f844118 (diff)
downloadllvm-740a164dec483225cbd02ab6c82199e2747ffacb.zip
llvm-740a164dec483225cbd02ab6c82199e2747ffacb.tar.gz
llvm-740a164dec483225cbd02ab6c82199e2747ffacb.tar.bz2
PR46377: Fix dependence calculation for function types and typedef
types. We previously did not treat a function type as dependent if it had a parameter pack with a non-dependent type -- such a function type depends on the arity of the pack so is dependent even though none of the parameter types is dependent. In order to properly handle this, we now treat pack expansion types as always being dependent types (depending on at least the pack arity), and always canonically being pack expansion types, even in the unusual case when the pattern is not a dependent type. This does mean that we can have canonical types that are pack expansions that contain no unexpanded packs, which is unfortunate but not inaccurate. We also previously did not treat a typedef type as instantiation-dependent if its canonical type was not instantiation-dependent. That's wrong because instantiation-dependence is a property of the type sugar, not of the type; an instantiation-dependent type can have a non-instantiation-dependent canonical type.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 8ce488f..8f79cc77 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -2075,7 +2075,6 @@ void CodeGenFunction::EmitVariablyModifiedType(QualType type) {
case Type::UnaryTransform:
case Type::Attributed:
case Type::SubstTemplateTypeParm:
- case Type::PackExpansion:
case Type::MacroQualified:
// Keep walking after single level desugaring.
type = type.getSingleStepDesugaredType(getContext());