@@ -1766,8 +1766,7 @@ void FileCheckPatternContext::createLineVariable() {
1766
1766
}
1767
1767
1768
1768
FileCheck::FileCheck (FileCheckRequest Req)
1769
- : Req(Req), PatternContext(std::make_unique<FileCheckPatternContext>()),
1770
- CheckStrings(std::make_unique<std::vector<FileCheckString>>()) {}
1769
+ : Req(Req), PatternContext(std::make_unique<FileCheckPatternContext>()) {}
1771
1770
1772
1771
FileCheck::~FileCheck () = default ;
1773
1772
@@ -1916,7 +1915,7 @@ bool FileCheck::readCheckFile(
1916
1915
// Verify that CHECK-NEXT/SAME/EMPTY lines have at least one CHECK line before them.
1917
1916
if ((CheckTy == Check::CheckNext || CheckTy == Check::CheckSame ||
1918
1917
CheckTy == Check::CheckEmpty) &&
1919
- CheckStrings-> empty ()) {
1918
+ CheckStrings. empty ()) {
1920
1919
StringRef Type = CheckTy == Check::CheckNext
1921
1920
? " NEXT"
1922
1921
: CheckTy == Check::CheckEmpty ? " EMPTY" : " SAME" ;
@@ -1934,8 +1933,8 @@ bool FileCheck::readCheckFile(
1934
1933
}
1935
1934
1936
1935
// Okay, add the string we captured to the output vector and move on.
1937
- CheckStrings-> emplace_back (P, UsedPrefix, PatternLoc);
1938
- std::swap (DagNotMatches, CheckStrings-> back ().DagNotStrings );
1936
+ CheckStrings. emplace_back (P, UsedPrefix, PatternLoc);
1937
+ std::swap (DagNotMatches, CheckStrings. back ().DagNotStrings );
1939
1938
DagNotMatches = ImplicitNegativeChecks;
1940
1939
}
1941
1940
@@ -1962,10 +1961,10 @@ bool FileCheck::readCheckFile(
1962
1961
// Add an EOF pattern for any trailing --implicit-check-not/CHECK-DAG/-NOTs,
1963
1962
// and use the first prefix as a filler for the error message.
1964
1963
if (!DagNotMatches.empty ()) {
1965
- CheckStrings-> emplace_back (
1964
+ CheckStrings. emplace_back (
1966
1965
Pattern (Check::CheckEOF, PatternContext.get (), LineNumber + 1 ),
1967
1966
*Req.CheckPrefixes .begin (), SMLoc::getFromPointer (Buffer.data ()));
1968
- std::swap (DagNotMatches, CheckStrings-> back ().DagNotStrings );
1967
+ std::swap (DagNotMatches, CheckStrings. back ().DagNotStrings );
1969
1968
}
1970
1969
1971
1970
return false ;
@@ -2676,13 +2675,13 @@ bool FileCheck::checkInput(SourceMgr &SM, StringRef Buffer,
2676
2675
std::vector<FileCheckDiag> *Diags) {
2677
2676
bool ChecksFailed = false ;
2678
2677
2679
- unsigned i = 0 , j = 0 , e = CheckStrings-> size ();
2678
+ unsigned i = 0 , j = 0 , e = CheckStrings. size ();
2680
2679
while (true ) {
2681
2680
StringRef CheckRegion;
2682
2681
if (j == e) {
2683
2682
CheckRegion = Buffer;
2684
2683
} else {
2685
- const FileCheckString &CheckLabelStr = (* CheckStrings) [j];
2684
+ const FileCheckString &CheckLabelStr = CheckStrings[j];
2686
2685
if (CheckLabelStr.Pat .getCheckTy () != Check::CheckLabel) {
2687
2686
++j;
2688
2687
continue ;
@@ -2708,7 +2707,7 @@ bool FileCheck::checkInput(SourceMgr &SM, StringRef Buffer,
2708
2707
PatternContext->clearLocalVars ();
2709
2708
2710
2709
for (; i != j; ++i) {
2711
- const FileCheckString &CheckStr = (* CheckStrings) [i];
2710
+ const FileCheckString &CheckStr = CheckStrings[i];
2712
2711
2713
2712
// Check each string within the scanned region, including a second check
2714
2713
// of any final CHECK-LABEL (to verify CHECK-NOT and CHECK-DAG)
0 commit comments