diff --git a/FileCheck.cpp b/FileCheck.cpp index 00d5240..28ab3bf 100644 --- a/FileCheck.cpp +++ b/FileCheck.cpp @@ -18,9 +18,7 @@ #include "llvm/FileCheck/FileCheck.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/InitLLVM.h" -#include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Process.h" -#include "llvm/Support/SourceMgr.h" #include "llvm/Support/WithColor.h" #include "llvm/Support/raw_ostream.h" #include @@ -81,7 +79,7 @@ static cl::opt AllowEmptyInput( "checks that some error message does not occur, for example.")); static cl::opt AllowUnusedPrefixes( - "allow-unused-prefixes", + "allow-unused-prefixes", cl::init(false), cl::ZeroOrMore, cl::desc("Allow prefixes to be specified but not appear in the test.")); static cl::opt MatchFullLines( @@ -104,12 +102,12 @@ static cl::opt AllowDeprecatedDagOverlap( "non-overlapping CHECK-DAG implementation.\n")); static cl::opt Verbose( - "v", + "v", cl::init(false), cl::ZeroOrMore, cl::desc("Print directive pattern matches, or add them to the input dump\n" "if enabled.\n")); static cl::opt VerboseVerbose( - "vv", + "vv", cl::init(false), cl::ZeroOrMore, cl::desc("Print information helpful in diagnosing internal FileCheck\n" "issues, or add it to the input dump if enabled. Implies\n" "-v.\n")); @@ -369,8 +367,6 @@ static std::string GetCheckTypeAbbreviation(Check::FileCheckType Ty) { return "bad-not"; case Check::CheckBadCount: return "bad-count"; - case Check::CheckMisspelled: - return "misspelled"; case Check::CheckNone: llvm_unreachable("invalid FileCheckType"); } @@ -634,7 +630,7 @@ static void DumpAnnotatedInput(raw_ostream &OS, const FileCheckRequest &Req, // -dump-input-filter. However, in case the resulting ellipsis would occupy // more lines than the input lines and annotations it elides, buffer the // elided lines and annotations so we can print them instead. - raw_ostream *LineOS; + raw_ostream *LineOS = &OS; if ((!PrevLineInFilter || PrevLineInFilter + DumpInputContext < Line) && (NextLineInFilter == UINT_MAX || Line + DumpInputContext < NextLineInFilter)) diff --git a/not.cpp b/not.cpp index 920f3fc..5519495 100644 --- a/not.cpp +++ b/not.cpp @@ -58,8 +58,7 @@ int main(int argc, const char **argv) { for (int i = 0; i < argc; ++i) Argv.push_back(argv[i]); std::string ErrMsg; - int Result = - sys::ExecuteAndWait(*Program, Argv, std::nullopt, {}, 0, 0, &ErrMsg); + int Result = sys::ExecuteAndWait(*Program, Argv, None, {}, 0, 0, &ErrMsg); #ifdef _WIN32 // Handle abort() in msvcrt -- It has exit code as 3. abort(), aka // unreachable, should be recognized as a crash. However, some binaries use