PowerPC's va_list, at least, is a typedef for an array, which means it
decays to a pointer in parameter position. Since the decayed type is
built from the array element type, the typedef sugar is lost.
More rdar://problem/
25846421.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286533
91177308-0d34-0410-b5e6-
96231b3b80d8
}
auto isVaList = [&S](QualType T) -> bool {
+ // Handle array va_list parameters that decayed to pointers.
+ if (auto *decayedTy = T->getAs<DecayedType>())
+ T = decayedTy->getOriginalType();
+
auto *typedefTy = T->getAs<TypedefType>();
if (!typedefTy)
return false;