File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -921,14 +921,10 @@ void ASTStmtReader::VisitRequiresExpr(RequiresExpr *E) {
921
921
case concepts::Requirement::RK_Nested: {
922
922
bool HasInvalidConstraint = Record.readInt ();
923
923
if (HasInvalidConstraint) {
924
- std::string InvalidConstraint = Record.readString ();
925
- char *InvalidConstraintBuf =
926
- new (Record.getContext ()) char [InvalidConstraint.size ()];
927
- std::copy (InvalidConstraint.begin (), InvalidConstraint.end (),
928
- InvalidConstraintBuf);
924
+ StringRef InvalidConstraint =
925
+ saveStrToCtx (Record.readString (), Record.getContext ());
929
926
R = new (Record.getContext ()) concepts::NestedRequirement (
930
- Record.getContext (),
931
- StringRef (InvalidConstraintBuf, InvalidConstraint.size ()),
927
+ Record.getContext (), InvalidConstraint,
932
928
readConstraintSatisfaction (Record));
933
929
break ;
934
930
}
You can’t perform that action at this time.
0 commit comments