Platform headers don't always define 'va_list' in terms of Clang's
'__builtin_va_list', so in addition to checking for our own
synthesized decl, also just look for typedefs literally named
'va_list'. Better to err on the side of false negatives here.
Fix-up for rdar://problem/
25846421.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286531
91177308-0d34-0410-b5e6-
96231b3b80d8
do {
if (typedefTy->getDecl() == vaListTypedef)
return true;
+ if (auto *name = typedefTy->getDecl()->getIdentifier())
+ if (name->isStr("va_list"))
+ return true;
typedefTy = typedefTy->desugar()->getAs<TypedefType>();
} while (typedefTy);
return false;