Skip to content

Commit

Permalink
[Concepts] Fix crash in D41910
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D41910
  • Loading branch information
saarraz committed Dec 18, 2019
1 parent c7abf88 commit 12038be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaConcept.cpp
Expand Up @@ -558,7 +558,7 @@ static bool substituteParameterMappings(Sema &S, NormalizedConstraint &N,
Atomic.ParameterMapping.emplace();
Atomic.ParameterMapping->reserve(OccurringIndices.size());
for (unsigned I = 0, C = TemplateParams->size(); I != C; ++I)
if (OccurringIndices[I])
if (I < OccurringIndices.size() && OccurringIndices[I])
Atomic.ParameterMapping->push_back(
S.getIdentityTemplateArgumentLoc(TemplateParams->begin()[I],
// Here we assume we do not support things like
Expand Down

0 comments on commit 12038be

Please sign in to comment.