Lines Matching full:unexpanded
26 // Visitor that collects unexpanded parameter packs
30 /// \brief A class that collects unexpanded parameter packs.
37 SmallVectorImpl<UnexpandedParameterPack> &Unexpanded;
43 SmallVectorImpl<UnexpandedParameterPack> &Unexpanded)
44 : Unexpanded(Unexpanded), InLambda(false) { }
49 // Recording occurrences of (unexpanded) parameter packs.
55 Unexpanded.push_back(std::make_pair(TL.getTypePtr(), TL.getNameLoc()));
66 Unexpanded.push_back(std::make_pair(T, SourceLocation()));
75 Unexpanded.push_back(std::make_pair(E->getDecl(), E->getLocation()));
86 Unexpanded.push_back(std::make_pair(TTP, SourceLocation()));
108 // Pruning the search for unexpanded parameter packs.
112 /// do not contain unexpanded parameter packs.
122 /// unexpanded parameter packs.
131 /// that do not contain unexpanded parameter packs.
142 /// they cannot contain unexpanded parameter packs.
166 /// \brief Note whether we're traversing a lambda containing an unexpanded
167 /// parameter pack. In this case, the unexpanded pack can occur anywhere,
169 /// lambda, we don't propagate the 'contains unexpanded parameter pack' bit
188 Unexpanded.push_back(std::make_pair(VD, I->getLocation()));
200 /// \brief Determine whether it's possible for an unexpanded parameter pack to
205 /// This is conservatively correct, but may claim that some unexpanded packs are
214 /// \brief Diagnose all of the unexpanded parameter packs in the given
219 ArrayRef<UnexpandedParameterPack> Unexpanded) {
220 if (Unexpanded.empty())
223 // If we are within a lambda expression, that lambda contains an unexpanded
225 // FIXME: Store 'Unexpanded' on the lambda so we don't need to recompute it
239 for (unsigned I = 0, N = Unexpanded.size(); I != N; ++I) {
242 = Unexpanded[I].first.dyn_cast<const TemplateTypeParmType *>())
245 Name = Unexpanded[I].first.get<NamedDecl *>()->getIdentifier();
250 if (Unexpanded[I].second.isValid())
251 Locations.push_back(Unexpanded[I].second);
273 SmallVector<UnexpandedParameterPack, 2> Unexpanded;
274 CollectUnexpandedParameterPacksVisitor(Unexpanded).TraverseTypeLoc(
276 assert(!Unexpanded.empty() && "Unable to find unexpanded parameter packs");
277 return DiagnoseUnexpandedParameterPacks(Loc, UPPC, Unexpanded);
288 SmallVector<UnexpandedParameterPack, 2> Unexpanded;
289 CollectUnexpandedParameterPacksVisitor(Unexpanded).TraverseStmt(E);
290 assert(!Unexpanded.empty() && "Unable to find unexpanded parameter packs");
291 return DiagnoseUnexpandedParameterPacks(E->getLocStart(), UPPC, Unexpanded);
303 SmallVector<UnexpandedParameterPack, 2> Unexpanded;
304 CollectUnexpandedParameterPacksVisitor(Unexpanded)
306 assert(!Unexpanded.empty() && "Unable to find unexpanded parameter packs");
308 UPPC, Unexpanded);
339 SmallVector<UnexpandedParameterPack, 2> Unexpanded;
340 CollectUnexpandedParameterPacksVisitor(Unexpanded)
342 assert(!Unexpanded.empty() && "Unable to find unexpanded parameter packs");
343 return DiagnoseUnexpandedParameterPacks(NameInfo.getLoc(), UPPC, Unexpanded);
353 SmallVector<UnexpandedParameterPack, 2> Unexpanded;
354 CollectUnexpandedParameterPacksVisitor(Unexpanded)
356 assert(!Unexpanded.empty() && "Unable to find unexpanded parameter packs");
357 return DiagnoseUnexpandedParameterPacks(Loc, UPPC, Unexpanded);
366 SmallVector<UnexpandedParameterPack, 2> Unexpanded;
367 CollectUnexpandedParameterPacksVisitor(Unexpanded)
369 assert(!Unexpanded.empty() && "Unable to find unexpanded parameter packs");
370 return DiagnoseUnexpandedParameterPacks(Arg.getLocation(), UPPC, Unexpanded);
374 SmallVectorImpl<UnexpandedParameterPack> &Unexpanded) {
375 CollectUnexpandedParameterPacksVisitor(Unexpanded)
380 SmallVectorImpl<UnexpandedParameterPack> &Unexpanded) {
381 CollectUnexpandedParameterPacksVisitor(Unexpanded)
386 SmallVectorImpl<UnexpandedParameterPack> &Unexpanded) {
387 CollectUnexpandedParameterPacksVisitor(Unexpanded).TraverseType(T);
391 SmallVectorImpl<UnexpandedParameterPack> &Unexpanded) {
392 CollectUnexpandedParameterPacksVisitor(Unexpanded).TraverseTypeLoc(TL);
396 SmallVectorImpl<UnexpandedParameterPack> &Unexpanded) {
402 CollectUnexpandedParameterPacksVisitor(Unexpanded)
407 SmallVectorImpl<UnexpandedParameterPack> &Unexpanded) {
408 CollectUnexpandedParameterPacksVisitor(Unexpanded)
540 ArrayRef<UnexpandedParameterPack> Unexpanded,
548 for (ArrayRef<UnexpandedParameterPack>::iterator i = Unexpanded.begin(),
549 end = Unexpanded.end();
649 SmallVector<UnexpandedParameterPack, 2> Unexpanded;
650 CollectUnexpandedParameterPacksVisitor(Unexpanded).TraverseType(Pattern);
653 for (unsigned I = 0, N = Unexpanded.size(); I != N; ++I) {
659 = Unexpanded[I].first.dyn_cast<const TemplateTypeParmType *>()) {
663 NamedDecl *ND = Unexpanded[I].first.get<NamedDecl *>();
670 Unexpanded[I].first.get<NamedDecl *>());
672 // The pattern refers to an unexpanded pack. We're not ready to expand
959 // either e1 shall contain an unexpanded parameter pack or e2 shall contain
960 // an unexpanded parameter pack, but not both.
972 // In a unary fold, the cast-expression shall contain an unexpanded