forked from OSchip/llvm-project
Avoid undefined behavior from passing a std::vector's own contents
in as an argument to push_back. llvm-svn: 178166
This commit is contained in:
parent
f1af79ab45
commit
38a723830c
|
@ -1105,7 +1105,9 @@ void PredTransitions::getIntersectingVariants(
|
|||
// Push another copy of the current transition for more variants.
|
||||
Variant.TransVecIdx = TransVec.size();
|
||||
IntersectingVariants.push_back(Variant);
|
||||
TransVec.push_back(TransVec[TransIdx]);
|
||||
|
||||
PredTransition Trans = TransVec[TransIdx];
|
||||
TransVec.push_back(Trans);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue