From c83e08781e663905a2a07b7a35e5d92a3753f323 Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Fri, 5 Feb 2021 10:06:23 -0500 Subject: [PATCH 01/12] Remove the tests deleted in #364 from the list in test_updater. All 6 tests deleted in #364 except for complex_expressionBUG were in test_updater. --- clang/test/3C/test_updater.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/clang/test/3C/test_updater.py b/clang/test/3C/test_updater.py index 77ff1a753aa2..2608edaafedf 100755 --- a/clang/test/3C/test_updater.py +++ b/clang/test/3C/test_updater.py @@ -94,12 +94,9 @@ def process_smart(filename, diff): manual_tests = ['3d-allocation.c', 'alloc_type_param.c', 'amper.c', - 'anonstruct.c', - 'arrinlinestruct.c', 'calloc.c', 'canonical_type_cast.c', 'checkedregions.c', - 'complexinlinestruct.c', 'ex1.c', 'extGVar.c', 'extstructfields.c', @@ -116,8 +113,6 @@ def process_smart(filename, diff): 'i1.c', 'i2.c', 'i3.c', - 'inlinestruct_difflocs.c', - 'inlinestructinfunc.c', 'linkedlist.c', 'malloc_array.c', 'realloc.c', From 2fb795f1a7ec1eefdb66fa566721e99bcd3d778b Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Tue, 9 Feb 2021 18:14:21 -0500 Subject: [PATCH 02/12] test_updater: No tests have whitespace differences any more. --- clang/test/3C/test_updater.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/clang/test/3C/test_updater.py b/clang/test/3C/test_updater.py index 2608edaafedf..d1ee34cea7bd 100755 --- a/clang/test/3C/test_updater.py +++ b/clang/test/3C/test_updater.py @@ -97,6 +97,7 @@ def process_smart(filename, diff): 'calloc.c', 'canonical_type_cast.c', 'checkedregions.c', + 'compound_literal.c', 'ex1.c', 'extGVar.c', 'extstructfields.c', @@ -115,6 +116,8 @@ def process_smart(filename, diff): 'i3.c', 'linkedlist.c', 'malloc_array.c', + 'ptr_array.c', + 'ptrptr.c', 'realloc.c', 'realloc_complex.c', 'refarrsubscript.c', @@ -126,10 +129,8 @@ def process_smart(filename, diff): 'valist.c', 'cast.c'] -need_diff = ['compound_literal.c', -'graphs.c', -'ptr_array.c', -'ptrptr.c'] +# No tests currently produce whitespace differences. +need_diff = [] b_tests = ['b10_allsafepointerstruct.c', 'b11_calleestructnp.c', From 18ae7a7d5eead1f639868909bc2ae81ccddd1d60 Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Tue, 9 Feb 2021 21:00:59 -0500 Subject: [PATCH 03/12] The "interesting" part of the -output-dir, etc. PR. Code changes, dedicated regression tests for fixes/enhancements, and other closely related changes. See the PR description for details. --- clang-tools-extra/clangd/tool/ClangdMain.cpp | 12 +- clang/include/clang/3C/3C.h | 21 ++- clang/include/clang/3C/3CGlobalOptions.h | 2 + clang/include/clang/3C/RewriteUtils.h | 4 +- clang/include/clang/3C/Utils.h | 17 ++- clang/lib/3C/3C.cpp | 120 +++++++++++++++--- clang/lib/3C/ConstraintBuilder.cpp | 2 +- clang/lib/3C/PersistentSourceLoc.cpp | 4 +- clang/lib/3C/RewriteUtils.cpp | 92 +++++++++----- clang/lib/3C/Utils.cpp | 46 +++++-- .../3C/base_subdir/canwrite_constraints.c | 33 +++++ ...nwrite_constraints_function_and_variable.c | 37 ------ .../canwrite_constraints_symlink.c | 29 +++++ .../canwrite_constraints_typedef.c | 25 ---- .../canwrite_constraints_unimplemented.c | 39 ++++++ clang/test/3C/base_subdir_partial_defn.h | 12 ++ ..._and_variable.h => canwrite_constraints.h} | 2 +- clang/test/3C/processor.py | 22 ++-- clang/test/3C/stdout_mode_typedef.c | 22 ---- clang/test/3C/stdout_mode_write_other.c | 11 ++ clang/test/3C/test_updater.py | 26 ++-- clang/test/3C/testgenerator.py | 114 +++++++++-------- clang/tools/3c/3CStandalone.cpp | 112 +++++++++++++--- 23 files changed, 549 insertions(+), 255 deletions(-) create mode 100644 clang/test/3C/base_subdir/canwrite_constraints.c delete mode 100644 clang/test/3C/base_subdir/canwrite_constraints_function_and_variable.c create mode 100644 clang/test/3C/base_subdir/canwrite_constraints_symlink.c delete mode 100644 clang/test/3C/base_subdir/canwrite_constraints_typedef.c create mode 100644 clang/test/3C/base_subdir/canwrite_constraints_unimplemented.c create mode 100644 clang/test/3C/base_subdir_partial_defn.h rename clang/test/3C/{canwrite_constraints_function_and_variable.h => canwrite_constraints.h} (92%) delete mode 100644 clang/test/3C/stdout_mode_typedef.c create mode 100644 clang/test/3C/stdout_mode_write_other.c diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp index d477de6a6872..704d786b5409 100644 --- a/clang-tools-extra/clangd/tool/ClangdMain.cpp +++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -486,8 +486,16 @@ int main(int argc, char *argv[]) { // See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix // NOLINTNEXTLINE(readability-identifier-naming) - _3CInterface _3CInterface(CcOptions, OptionsParser.getSourcePathList(), - &(OptionsParser.getCompilations())); + std::unique_ptr<_3CInterface> _3CInterfacePtr( + _3CInterface::create(CcOptions, OptionsParser.getSourcePathList(), + &(OptionsParser.getCompilations()))); + if (!_3CInterfacePtr) { + // _3CInterface::create has already printed an error message. Just exit. + return 1; + } + // See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix + // NOLINTNEXTLINE(readability-identifier-naming) + _3CInterface &_3CInterface = *_3CInterfacePtr; #else llvm::cl::ParseCommandLineOptions( argc, argv, diff --git a/clang/include/clang/3C/3C.h b/clang/include/clang/3C/3C.h index 12629709e592..bb706196669f 100644 --- a/clang/include/clang/3C/3C.h +++ b/clang/include/clang/3C/3C.h @@ -32,6 +32,7 @@ struct _3COptions { bool Verbose; std::string OutputPostfix; + std::string OutputDir; std::string ConstraintOutputJson; @@ -50,6 +51,7 @@ struct _3COptions { bool EnablePropThruIType; std::string BaseDir; + bool AllowSourcesOutsideBaseDir; bool EnableAllTypes; @@ -86,9 +88,18 @@ class _3CInterface { // Mutex for this interface. std::mutex InterfaceMutex; - _3CInterface(const struct _3COptions &CCopt, - const std::vector &SourceFileList, - clang::tooling::CompilationDatabase *CompDB); + // If the parameters are invalid, this function prints an error message to + // stderr and returns null. + // + // There's no way for a constructor to report failure (we do not use + // exceptions), so use a factory method instead. Ideally we'd use an + // "optional" datatype that doesn't force heap allocation, but the only such + // datatype that is accepted in our codebase + // (https://llvm.org/docs/ProgrammersManual.html#fallible-constructors) seems + // too unwieldy to use right now. + static _3CInterface *create(const struct _3COptions &CCopt, + const std::vector &SourceFileList, + clang::tooling::CompilationDatabase *CompDB); // Constraint Building. @@ -121,6 +132,10 @@ class _3CInterface { bool writeConvertedFileToDisk(const std::string &FilePath); private: + _3CInterface(const struct _3COptions &CCopt, + const std::vector &SourceFileList, + clang::tooling::CompilationDatabase *CompDB, bool &Failed); + // Are constraints already built? bool ConstraintsBuilt; void invalidateAllConstraintsWithReason(Constraint *ConstraintToRemove); diff --git a/clang/include/clang/3C/3CGlobalOptions.h b/clang/include/clang/3C/3CGlobalOptions.h index c6111b341fae..e7f3719ac888 100644 --- a/clang/include/clang/3C/3CGlobalOptions.h +++ b/clang/include/clang/3C/3CGlobalOptions.h @@ -17,6 +17,8 @@ extern bool Verbose; extern bool DumpIntermediate; +extern std::string OutputPostfix; +extern std::string OutputDir; extern bool HandleVARARGS; extern bool SeperateMultipleFuncDecls; extern bool EnablePropThruIType; diff --git a/clang/include/clang/3C/RewriteUtils.h b/clang/include/clang/3C/RewriteUtils.h index f387a96fefb0..79c0382940d3 100644 --- a/clang/include/clang/3C/RewriteUtils.h +++ b/clang/include/clang/3C/RewriteUtils.h @@ -238,15 +238,13 @@ class ArrayBoundsRewriter { class RewriteConsumer : public ASTConsumer { public: - explicit RewriteConsumer(ProgramInfo &I, std::string &OPostfix) - : Info(I), OutputPostfix(OPostfix) {} + explicit RewriteConsumer(ProgramInfo &I) : Info(I) {} virtual void HandleTranslationUnit(ASTContext &Context); private: ProgramInfo &Info; static std::map ModifiedFuncSignatures; - std::string &OutputPostfix; // A single header file can be included in multiple translations units. This // set ensures that the diagnostics for a header file are not emitted each diff --git a/clang/include/clang/3C/Utils.h b/clang/include/clang/3C/Utils.h index 73846bfded63..52558cf89416 100644 --- a/clang/include/clang/3C/Utils.h +++ b/clang/include/clang/3C/Utils.h @@ -104,7 +104,19 @@ bool hasFunctionBody(clang::Decl *D); std::string getStorageQualifierString(clang::Decl *D); -bool getAbsoluteFilePath(std::string FileName, std::string &AbsoluteFp); +// Use this version for user input that has not yet been validated. +std::error_code tryGetCanonicalFilePath(const std::string &FileName, + std::string &AbsoluteFp); + +// This version asserts success. It may be used for convenience for files we are +// already accessing and thus believe should exist, modulo race conditions and +// the like. +void getCanonicalFilePath(const std::string &FileName, std::string &AbsoluteFp); + +// This compares entire path components: it's smart enough to know that "foo.c" +// does not start with "foo". It's not smart about anything else, so you should +// probably put both paths through getCanonicalFilePath first. +bool filePathStartsWith(const std::string &Path, const std::string &Prefix); bool isNULLExpression(clang::Expr *E, clang::ASTContext &C); @@ -147,6 +159,9 @@ bool isCastSafe(clang::QualType DstType, clang::QualType SrcType); // Check if the provided file path belongs to the input project // and can be rewritten. +// +// For accurate results, the path must have gone through getCanonicalFilePath. +// Note that the file name of a PersistentSourceLoc is always canonical. bool canWrite(const std::string &FilePath); // Check if the provided variable has void as one of its type. diff --git a/clang/lib/3C/3C.cpp b/clang/lib/3C/3C.cpp index 26a70d7fbf41..e3fec7fd7330 100644 --- a/clang/lib/3C/3C.cpp +++ b/clang/lib/3C/3C.cpp @@ -38,6 +38,7 @@ static cl::opt bool DumpIntermediate; bool Verbose; std::string OutputPostfix; +std::string OutputDir; std::string ConstraintOutputJson; std::vector AllocatorFunctions; bool DumpStats; @@ -89,7 +90,7 @@ class RewriteAction : public ASTFrontendAction { virtual std::unique_ptr CreateASTConsumer(CompilerInstance &Compiler, StringRef InFile) { - return std::unique_ptr(new T(Info, OutputPostfix)); + return std::unique_ptr(new T(Info)); } private: @@ -194,13 +195,28 @@ void runSolver(ProgramInfo &Info, std::set &SourceFiles) { } } +_3CInterface * +_3CInterface::create(const struct _3COptions &CCopt, + const std::vector &SourceFileList, + CompilationDatabase *CompDB) { + bool Failed = false; + _3CInterface *_3CInter = + new _3CInterface(CCopt, SourceFileList, CompDB, Failed); + if (Failed) { + delete _3CInter; + return nullptr; + } + return _3CInter; +} + _3CInterface::_3CInterface(const struct _3COptions &CCopt, const std::vector &SourceFileList, - CompilationDatabase *CompDB) { + CompilationDatabase *CompDB, bool &Failed) { DumpIntermediate = CCopt.DumpIntermediate; Verbose = CCopt.Verbose; OutputPostfix = CCopt.OutputPostfix; + OutputDir = CCopt.OutputDir; ConstraintOutputJson = CCopt.ConstraintOutputJson; StatsOutputJson = CCopt.StatsOutputJson; WildPtrInfoJson = CCopt.WildPtrInfoJson; @@ -231,35 +247,97 @@ _3CInterface::_3CInterface(const struct _3COptions &CCopt, ConstraintsBuilt = false; - // Get the absolute path of the base directory. - std::string TmpPath = BaseDir; - getAbsoluteFilePath(BaseDir, TmpPath); - BaseDir = TmpPath; + if (OutputPostfix != "-" && !OutputDir.empty()) { + errs() << "3C initialization error: Cannot use both -output-postfix and " + "-output-dir\n"; + Failed = true; + return; + } + if (OutputPostfix == "-" && OutputDir.empty() && SourceFileList.size() > 1) { + errs() << "3C initialization error: Cannot specify more than one input " + "file when output is to stdout\n"; + Failed = true; + return; + } + + std::string TmpPath; + std::error_code EC; if (BaseDir.empty()) { - SmallString<256> Cp; - if (std::error_code Ec = sys::fs::current_path(Cp)) { - errs() << "could not get current working dir\n"; - assert(false && "Unable to get determine working directory."); - } + BaseDir = "."; + } + + // Get the canonical path of the base directory. + TmpPath = BaseDir; + EC = tryGetCanonicalFilePath(BaseDir, TmpPath); + if (EC) { + errs() << "3C initialization error: Failed to canonicalize base directory " + "\"" << BaseDir << "\": " << EC.message() << "\n"; + Failed = true; + return; + } + BaseDir = TmpPath; - BaseDir = Cp.str(); + if (!OutputDir.empty()) { + // tryGetCanonicalFilePath will fail if the output dir doesn't exist yet, so + // create it first. + EC = llvm::sys::fs::create_directories(OutputDir); + if (EC) { + errs() << "3C initialization error: Failed to create output directory \"" + << OutputDir << "\": " << EC.message() << "\n"; + Failed = true; + return; + } + TmpPath = OutputDir; + EC = tryGetCanonicalFilePath(OutputDir, TmpPath); + if (EC) { + errs() << "3C initialization error: Failed to canonicalize output " + "directory \"" << OutputDir << "\": " << EC.message() << "\n"; + Failed = true; + return; + } + OutputDir = TmpPath; } SourceFiles = SourceFileList; + bool SawInputOutsideBaseDir = false; for (const auto &S : SourceFiles) { std::string AbsPath; - if (getAbsoluteFilePath(S, AbsPath)) - FilePaths.insert(AbsPath); + EC = tryGetCanonicalFilePath(S, AbsPath); + if (EC) { + errs() << "3C initialization error: Failed to canonicalize source file " + "path \"" << S << "\": " << EC.message() << "\n"; + Failed = true; + continue; + } + FilePaths.insert(AbsPath); + if (!filePathStartsWith(AbsPath, BaseDir)) { + errs() + << "3C initialization " + << (OutputDir != "" || !CCopt.AllowSourcesOutsideBaseDir ? "error" + : "warning") + << ": File \"" << AbsPath + << "\" specified on the command line is outside the base directory\n"; + SawInputOutsideBaseDir = true; + } + } + if (SawInputOutsideBaseDir) { + errs() << "The base directory is currently \"" << BaseDir + << "\" and can be changed with the -base-dir option.\n"; + if (OutputDir != "") { + Failed = true; + errs() << "When using -output-dir, input files outside the base " + "directory cannot be handled because there is no way to " + "compute their output paths.\n"; + } else if (!CCopt.AllowSourcesOutsideBaseDir) { + Failed = true; + errs() << "You can use the -allow-sources-outside-base-dir option to " + "temporarily downgrade this error to a warning.\n"; + } } CurrCompDB = CompDB; - - if (OutputPostfix == "-" && FilePaths.size() > 1) { - errs() << "If rewriting more than one , can't output to stdout\n"; - assert(false && "Rewriting more than one files requires OutputPostfix"); - } } bool _3CInterface::buildInitialConstraints() { @@ -295,7 +373,7 @@ bool _3CInterface::solveConstraints() { "build constraint before trying to solve them."); // 2. Solve constraints. if (Verbose) - outs() << "Solving constraints\n"; + errs() << "Solving constraints\n"; if (DumpIntermediate) GlobalProgramInfo.dump(); @@ -303,7 +381,7 @@ bool _3CInterface::solveConstraints() { runSolver(GlobalProgramInfo, FilePaths); if (Verbose) - outs() << "Constraints solved\n"; + errs() << "Constraints solved\n"; if (WarnRootCause) GlobalProgramInfo.computeInterimConstraintState(FilePaths); diff --git a/clang/lib/3C/ConstraintBuilder.cpp b/clang/lib/3C/ConstraintBuilder.cpp index 88cd87a0ea92..1d3d64320828 100644 --- a/clang/lib/3C/ConstraintBuilder.cpp +++ b/clang/lib/3C/ConstraintBuilder.cpp @@ -660,7 +660,7 @@ void ConstraintBuilderConsumer::HandleTranslationUnit(ASTContext &C) { TV.setProgramInfoTypeVars(); if (Verbose) - outs() << "Done analyzing\n"; + errs() << "Done analyzing\n"; Info.exitCompilationUnit(); return; diff --git a/clang/lib/3C/PersistentSourceLoc.cpp b/clang/lib/3C/PersistentSourceLoc.cpp index 56e3ef80ac3f..2531adcc177a 100644 --- a/clang/lib/3C/PersistentSourceLoc.cpp +++ b/clang/lib/3C/PersistentSourceLoc.cpp @@ -70,8 +70,8 @@ PersistentSourceLoc PersistentSourceLoc::mkPSL(clang::SourceRange SR, std::string FeAbsS = ""; if (Fe != nullptr) ToConv = Fe->getName(); - if (getAbsoluteFilePath(ToConv, FeAbsS)) - Fn = sys::path::remove_leading_dotslash(FeAbsS); + getCanonicalFilePath(ToConv, FeAbsS); + Fn = sys::path::remove_leading_dotslash(FeAbsS); } PersistentSourceLoc PSL(Fn, FESL.getExpansionLineNumber(), FESL.getExpansionColumnNumber(), EndCol); diff --git a/clang/lib/3C/RewriteUtils.cpp b/clang/lib/3C/RewriteUtils.cpp index d9206b01bc62..7d860e0202f5 100644 --- a/clang/lib/3C/RewriteUtils.cpp +++ b/clang/lib/3C/RewriteUtils.cpp @@ -132,10 +132,12 @@ bool canRewrite(Rewriter &R, SourceRange &SR) { return SR.isValid() && (R.getRangeSize(SR) != -1); } -static void emit(Rewriter &R, ASTContext &C, std::string &OutputPostfix) { +static void emit(Rewriter &R, ASTContext &C) { if (Verbose) errs() << "Writing files out\n"; + bool StdoutMode = (OutputPostfix == "-" && OutputDir.empty()); + bool StdoutModeSawMainFile = false; SourceManager &SM = C.getSourceManager(); // Iterate over each modified rewrite buffer for (auto Buffer = R.buffer_begin(); Buffer != R.buffer_end(); ++Buffer) { @@ -162,8 +164,7 @@ static void emit(Rewriter &R, ASTContext &C, std::string &OutputPostfix) { // Check whether we are allowed to write this file. std::string FeAbsS = ""; - if (getAbsoluteFilePath(FE->getName(), FeAbsS)) - FeAbsS = sys::path::remove_leading_dotslash(FeAbsS); + getCanonicalFilePath(FE->getName(), FeAbsS); if (!canWrite(FeAbsS)) { DiagnosticsEngine &DE = C.getDiagnostics(); unsigned ID = DE.getCustomDiagID( @@ -176,15 +177,11 @@ static void emit(Rewriter &R, ASTContext &C, std::string &OutputPostfix) { continue; } - if (OutputPostfix == "-") { - // Stdout mode - // TODO: If we don't have a rewrite buffer for the main file, that means - // we generated no changes to the file and we should print its original - // content - // (https://github.com/correctcomputation/checkedc-clang/issues/328#issuecomment-760243604). + if (StdoutMode) { if (Buffer->first == SM.getMainFileID()) { // This is the new version of the main file. Print it to stdout. Buffer->second.write(outs()); + StdoutModeSawMainFile = true; } else { DiagnosticsEngine &DE = C.getDiagnostics(); unsigned ID = DE.getCustomDiagID( @@ -198,36 +195,69 @@ static void emit(Rewriter &R, ASTContext &C, std::string &OutputPostfix) { continue; } - // -output-postfix mode - // Produce a path/file name for the rewritten source file. - // That path should be the same as the old one, with a - // suffix added between the file name and the extension. - // For example \foo\bar\a.c should become \foo\bar\a.checked.c - // if the OutputPostfix parameter is "checked" . - std::string PfName = sys::path::filename(FE->getName()).str(); - std::string DirName = sys::path::parent_path(FE->getName()).str(); - std::string FileName = sys::path::remove_leading_dotslash(PfName).str(); - std::string Ext = sys::path::extension(FileName).str(); - std::string Stem = sys::path::stem(FileName).str(); - std::string NFile = Stem + "." + OutputPostfix + Ext; - if (!DirName.empty()) - NFile = DirName + sys::path::get_separator().str() + NFile; - + std::string NFile; std::error_code EC; + + if (OutputPostfix != "-") { + // That path should be the same as the old one, with a + // suffix added between the file name and the extension. + // For example \foo\bar\a.c should become \foo\bar\a.checked.c + // if the OutputPostfix parameter is "checked" . + std::string PfName = sys::path::filename(FE->getName()).str(); + std::string DirName = sys::path::parent_path(FE->getName()).str(); + std::string FileName = sys::path::remove_leading_dotslash(PfName).str(); + std::string Ext = sys::path::extension(FileName).str(); + std::string Stem = sys::path::stem(FileName).str(); + NFile = Stem + "." + OutputPostfix + Ext; + if (!DirName.empty()) + NFile = DirName + sys::path::get_separator().str() + NFile; + } else { + assert(!OutputDir.empty()); + // If this does not hold when OutputDir is set, it should have been a + // fatal error in the _3CInterface constructor. + assert(filePathStartsWith(FeAbsS, BaseDir)); + // replace_path_prefix is not smart about separators, but this should be + // OK because getCanonicalFilePath should ensure that neither BaseDir + // nor OutputDir has a trailing separator. + SmallString<255> Tmp(FeAbsS); + llvm::sys::path::replace_path_prefix(Tmp, BaseDir, OutputDir); + NFile = Tmp.str(); + EC = llvm::sys::fs::create_directories(sys::path::parent_path(NFile)); + if (EC) { + DiagnosticsEngine &DE = C.getDiagnostics(); + unsigned ID = DE.getCustomDiagID( + DiagnosticsEngine::Error, + "failed to create parent directory of output file \"%0\""); + auto DiagBuilder = DE.Report(SM.translateFileLineCol(FE, 1, 1), ID); + DiagBuilder.AddString(NFile); + continue; + } + } + raw_fd_ostream Out(NFile, EC, sys::fs::F_None); if (!EC) { if (Verbose) - outs() << "writing out " << NFile << "\n"; + errs() << "writing out " << NFile << "\n"; Buffer->second.write(Out); - } else - errs() << "could not open file " << NFile << "\n"; - // This is awkward. What to do? Since we're iterating, we could have - // created other files successfully. Do we go back and erase them? Is - // that surprising? For now, let's just keep going. + } else { + DiagnosticsEngine &DE = C.getDiagnostics(); + unsigned ID = DE.getCustomDiagID(DiagnosticsEngine::Error, + "failed to write output file \"%0\""); + auto DiagBuilder = DE.Report(SM.translateFileLineCol(FE, 1, 1), ID); + DiagBuilder.AddString(NFile); + // This is awkward. What to do? Since we're iterating, we could have + // created other files successfully. Do we go back and erase them? Is + // that surprising? For now, let's just keep going. + } } } + + if (StdoutMode && !StdoutModeSawMainFile) { + // The main file is unchanged. Write out its original content. + outs() << SM.getBuffer(SM.getMainFileID())->getBuffer(); + } } // Rewrites types that inside other expressions. This includes cast expression @@ -486,7 +516,7 @@ void RewriteConsumer::HandleTranslationUnit(ASTContext &Context) { } // Output files. - emit(R, Context, OutputPostfix); + emit(R, Context); Info.exitCompilationUnit(); return; diff --git a/clang/lib/3C/Utils.cpp b/clang/lib/3C/Utils.cpp index cac6db17d8e0..4ca1512ebe70 100644 --- a/clang/lib/3C/Utils.cpp +++ b/clang/lib/3C/Utils.cpp @@ -12,6 +12,7 @@ #include "clang/3C/3CGlobalOptions.h" #include "clang/3C/ConstraintVariables.h" #include "llvm/Support/Path.h" +#include using namespace llvm; using namespace clang; @@ -151,13 +152,42 @@ bool isNULLExpression(clang::Expr *E, ASTContext &C) { E->isNullPointerConstant(C, Expr::NPC_ValueDependentIsNotNull); } -bool getAbsoluteFilePath(std::string FileName, std::string &AbsoluteFp) { - // Get absolute path of the provided file - // returns true if successful else false. - SmallString<255> AbsPath(FileName); - llvm::sys::fs::make_absolute(BaseDir, AbsPath); +std::error_code tryGetCanonicalFilePath(const std::string &FileName, std::string &AbsoluteFp) { + SmallString<255> AbsPath; + std::error_code EC; + if (FileName.empty()) { + // Strangely, llvm::sys::fs::real_path successfully returns the empty string + // in this case. Return ENOENT, as realpath(3) would. + EC = std::error_code(ENOENT, std::generic_category()); + } else { + EC = llvm::sys::fs::real_path(FileName, AbsPath); + } + if (EC) { + return EC; + } AbsoluteFp = AbsPath.str(); - return true; + return EC; +} + +void getCanonicalFilePath(const std::string &FileName, std::string &AbsoluteFp) { + std::error_code EC = tryGetCanonicalFilePath(FileName, AbsoluteFp); + assert(!EC && "tryGetCanonicalFilePath failed"); +} + +bool filePathStartsWith(const std::string &Path, const std::string &Prefix) { + // If the path exactly equals the prefix, don't ruin it by appending a + // separator to the prefix. (This may never happen in 3C, but let's get it + // right.) + if (Prefix.empty() || Path == Prefix) { + return true; + } + StringRef separator = llvm::sys::path::get_separator(); + std::string PrefixWithTrailingSeparator = Prefix; + if (!StringRef(Prefix).endswith(separator)) { + PrefixWithTrailingSeparator += separator; + } + return Path.substr(0, PrefixWithTrailingSeparator.size()) == + PrefixWithTrailingSeparator; } bool functionHasVarArgs(clang::FunctionDecl *FD) { @@ -347,9 +377,7 @@ bool canWrite(const std::string &FilePath) { return true; // Get the absolute path of the file and check that // the file path starts with the base directory. - std::string FileAbsPath = FilePath; - getAbsoluteFilePath(FilePath, FileAbsPath); - return FileAbsPath.rfind(BaseDir, 0) == 0; + return filePathStartsWith(FilePath, BaseDir); } bool isInSysHeader(clang::Decl *D) { diff --git a/clang/test/3C/base_subdir/canwrite_constraints.c b/clang/test/3C/base_subdir/canwrite_constraints.c new file mode 100644 index 000000000000..7469e9be2eb3 --- /dev/null +++ b/clang/test/3C/base_subdir/canwrite_constraints.c @@ -0,0 +1,33 @@ +// Test that non-canWrite files are constrained not to change so that the final +// annotations of other files are consistent with the original annotations of +// the non-canWrite files. The currently supported cases are function and +// variable declarations and checked regions. +// (https://github.com/correctcomputation/checkedc-clang/issues/387) + +// TODO: Windows compatibility? + +// RUN: rm -rf %t* + +// "Lower" case: -base-dir should default to the working directory, so we should +// not allow canwrite_constraints.h to change, and the internal types of q and +// the return should remain wild. +// +// RUN: cd %S && 3c -addcr -output-dir=%t.checked/base_subdir -warn-all-root-cause -verify %s -- +// RUN: FileCheck -match-full-lines -check-prefixes=CHECK_LOWER --input-file %t.checked/base_subdir/canwrite_constraints.c %s +// RUN: test ! -f %t.checked/canwrite_constraints.checked.h + +// "Higher" case: When -base-dir is set to the parent directory, we can change +// canwrite_constraints.h, so both q and the return should become checked. +// +// RUN: cd %S && 3c -addcr -base-dir=.. -output-dir=%t.checked2 %s -- +// RUN: FileCheck -match-full-lines -check-prefixes=CHECK_HIGHER --input-file %t.checked2/base_subdir/canwrite_constraints.c %s +// RUN: FileCheck -match-full-lines -check-prefixes=CHECK_HIGHER --input-file %t.checked2/canwrite_constraints.h %S/../canwrite_constraints.h + +#include "../canwrite_constraints.h" + +int *bar(int *q) { + // CHECK_LOWER: int *bar(int *q : itype(_Ptr)) : itype(_Ptr) { + // CHECK_HIGHER: _Ptr bar(_Ptr q) { + foo(q); + return foo_var; +} diff --git a/clang/test/3C/base_subdir/canwrite_constraints_function_and_variable.c b/clang/test/3C/base_subdir/canwrite_constraints_function_and_variable.c deleted file mode 100644 index 2b8f3cf84117..000000000000 --- a/clang/test/3C/base_subdir/canwrite_constraints_function_and_variable.c +++ /dev/null @@ -1,37 +0,0 @@ -// Test that non-canWrite files are constrained not to change so that the final -// annotations of other files are consistent with the original annotations of -// the non-canWrite files. The currently supported cases are function and -// variable declarations and checked regions. -// (https://github.com/correctcomputation/checkedc-clang/issues/387) - -// TODO: When https://github.com/correctcomputation/checkedc-clang/issues/327 is -// fixed, replace the absolute -I option with a .. in the #include directive. -// -// TODO: Windows compatibility? - -// "Lower" case: -base-dir should default to the working directory, so we should -// not allow canwrite_constraints_function_and_variable.h to change, and the -// internal types of q and the return should remain wild. -// -// RUN: cd %S && 3c -addcr -extra-arg=-I${PWD%/*} -output-postfix=checked -warn-all-root-cause -verify %s -// RUN: FileCheck -match-full-lines -check-prefixes=CHECK_LOWER --input-file %S/canwrite_constraints_function_and_variable.checked.c %s -// RUN: test ! -f %S/../canwrite_constraints_function_and_variable.checked.h -// RUN: rm %S/canwrite_constraints_function_and_variable.checked.c - -// "Higher" case: When -base-dir is set to the parent directory, we can change -// canwrite_constraints_function_and_variable.h, so both q and the return should -// become checked. -// -// RUN: cd %S && 3c -addcr -extra-arg=-I${PWD%/*} -base-dir=${PWD%/*} -output-postfix=checked %s -// RUN: FileCheck -match-full-lines -check-prefixes=CHECK_HIGHER --input-file %S/canwrite_constraints_function_and_variable.checked.c %s -// RUN: FileCheck -match-full-lines -check-prefixes=CHECK_HIGHER --input-file %S/../canwrite_constraints_function_and_variable.checked.h %S/../canwrite_constraints_function_and_variable.h -// RUN: rm %S/canwrite_constraints_function_and_variable.checked.c %S/../canwrite_constraints_function_and_variable.checked.h - -#include "canwrite_constraints_function_and_variable.h" - -int *bar(int *q) { - // CHECK_LOWER: int *bar(int *q : itype(_Ptr)) : itype(_Ptr) { - // CHECK_HIGHER: _Ptr bar(_Ptr q) { - foo(q); - return foo_var; -} diff --git a/clang/test/3C/base_subdir/canwrite_constraints_symlink.c b/clang/test/3C/base_subdir/canwrite_constraints_symlink.c new file mode 100644 index 000000000000..8f92359415b9 --- /dev/null +++ b/clang/test/3C/base_subdir/canwrite_constraints_symlink.c @@ -0,0 +1,29 @@ +// Like canwrite_constraints_unimplemented.c but tests the third former base dir +// matching bug from +// https://github.com/correctcomputation/checkedc-clang/issues/327: symlinks. +// See the comments in canwrite_constraints_unimplemented.c. + +// We can't assume we can make symlinks on Windows. +// UNSUPPORTED: system-windows + +// Set up the following structure: +// +// %t.base/ +// canwrite_constraints_symlink.c : copy of this file +// base_subdir_partial_defn.h -> clang/test/3C/base_subdir_partial_defn.h +// +// RUN: rm -rf %t* +// RUN: mkdir %t.base +// RUN: cp %s %t.base/canwrite_constraints_symlink.c +// RUN: ln -s %S/../base_subdir_partial_defn.h %t.base/base_subdir_partial_defn.h + +// Now 3C should know that it can't write to base_subdir_partial_defn.h because the symlink +// goes out of the base dir. +// +// RUN: cd %t.base && 3c -addcr -verify canwrite_constraints_symlink.c -- + +// expected-error@base_subdir_partial_defn.h:1 {{3C internal error: 3C generated changes to this file even though it is not allowed to write to the file}} +// expected-note@base_subdir_partial_defn.h:1 {{-dump-unwritable-changes}} + +void +#include "base_subdir_partial_defn.h" diff --git a/clang/test/3C/base_subdir/canwrite_constraints_typedef.c b/clang/test/3C/base_subdir/canwrite_constraints_typedef.c deleted file mode 100644 index e75b0d5a6bf1..000000000000 --- a/clang/test/3C/base_subdir/canwrite_constraints_typedef.c +++ /dev/null @@ -1,25 +0,0 @@ -// An example of a case (typedefs) that is not yet handled by the canWrite -// constraints code and causes 3C to generate a change to an unwritable file. -// Test that 3C generates an error diagnostic. -// (https://github.com/correctcomputation/checkedc-clang/issues/387) - -// TODO: Ditto the TODO comments from -// canwrite_constraints_function_and_variable.c re the RUN commands. -// RUN: cd %S && 3c -addcr -extra-arg=-I${PWD%/*} -verify %s | FileCheck -match-full-lines %s - -// expected-error@unwritable_typedef.h:1 {{3C internal error: 3C generated changes to this file even though it is not allowed to write to the file}} -// expected-note@unwritable_typedef.h:1 {{-dump-unwritable-changes}} - -#include "unwritable_typedef.h" - -foo_typedef p = ((void *)0); - -// To make sure we are testing what we want to test, make sure bar is rewritten -// as if foo_typedef is unconstrained. If foo_typedef were constrained, we'd -// expect bar to be rewritten differently. -int *bar(void) { - // CHECK: _Ptr bar(void) _Checked { - return p; - // Make sure 3C isn't inserting a cast or something clever like that. - // CHECK: return p; -} diff --git a/clang/test/3C/base_subdir/canwrite_constraints_unimplemented.c b/clang/test/3C/base_subdir/canwrite_constraints_unimplemented.c new file mode 100644 index 000000000000..9776cf953940 --- /dev/null +++ b/clang/test/3C/base_subdir/canwrite_constraints_unimplemented.c @@ -0,0 +1,39 @@ +// An example of a case that is not handled by the canWrite constraints code and +// causes 3C to generate a change to an unwritable file. Test that 3C generates +// an error diagnostic. +// (https://github.com/correctcomputation/checkedc-clang/issues/387) + +// TODO: Ditto the TODO comments from canwrite_constraints.c re the RUN +// commands. +// RUN: cd %S && 3c -addcr -verify %s -- + +// expected-error@../base_subdir_partial_defn.h:1 {{3C internal error: 3C generated changes to this file even though it is not allowed to write to the file}} +// expected-note@../base_subdir_partial_defn.h:1 {{-dump-unwritable-changes}} + +// The "../base_subdir_partial_defn.h" path is testing two former base dir matching bugs from +// https://github.com/correctcomputation/checkedc-clang/issues/327: +// +// 1. 3C canonicalizes ".." path elements. Otherwise, it would think ".." is a +// subdirectory of the current directory. +// +// 2. 3C compares entire path components and knows that +// base_subdir_partial_defn.h is not under base_subdir. +// +// It would be valid to test these cases in combination with either code that is +// correctly constrained or code for which constraining is unhandled. We choose +// the latter in order to keep all the "weird" stuff in this test file and leave +// canwrite_constraints.c sane. + +// Since the declaration of foo begins with the "void" in this (writable) file, +// 3C currently assumes the whole declaration is writable. Then 3C rewrites the +// declaration of the parameter "x", which is wholly within +// ../base_subdir_partial_defn.h; the rewriter seems to handle this with no +// trouble. But then the proposed change to an unwritable file trips the error +// we are testing. +// +// Changing 3C to handle such contrived preprocessor nonsense correctly is a low +// priority, so this test hopefully won't have to be changed for a while, if +// ever. + +void +#include "../base_subdir_partial_defn.h" diff --git a/clang/test/3C/base_subdir_partial_defn.h b/clang/test/3C/base_subdir_partial_defn.h new file mode 100644 index 000000000000..df1acf265ff4 --- /dev/null +++ b/clang/test/3C/base_subdir_partial_defn.h @@ -0,0 +1,12 @@ +// Used by base_subdir/canwrite_constraints_unimplemented.c and +// stdout_mode_write_other.c . +// +// This file has a strange name so that +// base_subdir/canwrite_constraints_unimplemented.c can test that 3C compares +// entire path components and knows that base_subdir_partial_defn.h is not under +// base_subdir (see +// https://github.com/correctcomputation/checkedc-clang/issues/327). + +// The lack of a return type here is intentional. The return type is in the file +// that includes base_subdir_partial_defn.h. +foo(int *x) {} diff --git a/clang/test/3C/canwrite_constraints_function_and_variable.h b/clang/test/3C/canwrite_constraints.h similarity index 92% rename from clang/test/3C/canwrite_constraints_function_and_variable.h rename to clang/test/3C/canwrite_constraints.h index eae977b5aa98..53e1346d8320 100644 --- a/clang/test/3C/canwrite_constraints_function_and_variable.h +++ b/clang/test/3C/canwrite_constraints.h @@ -1,4 +1,4 @@ -// Used by base_subdir/canwrite_constraints_function_and_variable.c . +// Used by base_subdir/canwrite_constraints.c . // Note: Only the test in which this file is non-writable verifies diagnostics // and will use the expected warning comments below. The test in which this file diff --git a/clang/test/3C/processor.py b/clang/test/3C/processor.py index ef00b8189c75..e4b96ad59038 100755 --- a/clang/test/3C/processor.py +++ b/clang/test/3C/processor.py @@ -86,7 +86,7 @@ def process_file_smart(name, cnameNOALL, cnameALL): file.close() noallfile.close() allfile.close() - os.system("rm {} {}".format(cnameNOALL, cnameALL)) + os.system("rm -r tmp.checkedALL tmp.checkedNOALL") # ensure all lines are the same length assert len(lines) == len(noall) == len(yeall), "fix file " + name @@ -104,12 +104,12 @@ def process_file_smart(name, cnameNOALL, cnameALL): else: lines[i] = line + "\n\t//CHECK_NOALL: " + noline.lstrip() + "\n\t//CHECK_ALL: " + yeline - run = "// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_ALL\",\"CHECK\" %s" - run += "\n// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_NOALL\",\"CHECK\" %s" - run += "\n// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -" - run += "\n// RUN: 3c -output-postfix=checked -alltypes %s" - run += "\n// RUN: 3c -alltypes %S/{} -- | count 0".format(name + "hecked.c", name + "hecked.c") - run += "\n// RUN: rm %S/{}\n".format(name + "hecked.c") + run = "// RUN: rm -rf %t*" + run += "\n// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_ALL\",\"CHECK\" %s" + run += "\n// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_NOALL\",\"CHECK\" %s" + run += "\n// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -" + run += "\n// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s --" + run += "\n// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/{} -- | diff %t.checked/{} -\n".format(name, name) file = open(name, "w+") file.write(run + "\n".join(lines)) @@ -124,8 +124,8 @@ def process_smart(filename): if "struct" in susproto or "struct" in sus or "struct" in foo or "struct" in bar: struct_needed = True - cnameNOALL = filename + "heckedNOALL.c" - cnameALL = filename + "heckedALL.c" + cnameNOALL = "tmp.checkedNOALL/" + filename + cnameALL = "tmp.checkedALL/" + filename test = [header, sus, foo, bar] if susproto != "" and struct_needed: test = [header, structs, susproto, foo, bar, sus] @@ -136,8 +136,8 @@ def process_smart(filename): file.write('\n\n'.join(test) + '\n') file.close() - os.system("{}3c -alltypes -addcr -output-postfix=checkedALL {}".format(bin_path, filename)) - os.system("{}3c -addcr -output-postfix=checkedNOALL {}".format(bin_path, filename)) + os.system("{}3c -alltypes -addcr -output-dir=tmp.checkedALL {} --".format(bin_path, filename)) + os.system("{}3c -addcr -output-dir=tmp.checkedNOALL {} --".format(bin_path, filename)) process_file_smart(filename, cnameNOALL, cnameALL) return diff --git a/clang/test/3C/stdout_mode_typedef.c b/clang/test/3C/stdout_mode_typedef.c deleted file mode 100644 index 1fbe704dda44..000000000000 --- a/clang/test/3C/stdout_mode_typedef.c +++ /dev/null @@ -1,22 +0,0 @@ -// Like the base_subdir/canwrite_constraints_typedef test except that writing -// unwritable_typedef.h is not restricted by the base dir, so we reach the -// stdout mode restriction. - -// RUN: 3c -base-dir=%S -addcr -verify %s | FileCheck -match-full-lines %s - -// expected-error@unwritable_typedef.h:1 {{3C generated changes to this file, which is under the base dir but is not the main file and thus cannot be written in stdout mode}} -// expected-note@unwritable_typedef.h:1 {{-dump-unwritable-changes}} - -#include "unwritable_typedef.h" - -foo_typedef p = ((void *)0); - -// To make sure we are testing what we want to test, make sure bar is rewritten -// as if foo_typedef is unconstrained. If foo_typedef were constrained, we'd -// expect bar to be written differently. -int *bar(void) { - // CHECK: _Ptr bar(void) _Checked { - return p; - // Make sure 3C isn't inserting a cast or something clever like that. - // CHECK: return p; -} diff --git a/clang/test/3C/stdout_mode_write_other.c b/clang/test/3C/stdout_mode_write_other.c new file mode 100644 index 000000000000..098ebc831e91 --- /dev/null +++ b/clang/test/3C/stdout_mode_write_other.c @@ -0,0 +1,11 @@ +// Like the base_subdir/canwrite_constraints_unimplemented test except that +// writing base_subdir_partial_defn.h is not restricted by the base dir, so we +// reach the stdout mode restriction. + +// RUN: 3c -base-dir=%S -addcr -verify %s -- + +// expected-error@base_subdir_partial_defn.h:1 {{3C generated changes to this file, which is under the base dir but is not the main file and thus cannot be written in stdout mode}} +// expected-note@base_subdir_partial_defn.h:1 {{-dump-unwritable-changes}} + +void +#include "base_subdir_partial_defn.h" diff --git a/clang/test/3C/test_updater.py b/clang/test/3C/test_updater.py index d1ee34cea7bd..1c918e190e05 100755 --- a/clang/test/3C/test_updater.py +++ b/clang/test/3C/test_updater.py @@ -45,7 +45,7 @@ def process_file_smart(name, cnameNOALL, cnameALL, diff): file.close() noallfile.close() allfile.close() - os.system("rm {} {}".format(cnameNOALL, cnameALL)) + os.system("rm -r tmp.checkedALL tmp.checkedNOALL") # ensure all lines are the same length assert len(lines) == len(noall) == len(yeall), "fix file " + name @@ -63,15 +63,13 @@ def process_file_smart(name, cnameNOALL, cnameALL, diff): else: lines[i] = line + "\n\t//CHECK_NOALL: " + noline.lstrip() + "\n\t//CHECK_ALL: " + yeline - run = "// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_ALL\",\"CHECK\" %s" - run += "\n// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_NOALL\",\"CHECK\" %s" - run += "\n// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -" - run += "\n// RUN: 3c -output-postfix=checked -alltypes %s" - if not diff: - run += "\n// RUN: 3c -alltypes %S/{} -- | count 0".format(name + "hecked.c") - else: - run += "\n// RUN: 3c -alltypes %S/{} -- | diff -w %S/{} -".format(name + "hecked.c", name + "hecked.c") - run += "\n// RUN: rm %S/{}\n".format(name + "hecked.c") + run = "// RUN: rm -rf %t*" + run += "\n// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_ALL\",\"CHECK\" %s" + run += "\n// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_NOALL\",\"CHECK\" %s" + run += "\n// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -" + run += "\n// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s --" + run += "\n// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/{} -- | diff{} %t.checked/{} -\n".format( + name, " -w" if diff else "", name) file = open(name, "w+") file.write(run + "\n".join(lines)) @@ -81,11 +79,11 @@ def process_file_smart(name, cnameNOALL, cnameALL, diff): def process_smart(filename, diff): strip_existing_annotations(filename) - cnameNOALL = filename + "heckedNOALL.c" - cnameALL = filename + "heckedALL.c" + cnameNOALL = "tmp.checkedNOALL/" + filename + cnameALL = "tmp.checkedALL/" + filename - os.system("{}3c -alltypes -addcr -output-postfix=checkedALL {}".format(bin_path, filename)) - os.system("{}3c -addcr -output-postfix=checkedNOALL {}".format(bin_path, filename)) + os.system("{}3c -alltypes -addcr -output-dir=tmp.checkedALL {} --".format(bin_path, filename)) + os.system("{}3c -addcr -output-dir=tmp.checkedNOALL {} --".format(bin_path, filename)) process_file_smart(filename, cnameNOALL, cnameALL, diff) return diff --git a/clang/test/3C/testgenerator.py b/clang/test/3C/testgenerator.py index f88409c92e4a..423e7d3c79a8 100755 --- a/clang/test/3C/testgenerator.py +++ b/clang/test/3C/testgenerator.py @@ -604,6 +604,14 @@ def process_file_smart(prefix, proto, suffix, name, cnameNOALL, cnameALL, name2, # ensure all lines are the same length assert len(lines2) == len(noall2) == len(yeall2), "fix file " + name + def runtime_cname(s): + assert s.startswith("tmp.") + return "%t." + s[len("tmp."):] + cnameNOALL = runtime_cname(cnameNOALL) + cnameALL = runtime_cname(cnameALL) + cname2NOALL = runtime_cname(cname2NOALL) + cname2ALL = runtime_cname(cname2ALL) + # our keywords that indicate we should add an annotation keywords = "int char struct double float".split(" ") ckeywords = "_Ptr _Array_ptr _Nt_array_ptr _Checked _Unchecked".split(" ") @@ -629,53 +637,45 @@ def process_file_smart(prefix, proto, suffix, name, cnameNOALL, cnameALL, name2, else: lines2[i] = line + "\n\t//CHECK_NOALL: " + noline.lstrip() + "\n\t//CHECK_ALL: " + yeline.lstrip() - run = "// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_ALL\",\"CHECK\" %s" - run += "\n// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_NOALL\",\"CHECK\" %s" - run += "\n// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -\n" - run += "\n// RUN: 3c -alltypes -output-postfix=checked %s" - run += "\n// RUN: 3c -alltypes %S/{} -- | count 0".format(name + "hecked.c") - run += "\n// RUN: rm %S/{}".format(name + "hecked.c") + run = "// RUN: rm -rf %t*" + run += "\n// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_ALL\",\"CHECK\" %s" + run += "\n// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes=\"CHECK_NOALL\",\"CHECK\" %s" + run += "\n// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -\n" + run += "\n// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s --" + run += "\n// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/{} -- | diff %t.checked/{} -".format(name, name) if proto=="multi": - run = "// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/" + name2 - run += "\n// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/" + name2 - run += "\n// RUN: %clang -c %S/{} %S/{}".format(cnameNOALL, cname2NOALL) - run += "\n// RUN: FileCheck -match-full-lines -check-prefixes=\"CHECK_NOALL\",\"CHECK\" --input-file %S/{} %s".format(cnameNOALL) - run += "\n// RUN: FileCheck -match-full-lines -check-prefixes=\"CHECK_ALL\",\"CHECK\" --input-file %S/{} %s".format(cnameALL) - run += "\n// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/{} %s".format(name2) - cname = name + "hecked.c" - cname2 = name2 + "hecked.c" - run += "\n// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/{} %S/{}".format(cname, cname2) - cnameALLtwice1 = cname + "onvert_again.c" - cnameALLtwice2 = cname2 + "onvert_again.c" - run += "\n// RUN: test ! -f %S/{}".format(cnameALLtwice1) - run += "\n// RUN: test ! -f %S/{}".format(cnameALLtwice2) - run += "\n// RUN: rm %S/{} %S/{}".format(cnameALL, cname2ALL) - run += "\n// RUN: rm %S/{} %S/{}".format(cnameNOALL, cname2NOALL) - run += "\n// RUN: rm %S/{} %S/{}".format(cname, cname2) - cnameNOALL2 = prefix + suffix + proto + "1.checkedNOALL2.c" - cnameALL2 = prefix + suffix + proto + "1.checkedALL2.c" - cname2NOALL2 = prefix + suffix + proto + "2.checkedNOALL2.c" - cname2ALL2 = prefix + suffix + proto + "2.checkedALL2.c" - cname = name + "hecked2.c" - cname2 = name2 + "hecked2.c" - cnameALLtwice1 = cname + "onvert_again.c" - cnameALLtwice2 = cname2 + "onvert_again.c" + run = "// RUN: rm -rf %t*" + run += "\n// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/{} --".format(name2) + run += "\n// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/{} --".format(name2) + run += "\n// RUN: %clang -working-directory=%t.checkedNOALL -c {} {}".format(name, name2) + run += "\n// RUN: FileCheck -match-full-lines -check-prefixes=\"CHECK_NOALL\",\"CHECK\" --input-file {} %s".format(cnameNOALL) + run += "\n// RUN: FileCheck -match-full-lines -check-prefixes=\"CHECK_ALL\",\"CHECK\" --input-file {} %s".format(cnameALL) + run += "\n// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/{} %s --".format(name2) + cname = "%t.checked/" + name + cname2 = "%t.checked/" + name2 + run += "\n// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again {} {} --".format(cname, cname2) + cnameALLtwice1 = "%t.convert_again/" + name + cnameALLtwice2 = "%t.convert_again/" + name2 + run += "\n// RUN: test ! -f {}".format(cnameALLtwice1) + run += "\n// RUN: test ! -f {}".format(cnameALLtwice2) + cnameNOALL2 = "%t.checkedNOALL2/" + name + cnameALL2 = "%t.checkedALL2/" + name + cname2NOALL2 = "%t.checkedNOALL2/" + name2 + cname2ALL2 = "%t.checkedALL2/" + name2 # uncomment the following lines if we ever decide we want to generate buggy tests that don't compile # if bug_generated: # cname21 = prefix + suffix + proto + "1_BUG.checked2.c" # cname22 = prefix + suffix + proto + "2_BUG.checked2.c" - run2 = "// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/{} %s".format(name) - run2 += "\n// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/{} %s".format(name) - run2 += "\n// RUN: %clang -c %S/{} %S/{}".format(cnameNOALL2, cname2NOALL2) - run2 += "\n// RUN: FileCheck -match-full-lines -check-prefixes=\"CHECK_NOALL\",\"CHECK\" --input-file %S/{} %s".format(cname2NOALL2) - run2 += "\n// RUN: FileCheck -match-full-lines -check-prefixes=\"CHECK_ALL\",\"CHECK\" --input-file %S/{} %s".format(cname2ALL2) - run2 += "\n// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/{} %s".format(name) - run2 += "\n// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/{} %S/{}".format(cname, cname2) - run2 += "\n// RUN: test ! -f %S/{}".format(cnameALLtwice1) - run2 += "\n// RUN: test ! -f %S/{}".format(cnameALLtwice2) - run2 += "\n// RUN: rm %S/{} %S/{}".format(cnameALL2, cname2ALL2) - run2 += "\n// RUN: rm %S/{} %S/{}".format(cnameNOALL2, cname2NOALL2) - run2 += "\n// RUN: rm %S/{} %S/{}".format(cname, cname2) + run2 = "// RUN: rm -rf %t*" + run2 += "\n// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/{} %s --".format(name) + run2 += "\n// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/{} %s --".format(name) + run2 += "\n// RUN: %clang -working-directory=%t.checkedNOALL2 -c {} {}".format(name, name2) + run2 += "\n// RUN: FileCheck -match-full-lines -check-prefixes=\"CHECK_NOALL\",\"CHECK\" --input-file {} %s".format(cname2NOALL2) + run2 += "\n// RUN: FileCheck -match-full-lines -check-prefixes=\"CHECK_ALL\",\"CHECK\" --input-file {} %s".format(cname2ALL2) + run2 += "\n// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/{} %s --".format(name) + run2 += "\n// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again {} {} --".format(cname, cname2) + run2 += "\n// RUN: test ! -f {}".format(cnameALLtwice1) + run2 += "\n// RUN: test ! -f {}".format(cnameALLtwice2) file = open(name, "w+") file.write(run + comment + "\n".join(lines)) @@ -693,8 +693,8 @@ def annot_gen_smart(prefix, proto, suffix): [susproto, sus, foo, bar] = method_gen(prefix, proto, suffix) name = prefix + proto + suffix + ".c" - cnameNOALL = prefix + proto + suffix + ".checkedNOALL.c" - cnameALL = prefix + proto + suffix + ".checkedALL.c" + cnameNOALL = "tmp.checkedNOALL/" + name + cnameALL = "tmp.checkedALL/" + name name2 = name cname2NOALL = cnameNOALL cname2ALL = cnameALL @@ -702,10 +702,10 @@ def annot_gen_smart(prefix, proto, suffix): if proto=="multi": name = prefix + suffix + proto + "1.c" name2 = prefix + suffix + proto + "2.c" - cnameNOALL = prefix + suffix + proto + "1.checkedNOALL.c" - cnameALL = prefix + suffix + proto + "1.checkedALL.c" - cname2NOALL = prefix + suffix + proto + "2.checkedNOALL.c" - cname2ALL = prefix + suffix + proto + "2.checkedALL.c" + cnameNOALL = "tmp.checkedNOALL/" + name + cnameALL = "tmp.checkedALL/" + name + cname2NOALL = "tmp.checkedNOALL/" + name2 + cname2ALL = "tmp.checkedALL/" + name2 if proto=="proto": test = header + definitions + susproto + foo + bar + sus elif proto=="multi": test = header + definitions2 + susproto + foo + bar @@ -725,23 +725,26 @@ def annot_gen_smart(prefix, proto, suffix): # run the porting tool on the file(s) if proto=="multi": - os.system("{}3c -alltypes -addcr -output-postfix=checkedALL {} {}".format(bin_path, name, name2)) - os.system("{}3c -addcr -output-postfix=checkedNOALL {} {}".format(bin_path, name, name2)) + os.system("{}3c -alltypes -addcr -output-dir=tmp.checkedALL {} {} --".format(bin_path, name, name2)) + os.system("{}3c -addcr -output-dir=tmp.checkedNOALL {} {} --".format(bin_path, name, name2)) else: - os.system("{}3c -alltypes -addcr -output-postfix=checkedALL {}".format(bin_path, name)) - os.system("{}3c -addcr -output-postfix=checkedNOALL {}".format(bin_path, name)) + os.system("{}3c -alltypes -addcr -output-dir=tmp.checkedALL {} --".format(bin_path, name)) + os.system("{}3c -addcr -output-dir=tmp.checkedNOALL {} --".format(bin_path, name)) # compile the files and if it doesn't compile, then let's indicate that a bug was generated for this file bug_generated = False if proto != "multi": - out = subprocess.Popen(['{}clang'.format(bin_path), '-c', cnameNOALL], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + # Avoid leaving an object file in the working directory. + out = subprocess.Popen(['{}clang'.format(bin_path), '-c', '-o', '/dev/null', cnameNOALL], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout, stderr = out.communicate() stdout = str(stdout) if "error:" in stdout: bug_generated = True # name = prefix + proto + suffix + "_BUG.c" else: - out = subprocess.Popen(['{}clang'.format(bin_path), '-c', cnameNOALL, cname2NOALL], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + # In this case, since there are two source files, clang will give an error if we try to + # specify a single output file with -o. -working-directory seems to be the easiest solution. + out = subprocess.Popen(['{}clang'.format(bin_path), '-working-directory=tmp.checkedNOALL', '-c', name, name2], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout, stderr = out.communicate() stdout = str(stdout) if "error:" in stdout: @@ -759,11 +762,10 @@ def annot_gen_smart(prefix, proto, suffix): process_file_smart(prefix, proto, suffix, name, cnameNOALL, cnameALL, name2, cname2NOALL, cname2ALL) + os.system("rm -r tmp.checkedALL tmp.checkedNOALL") return #arr, arrinstruct, arrofstruct if __name__ == "__main__": - os.system("rm *.checked*") for skeleton in testnames: annot_gen_smart(skeleton[0], skeleton[1], skeleton[2]) - os.system("rm *.checked*") diff --git a/clang/tools/3c/3CStandalone.cpp b/clang/tools/3c/3CStandalone.cpp index 1ca5978cb431..4e1be4a1ce51 100644 --- a/clang/tools/3c/3CStandalone.cpp +++ b/clang/tools/3c/3CStandalone.cpp @@ -22,8 +22,55 @@ using namespace llvm; // See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix // NOLINTNEXTLINE(readability-identifier-naming) static cl::OptionCategory _3CCategory("3C options"); +static const char *HelpOverview = + "3c: Automatically infer Checked C annotations for an existing C program " + "(or one already partially converted to Checked C)\n"; static cl::extrahelp CommonHelp(CommonOptionsParser::HelpMessage); -static cl::extrahelp MoreHelp(""); + +// Use a raw string to reduce the clutter of escape sequences and make it easier +// to line-wrap the message using a text editor. We actually want the final +// blank line in the message; the initial one just helps the editor know what +// text it is supposed to wrap. +// +// XXX: The first two paragraphs are common to all Clang LibTooling-based +// tools and would ideally go in CommonOptionsParser::HelpMessage or +// somewhere else that users will find. But unless/until we pursue that, we +// document that information here for 3c. +static const char MoreHelpStr[] = R"( + +By default, 3c (like any Clang LibTooling-based tool) automatically searches for +a compilation database based on the -p option or (if that option is not +specified) the path of the first source file. If no compilation database is +found, 3c prints a warning. If one is found, 3c looks up each source file +specified on the command line in the compilation database to find the compiler +options to use for that file. Thus, if you give 3c a compilation database +generated by your build system, it will use the same compiler options as your +build system (which may be different for each file). You can add options via +-extra-arg and -extra-arg-before. If you want to run 3c on all source files in +your compilation database, you must pass them on the command line; 3c will not +take the list automatically from the compilation database. If you specify a +source file that is not in the database, 3c will use the compiler options from +the most "similar looking" file in the database according to a set of +heuristics. + +If you _do not_ want to use a compilation database, pass "--" after all other 3c +arguments. This is important to ensure that 3c doesn't automatically detect a +compilation database and use compiler options you do not want from a "similar +looking" file in the database. The "--" may be followed by compiler options that +you want to use for all source files (this is equivalent to specifying those +options via -extra-arg before the "--"). + +You can use either -output-dir or -output-postfix to control the paths at which +3c writes the new versions of your files. If you use neither, then you can only +pass one source file on the command line and the new version of that file is +written to stdout ("stdout mode"), but 3c still solves for changes to all files +under the -base-dir that are "#include"-d by that file and it is an error if any +other file changes. + +)"; + +// Skip the 2 initial newlines. +static cl::extrahelp MoreHelp(MoreHelpStr + 2); static cl::opt OptDumpIntermediate("dump-intermediate", cl::desc("Dump intermediate " @@ -35,11 +82,18 @@ static cl::opt OptVerbose("verbose", "information"), cl::init(false), cl::cat(_3CCategory)); -static cl::opt - OptOutputPostfix("output-postfix", - cl::desc("Postfix to add to the names of rewritten " - "files, if not supplied writes to STDOUT"), - cl::init("-"), cl::cat(_3CCategory)); +static cl::opt OptOutputPostfix( + "output-postfix", + cl::desc("String to insert into the names of updated files just before the " + "extension (e.g., with -output-postfix=checked, foo.c -> " + "foo.checked.c)"), + cl::init("-"), cl::cat(_3CCategory)); + +static cl::opt OptOutputDir( + "output-dir", + cl::desc("Directory under which updated files will be written at the same " + "relative paths as the originals under the -base-dir"), + cl::init(""), cl::cat(_3CCategory)); static cl::opt OptMalloc("use-malloc", @@ -105,10 +159,24 @@ static cl::opt cl::desc("Do not disable checked c type checker."), cl::init(false), cl::cat(_3CCategory)); -static cl::opt - OptBaseDir("base-dir", - cl::desc("Base directory for the code we're translating"), - cl::init(""), cl::cat(_3CCategory)); +static cl::opt OptBaseDir( + "base-dir", + cl::desc( + "Ancestor directory defining the set of files that 3c " + "is allowed to modify (default: the working " + "directory). All source files specified on the command line must be " + "under this directory. You can use " + "this option to let 3c modify your project's own header files but not " + "those of libraries outside your control."), + cl::init(""), cl::cat(_3CCategory)); + +static cl::opt OptAllowSourcesOutsideBaseDir( + "allow-sources-outside-base-dir", + cl::desc("When a source file is outside the base directory, issue a " + "warning instead of an error. This option is intended to be used " + "temporarily until you fix your project setup and may be removed " + "in the future."), + cl::init(false), cl::cat(_3CCategory)); static cl::opt OptWarnRootCause( "warn-root-cause", @@ -132,21 +200,22 @@ static cl::opt // set of diagnostics. static cl::opt OptVerifyDiagnosticOutput( "verify", - cl::desc("Verify diagnostic output (for automated testing of 3C)."), + cl::desc("Verify diagnostic output (for automated testing of 3c)."), cl::init(false), cl::cat(_3CCategory), cl::Hidden); // In the future, we may enhance this to write the output to individual files. // For now, the user has to copy and paste the correct portions of stderr. static cl::opt OptDumpUnwritableChanges( "dump-unwritable-changes", - cl::desc("When 3C generates changes to a file it cannot write (due to " + cl::desc("When 3c generates changes to a file it cannot write (due to " "stdout mode or implementation limitations), dump the new version " "of the file to stderr for troubleshooting."), cl::init(false), cl::cat(_3CCategory)); static cl::opt OptAllowUnwritableChanges( "allow-unwritable-changes", - cl::desc("When 3C generates changes to a file it cannot write (due to " + // "3C" for the software in general, "3c" for this frontend. :/ + cl::desc("When 3c generates changes to a file it cannot write (due to " "stdout mode or implementation limitations), issue a warning " "instead of an error. This option is intended to be used " "temporarily until you fix the root cause of the problem (by " @@ -176,14 +245,17 @@ int main(int argc, const char **argv) { InitializeAllAsmPrinters(); InitializeAllAsmParsers(); - CommonOptionsParser OptionsParser(argc, (const char **)(argv), _3CCategory); + CommonOptionsParser OptionsParser(argc, (const char **)(argv), _3CCategory, + HelpOverview); // Setup options. struct _3COptions CcOptions; CcOptions.BaseDir = OptBaseDir.getValue(); + CcOptions.AllowSourcesOutsideBaseDir = OptAllowSourcesOutsideBaseDir; CcOptions.EnablePropThruIType = OptEnablePropThruIType; CcOptions.HandleVARARGS = OptHandleVARARGS; CcOptions.DumpStats = OptDumpStats; CcOptions.OutputPostfix = OptOutputPostfix.getValue(); + CcOptions.OutputDir = OptOutputDir.getValue(); CcOptions.Verbose = OptVerbose; CcOptions.DumpIntermediate = OptDumpIntermediate; CcOptions.ConstraintOutputJson = OptConstraintOutputJson.getValue(); @@ -224,8 +296,16 @@ int main(int argc, const char **argv) { // // See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix // NOLINTNEXTLINE(readability-identifier-naming) - _3CInterface _3CInterface(CcOptions, OptionsParser.getSourcePathList(), - &(OptionsParser.getCompilations())); + std::unique_ptr<_3CInterface> _3CInterfacePtr( + _3CInterface::create(CcOptions, OptionsParser.getSourcePathList(), + &(OptionsParser.getCompilations()))); + if (!_3CInterfacePtr) { + // _3CInterface::create has already printed an error message. Just exit. + return 1; + } + // See clang/docs/checkedc/3C/clang-tidy.md#_3c-name-prefix + // NOLINTNEXTLINE(readability-identifier-naming) + _3CInterface &_3CInterface = *_3CInterfacePtr; if (OptVerbose) errs() << "Calling Library to building Constraints.\n"; From e187fd5c203f9acf9b5756031755d8f06085d7a4 Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Tue, 9 Feb 2021 20:50:48 -0500 Subject: [PATCH 04/12] Regenerate RUN lines of managed tests. This was fully automated and shouldn't need review. --- clang/test/3C/3d-allocation.c | 12 +++++----- clang/test/3C/amper.c | 12 +++++----- clang/test/3C/arrboth.c | 12 +++++----- clang/test/3C/arrbothmulti1.c | 22 +++++++++---------- clang/test/3C/arrbothmulti2.c | 22 +++++++++---------- clang/test/3C/arrcallee.c | 12 +++++----- clang/test/3C/arrcalleemulti1.c | 22 +++++++++---------- clang/test/3C/arrcalleemulti2.c | 22 +++++++++---------- clang/test/3C/arrcaller.c | 12 +++++----- clang/test/3C/arrcallermulti1.c | 22 +++++++++---------- clang/test/3C/arrcallermulti2.c | 22 +++++++++---------- clang/test/3C/arrinstructboth.c | 12 +++++----- clang/test/3C/arrinstructbothmulti1.c | 22 +++++++++---------- clang/test/3C/arrinstructbothmulti2.c | 22 +++++++++---------- clang/test/3C/arrinstructcallee.c | 12 +++++----- clang/test/3C/arrinstructcalleemulti1.c | 22 +++++++++---------- clang/test/3C/arrinstructcalleemulti2.c | 22 +++++++++---------- clang/test/3C/arrinstructcaller.c | 12 +++++----- clang/test/3C/arrinstructcallermulti1.c | 22 +++++++++---------- clang/test/3C/arrinstructcallermulti2.c | 22 +++++++++---------- clang/test/3C/arrinstructprotoboth.c | 12 +++++----- clang/test/3C/arrinstructprotocallee.c | 12 +++++----- clang/test/3C/arrinstructprotocaller.c | 12 +++++----- clang/test/3C/arrinstructprotosafe.c | 12 +++++----- clang/test/3C/arrinstructsafe.c | 12 +++++----- clang/test/3C/arrinstructsafemulti1.c | 22 +++++++++---------- clang/test/3C/arrinstructsafemulti2.c | 22 +++++++++---------- clang/test/3C/arrofstructboth.c | 12 +++++----- clang/test/3C/arrofstructbothmulti1.c | 22 +++++++++---------- clang/test/3C/arrofstructbothmulti2.c | 22 +++++++++---------- clang/test/3C/arrofstructcallee.c | 12 +++++----- clang/test/3C/arrofstructcalleemulti1.c | 22 +++++++++---------- clang/test/3C/arrofstructcalleemulti2.c | 22 +++++++++---------- clang/test/3C/arrofstructcaller.c | 12 +++++----- clang/test/3C/arrofstructcallermulti1.c | 22 +++++++++---------- clang/test/3C/arrofstructcallermulti2.c | 22 +++++++++---------- clang/test/3C/arrofstructprotoboth.c | 12 +++++----- clang/test/3C/arrofstructprotocallee.c | 12 +++++----- clang/test/3C/arrofstructprotocaller.c | 12 +++++----- clang/test/3C/arrofstructprotosafe.c | 12 +++++----- clang/test/3C/arrofstructsafe.c | 12 +++++----- clang/test/3C/arrofstructsafemulti1.c | 22 +++++++++---------- clang/test/3C/arrofstructsafemulti2.c | 22 +++++++++---------- clang/test/3C/arrprotoboth.c | 12 +++++----- clang/test/3C/arrprotocallee.c | 12 +++++----- clang/test/3C/arrprotocaller.c | 12 +++++----- clang/test/3C/arrprotosafe.c | 12 +++++----- clang/test/3C/arrsafe.c | 12 +++++----- clang/test/3C/arrsafemulti1.c | 22 +++++++++---------- clang/test/3C/arrsafemulti2.c | 22 +++++++++---------- clang/test/3C/arrstructboth.c | 12 +++++----- clang/test/3C/arrstructbothmulti1.c | 22 +++++++++---------- clang/test/3C/arrstructbothmulti2.c | 22 +++++++++---------- clang/test/3C/arrstructcallee.c | 12 +++++----- clang/test/3C/arrstructcalleemulti1.c | 22 +++++++++---------- clang/test/3C/arrstructcalleemulti2.c | 22 +++++++++---------- clang/test/3C/arrstructcaller.c | 12 +++++----- clang/test/3C/arrstructcallermulti1.c | 22 +++++++++---------- clang/test/3C/arrstructcallermulti2.c | 22 +++++++++---------- clang/test/3C/arrstructprotoboth.c | 12 +++++----- clang/test/3C/arrstructprotocallee.c | 12 +++++----- clang/test/3C/arrstructprotocaller.c | 12 +++++----- clang/test/3C/arrstructprotosafe.c | 12 +++++----- clang/test/3C/arrstructsafe.c | 12 +++++----- clang/test/3C/arrstructsafemulti1.c | 22 +++++++++---------- clang/test/3C/arrstructsafemulti2.c | 22 +++++++++---------- clang/test/3C/b10_allsafepointerstruct.c | 12 +++++----- clang/test/3C/b11_calleestructnp.c | 12 +++++----- clang/test/3C/b12_callerstructnp.c | 12 +++++----- clang/test/3C/b13_calleestructp.c | 12 +++++----- clang/test/3C/b14_callerstructp.c | 12 +++++----- clang/test/3C/b15_calleepointerstruct.c | 12 +++++----- clang/test/3C/b16_callerpointerstruct.c | 12 +++++----- clang/test/3C/b17_bothstructnp.c | 12 +++++----- clang/test/3C/b18_bothstructp.c | 12 +++++----- clang/test/3C/b19_bothpointerstruct.c | 12 +++++----- clang/test/3C/b1_allsafe.c | 12 +++++----- clang/test/3C/b20_allsafepointerstructproto.c | 12 +++++----- clang/test/3C/b21_calleepointerstructproto.c | 12 +++++----- clang/test/3C/b22_callerpointerstructproto.c | 12 +++++----- clang/test/3C/b23_explicitunsafecast.c | 12 +++++----- clang/test/3C/b23_retswitchexplicit.c | 12 +++++----- clang/test/3C/b24_implicitunsafecast.c | 12 +++++----- clang/test/3C/b24_retswitchimplicit.c | 12 +++++----- clang/test/3C/b25_castprotosafe.c | 12 +++++----- clang/test/3C/b26_castprotounsafe.c | 12 +++++----- clang/test/3C/b26_castprotounsafeimplicit.c | 12 +++++----- .../3C/b26_castprotounsafeimplicitretswitch.c | 12 +++++----- clang/test/3C/b27_structcastsafe.c | 12 +++++----- clang/test/3C/b28_structcastexplicit.c | 12 +++++----- clang/test/3C/b28_structcastimplicit.c | 12 +++++----- clang/test/3C/b28_structimplicitretcast.c | 12 +++++----- clang/test/3C/b29_structprotocastsafe.c | 12 +++++----- .../3C/b29_structprotocastsafeuseunsafe.c | 12 +++++----- clang/test/3C/b2_calleeunsafe.c | 12 +++++----- ...0_structprotocastexplicitunsafeuseunsafe.c | 12 +++++----- ...0_structprotocastimplicitunsafeuseunsafe.c | 12 +++++----- .../3C/b30_structprotocastunsafeexplicit.c | 12 +++++----- .../3C/b30_structprotocastunsafeimplicit.c | 12 +++++----- ...0_structprotocastunsafeimplicitretswitch.c | 12 +++++----- clang/test/3C/b30_structprotoconflict.c | 12 +++++----- .../3C/b30_structprotoconflictbodyconvert.c | 12 +++++----- clang/test/3C/b3_onecallerunsafe.c | 12 +++++----- clang/test/3C/b4_bothunsafe.c | 12 +++++----- clang/test/3C/b5_calleeunsafeproto.c | 12 +++++----- clang/test/3C/b6_callerunsafeproto.c | 12 +++++----- clang/test/3C/b7_allsafeproto.c | 12 +++++----- clang/test/3C/b8_allsafestructnp.c | 12 +++++----- clang/test/3C/b9_allsafestructp.c | 12 +++++----- clang/test/3C/calloc.c | 12 +++++----- clang/test/3C/canonical_type_cast.c | 12 +++++----- clang/test/3C/cast.c | 12 +++++----- clang/test/3C/checkedregions.c | 12 +++++----- clang/test/3C/compound_literal.c | 12 +++++----- clang/test/3C/ex1.c | 12 +++++----- clang/test/3C/extGVar.c | 12 +++++----- clang/test/3C/extstructfields.c | 13 ++++++----- clang/test/3C/fn_sets.c | 12 +++++----- clang/test/3C/fp.c | 12 +++++----- clang/test/3C/fp_arith.c | 12 +++++----- clang/test/3C/fptrarrboth.c | 12 +++++----- clang/test/3C/fptrarrbothmulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrbothmulti2.c | 22 +++++++++---------- clang/test/3C/fptrarrcallee.c | 12 +++++----- clang/test/3C/fptrarrcalleemulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrcalleemulti2.c | 22 +++++++++---------- clang/test/3C/fptrarrcaller.c | 12 +++++----- clang/test/3C/fptrarrcallermulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrcallermulti2.c | 22 +++++++++---------- clang/test/3C/fptrarrinstructboth.c | 12 +++++----- clang/test/3C/fptrarrinstructbothmulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrinstructbothmulti2.c | 22 +++++++++---------- clang/test/3C/fptrarrinstructcallee.c | 12 +++++----- clang/test/3C/fptrarrinstructcalleemulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrinstructcalleemulti2.c | 22 +++++++++---------- clang/test/3C/fptrarrinstructcaller.c | 12 +++++----- clang/test/3C/fptrarrinstructcallermulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrinstructcallermulti2.c | 22 +++++++++---------- clang/test/3C/fptrarrinstructprotoboth.c | 12 +++++----- clang/test/3C/fptrarrinstructprotocallee.c | 12 +++++----- clang/test/3C/fptrarrinstructprotocaller.c | 12 +++++----- clang/test/3C/fptrarrinstructprotosafe.c | 12 +++++----- clang/test/3C/fptrarrinstructsafe.c | 12 +++++----- clang/test/3C/fptrarrinstructsafemulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrinstructsafemulti2.c | 22 +++++++++---------- clang/test/3C/fptrarrprotoboth.c | 12 +++++----- clang/test/3C/fptrarrprotocallee.c | 12 +++++----- clang/test/3C/fptrarrprotocaller.c | 12 +++++----- clang/test/3C/fptrarrprotosafe.c | 12 +++++----- clang/test/3C/fptrarrsafe.c | 12 +++++----- clang/test/3C/fptrarrsafemulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrsafemulti2.c | 22 +++++++++---------- clang/test/3C/fptrarrstructboth.c | 12 +++++----- clang/test/3C/fptrarrstructbothmulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrstructbothmulti2.c | 22 +++++++++---------- clang/test/3C/fptrarrstructcallee.c | 12 +++++----- clang/test/3C/fptrarrstructcalleemulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrstructcalleemulti2.c | 22 +++++++++---------- clang/test/3C/fptrarrstructcaller.c | 12 +++++----- clang/test/3C/fptrarrstructcallermulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrstructcallermulti2.c | 22 +++++++++---------- clang/test/3C/fptrarrstructprotoboth.c | 12 +++++----- clang/test/3C/fptrarrstructprotocallee.c | 12 +++++----- clang/test/3C/fptrarrstructprotocaller.c | 12 +++++----- clang/test/3C/fptrarrstructprotosafe.c | 12 +++++----- clang/test/3C/fptrarrstructsafe.c | 12 +++++----- clang/test/3C/fptrarrstructsafemulti1.c | 22 +++++++++---------- clang/test/3C/fptrarrstructsafemulti2.c | 22 +++++++++---------- clang/test/3C/fptrinstructboth.c | 12 +++++----- clang/test/3C/fptrinstructbothmulti1.c | 22 +++++++++---------- clang/test/3C/fptrinstructbothmulti2.c | 22 +++++++++---------- clang/test/3C/fptrinstructcallee.c | 12 +++++----- clang/test/3C/fptrinstructcalleemulti1.c | 22 +++++++++---------- clang/test/3C/fptrinstructcalleemulti2.c | 22 +++++++++---------- clang/test/3C/fptrinstructcaller.c | 12 +++++----- clang/test/3C/fptrinstructcallermulti1.c | 22 +++++++++---------- clang/test/3C/fptrinstructcallermulti2.c | 22 +++++++++---------- clang/test/3C/fptrinstructprotoboth.c | 12 +++++----- clang/test/3C/fptrinstructprotocallee.c | 12 +++++----- clang/test/3C/fptrinstructprotocaller.c | 12 +++++----- clang/test/3C/fptrinstructprotosafe.c | 12 +++++----- clang/test/3C/fptrinstructsafe.c | 12 +++++----- clang/test/3C/fptrinstructsafemulti1.c | 22 +++++++++---------- clang/test/3C/fptrinstructsafemulti2.c | 22 +++++++++---------- clang/test/3C/fptrsafeboth.c | 12 +++++----- clang/test/3C/fptrsafebothmulti1.c | 22 +++++++++---------- clang/test/3C/fptrsafebothmulti2.c | 22 +++++++++---------- clang/test/3C/fptrsafecallee.c | 12 +++++----- clang/test/3C/fptrsafecalleemulti1.c | 22 +++++++++---------- clang/test/3C/fptrsafecalleemulti2.c | 22 +++++++++---------- clang/test/3C/fptrsafecaller.c | 12 +++++----- clang/test/3C/fptrsafecallermulti1.c | 22 +++++++++---------- clang/test/3C/fptrsafecallermulti2.c | 22 +++++++++---------- clang/test/3C/fptrsafeprotoboth.c | 12 +++++----- clang/test/3C/fptrsafeprotocallee.c | 12 +++++----- clang/test/3C/fptrsafeprotocaller.c | 12 +++++----- clang/test/3C/fptrsafeprotosafe.c | 12 +++++----- clang/test/3C/fptrsafesafe.c | 12 +++++----- clang/test/3C/fptrsafesafemulti1.c | 22 +++++++++---------- clang/test/3C/fptrsafesafemulti2.c | 22 +++++++++---------- clang/test/3C/fptrunsafeboth.c | 12 +++++----- clang/test/3C/fptrunsafebothmulti1.c | 22 +++++++++---------- clang/test/3C/fptrunsafebothmulti2.c | 22 +++++++++---------- clang/test/3C/fptrunsafecallee.c | 12 +++++----- clang/test/3C/fptrunsafecalleemulti1.c | 22 +++++++++---------- clang/test/3C/fptrunsafecalleemulti2.c | 22 +++++++++---------- clang/test/3C/fptrunsafecaller.c | 12 +++++----- clang/test/3C/fptrunsafecallermulti1.c | 22 +++++++++---------- clang/test/3C/fptrunsafecallermulti2.c | 22 +++++++++---------- clang/test/3C/fptrunsafeprotoboth.c | 12 +++++----- clang/test/3C/fptrunsafeprotocallee.c | 12 +++++----- clang/test/3C/fptrunsafeprotocaller.c | 12 +++++----- clang/test/3C/fptrunsafeprotosafe.c | 12 +++++----- clang/test/3C/fptrunsafesafe.c | 12 +++++----- clang/test/3C/fptrunsafesafemulti1.c | 22 +++++++++---------- clang/test/3C/fptrunsafesafemulti2.c | 22 +++++++++---------- clang/test/3C/funcptr1.c | 12 +++++----- clang/test/3C/funcptr2.c | 12 +++++----- clang/test/3C/funcptr3.c | 12 +++++----- clang/test/3C/funcptr4.c | 12 +++++----- clang/test/3C/graphs.c | 12 +++++----- clang/test/3C/graphs2.c | 12 +++++----- clang/test/3C/gvar.c | 12 +++++----- clang/test/3C/i1.c | 12 +++++----- clang/test/3C/i2.c | 12 +++++----- clang/test/3C/i3.c | 12 +++++----- clang/test/3C/linkedlist.c | 12 +++++----- clang/test/3C/malloc_array.c | 12 +++++----- clang/test/3C/ptrTOptrboth.c | 12 +++++----- clang/test/3C/ptrTOptrbothmulti1.c | 22 +++++++++---------- clang/test/3C/ptrTOptrbothmulti2.c | 22 +++++++++---------- clang/test/3C/ptrTOptrcallee.c | 12 +++++----- clang/test/3C/ptrTOptrcalleemulti1.c | 22 +++++++++---------- clang/test/3C/ptrTOptrcalleemulti2.c | 22 +++++++++---------- clang/test/3C/ptrTOptrcaller.c | 12 +++++----- clang/test/3C/ptrTOptrcallermulti1.c | 22 +++++++++---------- clang/test/3C/ptrTOptrcallermulti2.c | 22 +++++++++---------- clang/test/3C/ptrTOptrprotoboth.c | 12 +++++----- clang/test/3C/ptrTOptrprotocallee.c | 12 +++++----- clang/test/3C/ptrTOptrprotocaller.c | 12 +++++----- clang/test/3C/ptrTOptrprotosafe.c | 12 +++++----- clang/test/3C/ptrTOptrsafe.c | 12 +++++----- clang/test/3C/ptrTOptrsafemulti1.c | 22 +++++++++---------- clang/test/3C/ptrTOptrsafemulti2.c | 22 +++++++++---------- clang/test/3C/ptr_array.c | 12 +++++----- clang/test/3C/realloc.c | 12 +++++----- clang/test/3C/realloc_complex.c | 12 +++++----- clang/test/3C/refarrsubscript.c | 12 +++++----- clang/test/3C/return_not_least.c | 12 +++++----- clang/test/3C/safefptrargboth.c | 12 +++++----- clang/test/3C/safefptrargbothmulti1.c | 22 +++++++++---------- clang/test/3C/safefptrargbothmulti2.c | 22 +++++++++---------- clang/test/3C/safefptrargcallee.c | 12 +++++----- clang/test/3C/safefptrargcalleemulti1.c | 22 +++++++++---------- clang/test/3C/safefptrargcalleemulti2.c | 22 +++++++++---------- clang/test/3C/safefptrargcaller.c | 12 +++++----- clang/test/3C/safefptrargcallermulti1.c | 22 +++++++++---------- clang/test/3C/safefptrargcallermulti2.c | 22 +++++++++---------- clang/test/3C/safefptrargprotoboth.c | 12 +++++----- clang/test/3C/safefptrargprotocallee.c | 12 +++++----- clang/test/3C/safefptrargprotocaller.c | 12 +++++----- clang/test/3C/safefptrargprotosafe.c | 12 +++++----- clang/test/3C/safefptrargsafe.c | 12 +++++----- clang/test/3C/safefptrargsafemulti1.c | 22 +++++++++---------- clang/test/3C/safefptrargsafemulti2.c | 22 +++++++++---------- clang/test/3C/single_ptr_calloc.c | 12 +++++----- clang/test/3C/subtyp.c | 12 +++++----- clang/test/3C/unsafefptrargboth.c | 12 +++++----- clang/test/3C/unsafefptrargbothmulti1.c | 22 +++++++++---------- clang/test/3C/unsafefptrargbothmulti2.c | 22 +++++++++---------- clang/test/3C/unsafefptrargcallee.c | 12 +++++----- clang/test/3C/unsafefptrargcalleemulti1.c | 22 +++++++++---------- clang/test/3C/unsafefptrargcalleemulti2.c | 22 +++++++++---------- clang/test/3C/unsafefptrargcaller.c | 12 +++++----- clang/test/3C/unsafefptrargcallermulti1.c | 22 +++++++++---------- clang/test/3C/unsafefptrargcallermulti2.c | 22 +++++++++---------- clang/test/3C/unsafefptrargprotoboth.c | 12 +++++----- clang/test/3C/unsafefptrargprotocallee.c | 12 +++++----- clang/test/3C/unsafefptrargprotocaller.c | 12 +++++----- clang/test/3C/unsafefptrargprotosafe.c | 12 +++++----- clang/test/3C/unsafefptrargsafe.c | 12 +++++----- clang/test/3C/unsafefptrargsafemulti1.c | 22 +++++++++---------- clang/test/3C/unsafefptrargsafemulti2.c | 22 +++++++++---------- clang/test/3C/unsafeunion.c | 12 +++++----- clang/test/3C/unsigned_signed_cast.c | 12 +++++----- clang/test/3C/valist.c | 12 +++++----- 286 files changed, 2133 insertions(+), 2340 deletions(-) diff --git a/clang/test/3C/3d-allocation.c b/clang/test/3C/3d-allocation.c index 773293e51498..718228437519 100644 --- a/clang/test/3C/3d-allocation.c +++ b/clang/test/3C/3d-allocation.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/3d-allocation.checked.c -- | count 0 -// RUN: rm %S/3d-allocation.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/3d-allocation.c -- | diff %t.checked/3d-allocation.c - #include #include diff --git a/clang/test/3C/amper.c b/clang/test/3C/amper.c index d823de2d5ac8..2823dc80d921 100644 --- a/clang/test/3C/amper.c +++ b/clang/test/3C/amper.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/amper.checked.c -- | count 0 -// RUN: rm %S/amper.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/amper.c -- | diff %t.checked/amper.c - void foo(int *x) { //CHECK: void foo(int *x : itype(_Ptr)) { diff --git a/clang/test/3C/arrboth.c b/clang/test/3C/arrboth.c index 20d313576ff5..f5d96624393b 100644 --- a/clang/test/3C/arrboth.c +++ b/clang/test/3C/arrboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrboth.checked.c -- | count 0 -// RUN: rm %S/arrboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrboth.c -- | diff %t.checked/arrboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrbothmulti1.c b/clang/test/3C/arrbothmulti1.c index fad117b784f1..dda4218197df 100644 --- a/clang/test/3C/arrbothmulti1.c +++ b/clang/test/3C/arrbothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrbothmulti2.c -// RUN: %clang -c %S/arrbothmulti1.checkedNOALL.c %S/arrbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrbothmulti1.checked.c %S/arrbothmulti2.checked.c -// RUN: test ! -f %S/arrbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/arrbothmulti2.checked.convert_again.c -// RUN: rm %S/arrbothmulti1.checkedALL.c %S/arrbothmulti2.checkedALL.c -// RUN: rm %S/arrbothmulti1.checkedNOALL.c %S/arrbothmulti2.checkedNOALL.c -// RUN: rm %S/arrbothmulti1.checked.c %S/arrbothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrbothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrbothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrbothmulti1.c arrbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrbothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrbothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrbothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrbothmulti1.c %t.checked/arrbothmulti2.c -- +// RUN: test ! -f %t.convert_again/arrbothmulti1.c +// RUN: test ! -f %t.convert_again/arrbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrbothmulti2.c b/clang/test/3C/arrbothmulti2.c index 37c8e7549abd..734b8e50c0c3 100644 --- a/clang/test/3C/arrbothmulti2.c +++ b/clang/test/3C/arrbothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrbothmulti1.c %s -// RUN: %clang -c %S/arrbothmulti1.checkedNOALL2.c %S/arrbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrbothmulti1.checked2.c %S/arrbothmulti2.checked2.c -// RUN: test ! -f %S/arrbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrbothmulti2.checked2.convert_again.c -// RUN: rm %S/arrbothmulti1.checkedALL2.c %S/arrbothmulti2.checkedALL2.c -// RUN: rm %S/arrbothmulti1.checkedNOALL2.c %S/arrbothmulti2.checkedNOALL2.c -// RUN: rm %S/arrbothmulti1.checked2.c %S/arrbothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrbothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrbothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrbothmulti1.c arrbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrbothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrbothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrbothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrbothmulti1.c %t.checked/arrbothmulti2.c -- +// RUN: test ! -f %t.convert_again/arrbothmulti1.c +// RUN: test ! -f %t.convert_again/arrbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrcallee.c b/clang/test/3C/arrcallee.c index 2019535ec148..6bc4d020fcaf 100644 --- a/clang/test/3C/arrcallee.c +++ b/clang/test/3C/arrcallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrcallee.checked.c -- | count 0 -// RUN: rm %S/arrcallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrcallee.c -- | diff %t.checked/arrcallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrcalleemulti1.c b/clang/test/3C/arrcalleemulti1.c index e311fecc769a..6b5d58204f9f 100644 --- a/clang/test/3C/arrcalleemulti1.c +++ b/clang/test/3C/arrcalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrcalleemulti2.c -// RUN: %clang -c %S/arrcalleemulti1.checkedNOALL.c %S/arrcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcalleemulti1.checked.c %S/arrcalleemulti2.checked.c -// RUN: test ! -f %S/arrcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrcalleemulti2.checked.convert_again.c -// RUN: rm %S/arrcalleemulti1.checkedALL.c %S/arrcalleemulti2.checkedALL.c -// RUN: rm %S/arrcalleemulti1.checkedNOALL.c %S/arrcalleemulti2.checkedNOALL.c -// RUN: rm %S/arrcalleemulti1.checked.c %S/arrcalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrcalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrcalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrcalleemulti1.c arrcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrcalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrcalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrcalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrcalleemulti1.c %t.checked/arrcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/arrcalleemulti1.c +// RUN: test ! -f %t.convert_again/arrcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrcalleemulti2.c b/clang/test/3C/arrcalleemulti2.c index 8aa59d7bf1db..9e46e35e15df 100644 --- a/clang/test/3C/arrcalleemulti2.c +++ b/clang/test/3C/arrcalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrcalleemulti1.c %s -// RUN: %clang -c %S/arrcalleemulti1.checkedNOALL2.c %S/arrcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcalleemulti1.checked2.c %S/arrcalleemulti2.checked2.c -// RUN: test ! -f %S/arrcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrcalleemulti2.checked2.convert_again.c -// RUN: rm %S/arrcalleemulti1.checkedALL2.c %S/arrcalleemulti2.checkedALL2.c -// RUN: rm %S/arrcalleemulti1.checkedNOALL2.c %S/arrcalleemulti2.checkedNOALL2.c -// RUN: rm %S/arrcalleemulti1.checked2.c %S/arrcalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrcalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrcalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrcalleemulti1.c arrcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrcalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrcalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrcalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrcalleemulti1.c %t.checked/arrcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/arrcalleemulti1.c +// RUN: test ! -f %t.convert_again/arrcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrcaller.c b/clang/test/3C/arrcaller.c index 4fa6a4ef5661..26d0c1c32a39 100644 --- a/clang/test/3C/arrcaller.c +++ b/clang/test/3C/arrcaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrcaller.checked.c -- | count 0 -// RUN: rm %S/arrcaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrcaller.c -- | diff %t.checked/arrcaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrcallermulti1.c b/clang/test/3C/arrcallermulti1.c index c12238cfd5c3..9d24a91d57d2 100644 --- a/clang/test/3C/arrcallermulti1.c +++ b/clang/test/3C/arrcallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrcallermulti2.c -// RUN: %clang -c %S/arrcallermulti1.checkedNOALL.c %S/arrcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcallermulti1.checked.c %S/arrcallermulti2.checked.c -// RUN: test ! -f %S/arrcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/arrcallermulti2.checked.convert_again.c -// RUN: rm %S/arrcallermulti1.checkedALL.c %S/arrcallermulti2.checkedALL.c -// RUN: rm %S/arrcallermulti1.checkedNOALL.c %S/arrcallermulti2.checkedNOALL.c -// RUN: rm %S/arrcallermulti1.checked.c %S/arrcallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrcallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrcallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrcallermulti1.c arrcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrcallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrcallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrcallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrcallermulti1.c %t.checked/arrcallermulti2.c -- +// RUN: test ! -f %t.convert_again/arrcallermulti1.c +// RUN: test ! -f %t.convert_again/arrcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrcallermulti2.c b/clang/test/3C/arrcallermulti2.c index 4f1cfc83f242..41e7c00cf7bf 100644 --- a/clang/test/3C/arrcallermulti2.c +++ b/clang/test/3C/arrcallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrcallermulti1.c %s -// RUN: %clang -c %S/arrcallermulti1.checkedNOALL2.c %S/arrcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcallermulti1.checked2.c %S/arrcallermulti2.checked2.c -// RUN: test ! -f %S/arrcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrcallermulti2.checked2.convert_again.c -// RUN: rm %S/arrcallermulti1.checkedALL2.c %S/arrcallermulti2.checkedALL2.c -// RUN: rm %S/arrcallermulti1.checkedNOALL2.c %S/arrcallermulti2.checkedNOALL2.c -// RUN: rm %S/arrcallermulti1.checked2.c %S/arrcallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrcallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrcallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrcallermulti1.c arrcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrcallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrcallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrcallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrcallermulti1.c %t.checked/arrcallermulti2.c -- +// RUN: test ! -f %t.convert_again/arrcallermulti1.c +// RUN: test ! -f %t.convert_again/arrcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructboth.c b/clang/test/3C/arrinstructboth.c index 1a828236f662..43acef57606b 100644 --- a/clang/test/3C/arrinstructboth.c +++ b/clang/test/3C/arrinstructboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructboth.checked.c -- | count 0 -// RUN: rm %S/arrinstructboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrinstructboth.c -- | diff %t.checked/arrinstructboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructbothmulti1.c b/clang/test/3C/arrinstructbothmulti1.c index 4e5677055121..ba005fc48b03 100644 --- a/clang/test/3C/arrinstructbothmulti1.c +++ b/clang/test/3C/arrinstructbothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrinstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrinstructbothmulti2.c -// RUN: %clang -c %S/arrinstructbothmulti1.checkedNOALL.c %S/arrinstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrinstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructbothmulti1.checked.c %S/arrinstructbothmulti2.checked.c -// RUN: test ! -f %S/arrinstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/arrinstructbothmulti2.checked.convert_again.c -// RUN: rm %S/arrinstructbothmulti1.checkedALL.c %S/arrinstructbothmulti2.checkedALL.c -// RUN: rm %S/arrinstructbothmulti1.checkedNOALL.c %S/arrinstructbothmulti2.checkedNOALL.c -// RUN: rm %S/arrinstructbothmulti1.checked.c %S/arrinstructbothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrinstructbothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrinstructbothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrinstructbothmulti1.c arrinstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrinstructbothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrinstructbothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrinstructbothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrinstructbothmulti1.c %t.checked/arrinstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/arrinstructbothmulti1.c +// RUN: test ! -f %t.convert_again/arrinstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructbothmulti2.c b/clang/test/3C/arrinstructbothmulti2.c index d88d0f56ef17..75c8e9580b69 100644 --- a/clang/test/3C/arrinstructbothmulti2.c +++ b/clang/test/3C/arrinstructbothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrinstructbothmulti1.c %s -// RUN: %clang -c %S/arrinstructbothmulti1.checkedNOALL2.c %S/arrinstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructbothmulti1.checked2.c %S/arrinstructbothmulti2.checked2.c -// RUN: test ! -f %S/arrinstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrinstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/arrinstructbothmulti1.checkedALL2.c %S/arrinstructbothmulti2.checkedALL2.c -// RUN: rm %S/arrinstructbothmulti1.checkedNOALL2.c %S/arrinstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/arrinstructbothmulti1.checked2.c %S/arrinstructbothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrinstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrinstructbothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrinstructbothmulti1.c arrinstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrinstructbothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrinstructbothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrinstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrinstructbothmulti1.c %t.checked/arrinstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/arrinstructbothmulti1.c +// RUN: test ! -f %t.convert_again/arrinstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcallee.c b/clang/test/3C/arrinstructcallee.c index 80f86a32d1ba..734bbddb2d59 100644 --- a/clang/test/3C/arrinstructcallee.c +++ b/clang/test/3C/arrinstructcallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructcallee.checked.c -- | count 0 -// RUN: rm %S/arrinstructcallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrinstructcallee.c -- | diff %t.checked/arrinstructcallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcalleemulti1.c b/clang/test/3C/arrinstructcalleemulti1.c index f97b7bd4bf77..0ecb8ed3fdab 100644 --- a/clang/test/3C/arrinstructcalleemulti1.c +++ b/clang/test/3C/arrinstructcalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrinstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrinstructcalleemulti2.c -// RUN: %clang -c %S/arrinstructcalleemulti1.checkedNOALL.c %S/arrinstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrinstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructcalleemulti1.checked.c %S/arrinstructcalleemulti2.checked.c -// RUN: test ! -f %S/arrinstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrinstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/arrinstructcalleemulti1.checkedALL.c %S/arrinstructcalleemulti2.checkedALL.c -// RUN: rm %S/arrinstructcalleemulti1.checkedNOALL.c %S/arrinstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/arrinstructcalleemulti1.checked.c %S/arrinstructcalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrinstructcalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrinstructcalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrinstructcalleemulti1.c arrinstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrinstructcalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrinstructcalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrinstructcalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrinstructcalleemulti1.c %t.checked/arrinstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/arrinstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/arrinstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcalleemulti2.c b/clang/test/3C/arrinstructcalleemulti2.c index cf47cee67a1d..1843613ab508 100644 --- a/clang/test/3C/arrinstructcalleemulti2.c +++ b/clang/test/3C/arrinstructcalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrinstructcalleemulti1.c %s -// RUN: %clang -c %S/arrinstructcalleemulti1.checkedNOALL2.c %S/arrinstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructcalleemulti1.checked2.c %S/arrinstructcalleemulti2.checked2.c -// RUN: test ! -f %S/arrinstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrinstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/arrinstructcalleemulti1.checkedALL2.c %S/arrinstructcalleemulti2.checkedALL2.c -// RUN: rm %S/arrinstructcalleemulti1.checkedNOALL2.c %S/arrinstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/arrinstructcalleemulti1.checked2.c %S/arrinstructcalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrinstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrinstructcalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrinstructcalleemulti1.c arrinstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrinstructcalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrinstructcalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrinstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrinstructcalleemulti1.c %t.checked/arrinstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/arrinstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/arrinstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcaller.c b/clang/test/3C/arrinstructcaller.c index 28a686013103..ee88e46e5b4a 100644 --- a/clang/test/3C/arrinstructcaller.c +++ b/clang/test/3C/arrinstructcaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructcaller.checked.c -- | count 0 -// RUN: rm %S/arrinstructcaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrinstructcaller.c -- | diff %t.checked/arrinstructcaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcallermulti1.c b/clang/test/3C/arrinstructcallermulti1.c index 8a2fcecc8296..6617b7b42b02 100644 --- a/clang/test/3C/arrinstructcallermulti1.c +++ b/clang/test/3C/arrinstructcallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrinstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrinstructcallermulti2.c -// RUN: %clang -c %S/arrinstructcallermulti1.checkedNOALL.c %S/arrinstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrinstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructcallermulti1.checked.c %S/arrinstructcallermulti2.checked.c -// RUN: test ! -f %S/arrinstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/arrinstructcallermulti2.checked.convert_again.c -// RUN: rm %S/arrinstructcallermulti1.checkedALL.c %S/arrinstructcallermulti2.checkedALL.c -// RUN: rm %S/arrinstructcallermulti1.checkedNOALL.c %S/arrinstructcallermulti2.checkedNOALL.c -// RUN: rm %S/arrinstructcallermulti1.checked.c %S/arrinstructcallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrinstructcallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrinstructcallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrinstructcallermulti1.c arrinstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrinstructcallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrinstructcallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrinstructcallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrinstructcallermulti1.c %t.checked/arrinstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/arrinstructcallermulti1.c +// RUN: test ! -f %t.convert_again/arrinstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcallermulti2.c b/clang/test/3C/arrinstructcallermulti2.c index f38d0d15c4cf..1ae621cabdd9 100644 --- a/clang/test/3C/arrinstructcallermulti2.c +++ b/clang/test/3C/arrinstructcallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrinstructcallermulti1.c %s -// RUN: %clang -c %S/arrinstructcallermulti1.checkedNOALL2.c %S/arrinstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructcallermulti1.checked2.c %S/arrinstructcallermulti2.checked2.c -// RUN: test ! -f %S/arrinstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrinstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/arrinstructcallermulti1.checkedALL2.c %S/arrinstructcallermulti2.checkedALL2.c -// RUN: rm %S/arrinstructcallermulti1.checkedNOALL2.c %S/arrinstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/arrinstructcallermulti1.checked2.c %S/arrinstructcallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrinstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrinstructcallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrinstructcallermulti1.c arrinstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrinstructcallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrinstructcallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrinstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrinstructcallermulti1.c %t.checked/arrinstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/arrinstructcallermulti1.c +// RUN: test ! -f %t.convert_again/arrinstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructprotoboth.c b/clang/test/3C/arrinstructprotoboth.c index 5a479a2ba6e8..c6ff4e664fb6 100644 --- a/clang/test/3C/arrinstructprotoboth.c +++ b/clang/test/3C/arrinstructprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/arrinstructprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrinstructprotoboth.c -- | diff %t.checked/arrinstructprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructprotocallee.c b/clang/test/3C/arrinstructprotocallee.c index d722f26dff7e..f8d036a2d38c 100644 --- a/clang/test/3C/arrinstructprotocallee.c +++ b/clang/test/3C/arrinstructprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/arrinstructprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrinstructprotocallee.c -- | diff %t.checked/arrinstructprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructprotocaller.c b/clang/test/3C/arrinstructprotocaller.c index 688799f67e04..8dde2fef3dce 100644 --- a/clang/test/3C/arrinstructprotocaller.c +++ b/clang/test/3C/arrinstructprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/arrinstructprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrinstructprotocaller.c -- | diff %t.checked/arrinstructprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructprotosafe.c b/clang/test/3C/arrinstructprotosafe.c index ba588864f417..82c5bfdf51f1 100644 --- a/clang/test/3C/arrinstructprotosafe.c +++ b/clang/test/3C/arrinstructprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/arrinstructprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrinstructprotosafe.c -- | diff %t.checked/arrinstructprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructsafe.c b/clang/test/3C/arrinstructsafe.c index 35b768aaf6eb..a6dd8e59e323 100644 --- a/clang/test/3C/arrinstructsafe.c +++ b/clang/test/3C/arrinstructsafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructsafe.checked.c -- | count 0 -// RUN: rm %S/arrinstructsafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrinstructsafe.c -- | diff %t.checked/arrinstructsafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructsafemulti1.c b/clang/test/3C/arrinstructsafemulti1.c index 87f30ec804a6..de84c7d2ccea 100644 --- a/clang/test/3C/arrinstructsafemulti1.c +++ b/clang/test/3C/arrinstructsafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrinstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrinstructsafemulti2.c -// RUN: %clang -c %S/arrinstructsafemulti1.checkedNOALL.c %S/arrinstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrinstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructsafemulti1.checked.c %S/arrinstructsafemulti2.checked.c -// RUN: test ! -f %S/arrinstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrinstructsafemulti2.checked.convert_again.c -// RUN: rm %S/arrinstructsafemulti1.checkedALL.c %S/arrinstructsafemulti2.checkedALL.c -// RUN: rm %S/arrinstructsafemulti1.checkedNOALL.c %S/arrinstructsafemulti2.checkedNOALL.c -// RUN: rm %S/arrinstructsafemulti1.checked.c %S/arrinstructsafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrinstructsafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrinstructsafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrinstructsafemulti1.c arrinstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrinstructsafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrinstructsafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrinstructsafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrinstructsafemulti1.c %t.checked/arrinstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/arrinstructsafemulti1.c +// RUN: test ! -f %t.convert_again/arrinstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructsafemulti2.c b/clang/test/3C/arrinstructsafemulti2.c index 4a17a8644262..cb4108f642ec 100644 --- a/clang/test/3C/arrinstructsafemulti2.c +++ b/clang/test/3C/arrinstructsafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrinstructsafemulti1.c %s -// RUN: %clang -c %S/arrinstructsafemulti1.checkedNOALL2.c %S/arrinstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructsafemulti1.checked2.c %S/arrinstructsafemulti2.checked2.c -// RUN: test ! -f %S/arrinstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrinstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/arrinstructsafemulti1.checkedALL2.c %S/arrinstructsafemulti2.checkedALL2.c -// RUN: rm %S/arrinstructsafemulti1.checkedNOALL2.c %S/arrinstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/arrinstructsafemulti1.checked2.c %S/arrinstructsafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrinstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrinstructsafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrinstructsafemulti1.c arrinstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrinstructsafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrinstructsafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrinstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrinstructsafemulti1.c %t.checked/arrinstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/arrinstructsafemulti1.c +// RUN: test ! -f %t.convert_again/arrinstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructboth.c b/clang/test/3C/arrofstructboth.c index b86ddd44f677..eb0557ffc554 100644 --- a/clang/test/3C/arrofstructboth.c +++ b/clang/test/3C/arrofstructboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructboth.checked.c -- | count 0 -// RUN: rm %S/arrofstructboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrofstructboth.c -- | diff %t.checked/arrofstructboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructbothmulti1.c b/clang/test/3C/arrofstructbothmulti1.c index 3d3afe540ce9..8259f7620611 100644 --- a/clang/test/3C/arrofstructbothmulti1.c +++ b/clang/test/3C/arrofstructbothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrofstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrofstructbothmulti2.c -// RUN: %clang -c %S/arrofstructbothmulti1.checkedNOALL.c %S/arrofstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrofstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructbothmulti1.checked.c %S/arrofstructbothmulti2.checked.c -// RUN: test ! -f %S/arrofstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/arrofstructbothmulti2.checked.convert_again.c -// RUN: rm %S/arrofstructbothmulti1.checkedALL.c %S/arrofstructbothmulti2.checkedALL.c -// RUN: rm %S/arrofstructbothmulti1.checkedNOALL.c %S/arrofstructbothmulti2.checkedNOALL.c -// RUN: rm %S/arrofstructbothmulti1.checked.c %S/arrofstructbothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrofstructbothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrofstructbothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrofstructbothmulti1.c arrofstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrofstructbothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrofstructbothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrofstructbothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrofstructbothmulti1.c %t.checked/arrofstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/arrofstructbothmulti1.c +// RUN: test ! -f %t.convert_again/arrofstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructbothmulti2.c b/clang/test/3C/arrofstructbothmulti2.c index 7852433ff0b3..f0672dbb5913 100644 --- a/clang/test/3C/arrofstructbothmulti2.c +++ b/clang/test/3C/arrofstructbothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrofstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrofstructbothmulti1.c %s -// RUN: %clang -c %S/arrofstructbothmulti1.checkedNOALL2.c %S/arrofstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrofstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructbothmulti1.checked2.c %S/arrofstructbothmulti2.checked2.c -// RUN: test ! -f %S/arrofstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrofstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/arrofstructbothmulti1.checkedALL2.c %S/arrofstructbothmulti2.checkedALL2.c -// RUN: rm %S/arrofstructbothmulti1.checkedNOALL2.c %S/arrofstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/arrofstructbothmulti1.checked2.c %S/arrofstructbothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrofstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrofstructbothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrofstructbothmulti1.c arrofstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrofstructbothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrofstructbothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrofstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrofstructbothmulti1.c %t.checked/arrofstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/arrofstructbothmulti1.c +// RUN: test ! -f %t.convert_again/arrofstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcallee.c b/clang/test/3C/arrofstructcallee.c index 68e9512c99c7..7163eea7408c 100644 --- a/clang/test/3C/arrofstructcallee.c +++ b/clang/test/3C/arrofstructcallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructcallee.checked.c -- | count 0 -// RUN: rm %S/arrofstructcallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrofstructcallee.c -- | diff %t.checked/arrofstructcallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcalleemulti1.c b/clang/test/3C/arrofstructcalleemulti1.c index 4cd731c0dda2..65bd6eb545b7 100644 --- a/clang/test/3C/arrofstructcalleemulti1.c +++ b/clang/test/3C/arrofstructcalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrofstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrofstructcalleemulti2.c -// RUN: %clang -c %S/arrofstructcalleemulti1.checkedNOALL.c %S/arrofstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrofstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructcalleemulti1.checked.c %S/arrofstructcalleemulti2.checked.c -// RUN: test ! -f %S/arrofstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrofstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/arrofstructcalleemulti1.checkedALL.c %S/arrofstructcalleemulti2.checkedALL.c -// RUN: rm %S/arrofstructcalleemulti1.checkedNOALL.c %S/arrofstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/arrofstructcalleemulti1.checked.c %S/arrofstructcalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrofstructcalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrofstructcalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrofstructcalleemulti1.c arrofstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrofstructcalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrofstructcalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrofstructcalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrofstructcalleemulti1.c %t.checked/arrofstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/arrofstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/arrofstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcalleemulti2.c b/clang/test/3C/arrofstructcalleemulti2.c index 6aabe0a9a6dc..265d95735f52 100644 --- a/clang/test/3C/arrofstructcalleemulti2.c +++ b/clang/test/3C/arrofstructcalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrofstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrofstructcalleemulti1.c %s -// RUN: %clang -c %S/arrofstructcalleemulti1.checkedNOALL2.c %S/arrofstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrofstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructcalleemulti1.checked2.c %S/arrofstructcalleemulti2.checked2.c -// RUN: test ! -f %S/arrofstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrofstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/arrofstructcalleemulti1.checkedALL2.c %S/arrofstructcalleemulti2.checkedALL2.c -// RUN: rm %S/arrofstructcalleemulti1.checkedNOALL2.c %S/arrofstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/arrofstructcalleemulti1.checked2.c %S/arrofstructcalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrofstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrofstructcalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrofstructcalleemulti1.c arrofstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrofstructcalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrofstructcalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrofstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrofstructcalleemulti1.c %t.checked/arrofstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/arrofstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/arrofstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcaller.c b/clang/test/3C/arrofstructcaller.c index da28b00d2eb4..fcb492129f7c 100644 --- a/clang/test/3C/arrofstructcaller.c +++ b/clang/test/3C/arrofstructcaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructcaller.checked.c -- | count 0 -// RUN: rm %S/arrofstructcaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrofstructcaller.c -- | diff %t.checked/arrofstructcaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcallermulti1.c b/clang/test/3C/arrofstructcallermulti1.c index c1d03d01e82e..f64dfc99f892 100644 --- a/clang/test/3C/arrofstructcallermulti1.c +++ b/clang/test/3C/arrofstructcallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrofstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrofstructcallermulti2.c -// RUN: %clang -c %S/arrofstructcallermulti1.checkedNOALL.c %S/arrofstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrofstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructcallermulti1.checked.c %S/arrofstructcallermulti2.checked.c -// RUN: test ! -f %S/arrofstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/arrofstructcallermulti2.checked.convert_again.c -// RUN: rm %S/arrofstructcallermulti1.checkedALL.c %S/arrofstructcallermulti2.checkedALL.c -// RUN: rm %S/arrofstructcallermulti1.checkedNOALL.c %S/arrofstructcallermulti2.checkedNOALL.c -// RUN: rm %S/arrofstructcallermulti1.checked.c %S/arrofstructcallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrofstructcallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrofstructcallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrofstructcallermulti1.c arrofstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrofstructcallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrofstructcallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrofstructcallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrofstructcallermulti1.c %t.checked/arrofstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/arrofstructcallermulti1.c +// RUN: test ! -f %t.convert_again/arrofstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcallermulti2.c b/clang/test/3C/arrofstructcallermulti2.c index 04dcd02bae7a..f427018bfc56 100644 --- a/clang/test/3C/arrofstructcallermulti2.c +++ b/clang/test/3C/arrofstructcallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrofstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrofstructcallermulti1.c %s -// RUN: %clang -c %S/arrofstructcallermulti1.checkedNOALL2.c %S/arrofstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrofstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructcallermulti1.checked2.c %S/arrofstructcallermulti2.checked2.c -// RUN: test ! -f %S/arrofstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrofstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/arrofstructcallermulti1.checkedALL2.c %S/arrofstructcallermulti2.checkedALL2.c -// RUN: rm %S/arrofstructcallermulti1.checkedNOALL2.c %S/arrofstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/arrofstructcallermulti1.checked2.c %S/arrofstructcallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrofstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrofstructcallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrofstructcallermulti1.c arrofstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrofstructcallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrofstructcallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrofstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrofstructcallermulti1.c %t.checked/arrofstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/arrofstructcallermulti1.c +// RUN: test ! -f %t.convert_again/arrofstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructprotoboth.c b/clang/test/3C/arrofstructprotoboth.c index d4c2e30b2b6e..dab85c68af54 100644 --- a/clang/test/3C/arrofstructprotoboth.c +++ b/clang/test/3C/arrofstructprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/arrofstructprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrofstructprotoboth.c -- | diff %t.checked/arrofstructprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructprotocallee.c b/clang/test/3C/arrofstructprotocallee.c index 655a17afa557..fa30176c5040 100644 --- a/clang/test/3C/arrofstructprotocallee.c +++ b/clang/test/3C/arrofstructprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/arrofstructprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrofstructprotocallee.c -- | diff %t.checked/arrofstructprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructprotocaller.c b/clang/test/3C/arrofstructprotocaller.c index 9dc30c48633a..9b9ae9392461 100644 --- a/clang/test/3C/arrofstructprotocaller.c +++ b/clang/test/3C/arrofstructprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/arrofstructprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrofstructprotocaller.c -- | diff %t.checked/arrofstructprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructprotosafe.c b/clang/test/3C/arrofstructprotosafe.c index fc2156867ed4..81cbb054c03a 100644 --- a/clang/test/3C/arrofstructprotosafe.c +++ b/clang/test/3C/arrofstructprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/arrofstructprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrofstructprotosafe.c -- | diff %t.checked/arrofstructprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructsafe.c b/clang/test/3C/arrofstructsafe.c index bd02df782d1d..03a9d63957c1 100644 --- a/clang/test/3C/arrofstructsafe.c +++ b/clang/test/3C/arrofstructsafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructsafe.checked.c -- | count 0 -// RUN: rm %S/arrofstructsafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrofstructsafe.c -- | diff %t.checked/arrofstructsafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructsafemulti1.c b/clang/test/3C/arrofstructsafemulti1.c index 447df33ee85e..bd7ce074a700 100644 --- a/clang/test/3C/arrofstructsafemulti1.c +++ b/clang/test/3C/arrofstructsafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrofstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrofstructsafemulti2.c -// RUN: %clang -c %S/arrofstructsafemulti1.checkedNOALL.c %S/arrofstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrofstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructsafemulti1.checked.c %S/arrofstructsafemulti2.checked.c -// RUN: test ! -f %S/arrofstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrofstructsafemulti2.checked.convert_again.c -// RUN: rm %S/arrofstructsafemulti1.checkedALL.c %S/arrofstructsafemulti2.checkedALL.c -// RUN: rm %S/arrofstructsafemulti1.checkedNOALL.c %S/arrofstructsafemulti2.checkedNOALL.c -// RUN: rm %S/arrofstructsafemulti1.checked.c %S/arrofstructsafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrofstructsafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrofstructsafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrofstructsafemulti1.c arrofstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrofstructsafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrofstructsafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrofstructsafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrofstructsafemulti1.c %t.checked/arrofstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/arrofstructsafemulti1.c +// RUN: test ! -f %t.convert_again/arrofstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructsafemulti2.c b/clang/test/3C/arrofstructsafemulti2.c index 539bc29f255f..94d4b367451f 100644 --- a/clang/test/3C/arrofstructsafemulti2.c +++ b/clang/test/3C/arrofstructsafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrofstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrofstructsafemulti1.c %s -// RUN: %clang -c %S/arrofstructsafemulti1.checkedNOALL2.c %S/arrofstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrofstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructsafemulti1.checked2.c %S/arrofstructsafemulti2.checked2.c -// RUN: test ! -f %S/arrofstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrofstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/arrofstructsafemulti1.checkedALL2.c %S/arrofstructsafemulti2.checkedALL2.c -// RUN: rm %S/arrofstructsafemulti1.checkedNOALL2.c %S/arrofstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/arrofstructsafemulti1.checked2.c %S/arrofstructsafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrofstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrofstructsafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrofstructsafemulti1.c arrofstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrofstructsafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrofstructsafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrofstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrofstructsafemulti1.c %t.checked/arrofstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/arrofstructsafemulti1.c +// RUN: test ! -f %t.convert_again/arrofstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrprotoboth.c b/clang/test/3C/arrprotoboth.c index 0c0eb974a059..dad02f1c7870 100644 --- a/clang/test/3C/arrprotoboth.c +++ b/clang/test/3C/arrprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrprotoboth.checked.c -- | count 0 -// RUN: rm %S/arrprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrprotoboth.c -- | diff %t.checked/arrprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrprotocallee.c b/clang/test/3C/arrprotocallee.c index bd09b9b911b3..757408f68158 100644 --- a/clang/test/3C/arrprotocallee.c +++ b/clang/test/3C/arrprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrprotocallee.checked.c -- | count 0 -// RUN: rm %S/arrprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrprotocallee.c -- | diff %t.checked/arrprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrprotocaller.c b/clang/test/3C/arrprotocaller.c index 32fbf0608b87..333ff712df89 100644 --- a/clang/test/3C/arrprotocaller.c +++ b/clang/test/3C/arrprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrprotocaller.checked.c -- | count 0 -// RUN: rm %S/arrprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrprotocaller.c -- | diff %t.checked/arrprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrprotosafe.c b/clang/test/3C/arrprotosafe.c index 23b528dfb749..9cf8c982eded 100644 --- a/clang/test/3C/arrprotosafe.c +++ b/clang/test/3C/arrprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrprotosafe.checked.c -- | count 0 -// RUN: rm %S/arrprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrprotosafe.c -- | diff %t.checked/arrprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrsafe.c b/clang/test/3C/arrsafe.c index 1b906b2b15b2..d763f9f53c3b 100644 --- a/clang/test/3C/arrsafe.c +++ b/clang/test/3C/arrsafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrsafe.checked.c -- | count 0 -// RUN: rm %S/arrsafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrsafe.c -- | diff %t.checked/arrsafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrsafemulti1.c b/clang/test/3C/arrsafemulti1.c index 36fe19a5d462..5f93909468bb 100644 --- a/clang/test/3C/arrsafemulti1.c +++ b/clang/test/3C/arrsafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrsafemulti2.c -// RUN: %clang -c %S/arrsafemulti1.checkedNOALL.c %S/arrsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrsafemulti1.checked.c %S/arrsafemulti2.checked.c -// RUN: test ! -f %S/arrsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrsafemulti2.checked.convert_again.c -// RUN: rm %S/arrsafemulti1.checkedALL.c %S/arrsafemulti2.checkedALL.c -// RUN: rm %S/arrsafemulti1.checkedNOALL.c %S/arrsafemulti2.checkedNOALL.c -// RUN: rm %S/arrsafemulti1.checked.c %S/arrsafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrsafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrsafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrsafemulti1.c arrsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrsafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrsafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrsafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrsafemulti1.c %t.checked/arrsafemulti2.c -- +// RUN: test ! -f %t.convert_again/arrsafemulti1.c +// RUN: test ! -f %t.convert_again/arrsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrsafemulti2.c b/clang/test/3C/arrsafemulti2.c index 1d7ae5938c36..5277afe2e730 100644 --- a/clang/test/3C/arrsafemulti2.c +++ b/clang/test/3C/arrsafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrsafemulti1.c %s -// RUN: %clang -c %S/arrsafemulti1.checkedNOALL2.c %S/arrsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrsafemulti1.checked2.c %S/arrsafemulti2.checked2.c -// RUN: test ! -f %S/arrsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrsafemulti2.checked2.convert_again.c -// RUN: rm %S/arrsafemulti1.checkedALL2.c %S/arrsafemulti2.checkedALL2.c -// RUN: rm %S/arrsafemulti1.checkedNOALL2.c %S/arrsafemulti2.checkedNOALL2.c -// RUN: rm %S/arrsafemulti1.checked2.c %S/arrsafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrsafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrsafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrsafemulti1.c arrsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrsafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrsafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrsafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrsafemulti1.c %t.checked/arrsafemulti2.c -- +// RUN: test ! -f %t.convert_again/arrsafemulti1.c +// RUN: test ! -f %t.convert_again/arrsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrstructboth.c b/clang/test/3C/arrstructboth.c index eaba1847c94b..9441e2998adc 100644 --- a/clang/test/3C/arrstructboth.c +++ b/clang/test/3C/arrstructboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructboth.checked.c -- | count 0 -// RUN: rm %S/arrstructboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrstructboth.c -- | diff %t.checked/arrstructboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrstructbothmulti1.c b/clang/test/3C/arrstructbothmulti1.c index 5b92eb7d1f26..d6d105251f32 100644 --- a/clang/test/3C/arrstructbothmulti1.c +++ b/clang/test/3C/arrstructbothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrstructbothmulti2.c -// RUN: %clang -c %S/arrstructbothmulti1.checkedNOALL.c %S/arrstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructbothmulti1.checked.c %S/arrstructbothmulti2.checked.c -// RUN: test ! -f %S/arrstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/arrstructbothmulti2.checked.convert_again.c -// RUN: rm %S/arrstructbothmulti1.checkedALL.c %S/arrstructbothmulti2.checkedALL.c -// RUN: rm %S/arrstructbothmulti1.checkedNOALL.c %S/arrstructbothmulti2.checkedNOALL.c -// RUN: rm %S/arrstructbothmulti1.checked.c %S/arrstructbothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrstructbothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrstructbothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrstructbothmulti1.c arrstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrstructbothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrstructbothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrstructbothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrstructbothmulti1.c %t.checked/arrstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/arrstructbothmulti1.c +// RUN: test ! -f %t.convert_again/arrstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrstructbothmulti2.c b/clang/test/3C/arrstructbothmulti2.c index 8dab1a871caf..4ecdebe35803 100644 --- a/clang/test/3C/arrstructbothmulti2.c +++ b/clang/test/3C/arrstructbothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrstructbothmulti1.c %s -// RUN: %clang -c %S/arrstructbothmulti1.checkedNOALL2.c %S/arrstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructbothmulti1.checked2.c %S/arrstructbothmulti2.checked2.c -// RUN: test ! -f %S/arrstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/arrstructbothmulti1.checkedALL2.c %S/arrstructbothmulti2.checkedALL2.c -// RUN: rm %S/arrstructbothmulti1.checkedNOALL2.c %S/arrstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/arrstructbothmulti1.checked2.c %S/arrstructbothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrstructbothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrstructbothmulti1.c arrstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrstructbothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrstructbothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrstructbothmulti1.c %t.checked/arrstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/arrstructbothmulti1.c +// RUN: test ! -f %t.convert_again/arrstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcallee.c b/clang/test/3C/arrstructcallee.c index 83ebae07c1be..82c1b33e6b18 100644 --- a/clang/test/3C/arrstructcallee.c +++ b/clang/test/3C/arrstructcallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructcallee.checked.c -- | count 0 -// RUN: rm %S/arrstructcallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrstructcallee.c -- | diff %t.checked/arrstructcallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcalleemulti1.c b/clang/test/3C/arrstructcalleemulti1.c index 9b56fec1d348..20e253a7c1eb 100644 --- a/clang/test/3C/arrstructcalleemulti1.c +++ b/clang/test/3C/arrstructcalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrstructcalleemulti2.c -// RUN: %clang -c %S/arrstructcalleemulti1.checkedNOALL.c %S/arrstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructcalleemulti1.checked.c %S/arrstructcalleemulti2.checked.c -// RUN: test ! -f %S/arrstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/arrstructcalleemulti1.checkedALL.c %S/arrstructcalleemulti2.checkedALL.c -// RUN: rm %S/arrstructcalleemulti1.checkedNOALL.c %S/arrstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/arrstructcalleemulti1.checked.c %S/arrstructcalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrstructcalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrstructcalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrstructcalleemulti1.c arrstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrstructcalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrstructcalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrstructcalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrstructcalleemulti1.c %t.checked/arrstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/arrstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/arrstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcalleemulti2.c b/clang/test/3C/arrstructcalleemulti2.c index ce8a328d9450..6df35a461bf9 100644 --- a/clang/test/3C/arrstructcalleemulti2.c +++ b/clang/test/3C/arrstructcalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrstructcalleemulti1.c %s -// RUN: %clang -c %S/arrstructcalleemulti1.checkedNOALL2.c %S/arrstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructcalleemulti1.checked2.c %S/arrstructcalleemulti2.checked2.c -// RUN: test ! -f %S/arrstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/arrstructcalleemulti1.checkedALL2.c %S/arrstructcalleemulti2.checkedALL2.c -// RUN: rm %S/arrstructcalleemulti1.checkedNOALL2.c %S/arrstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/arrstructcalleemulti1.checked2.c %S/arrstructcalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrstructcalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrstructcalleemulti1.c arrstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrstructcalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrstructcalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrstructcalleemulti1.c %t.checked/arrstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/arrstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/arrstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcaller.c b/clang/test/3C/arrstructcaller.c index 4f19adb90864..0845214d9d34 100644 --- a/clang/test/3C/arrstructcaller.c +++ b/clang/test/3C/arrstructcaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructcaller.checked.c -- | count 0 -// RUN: rm %S/arrstructcaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrstructcaller.c -- | diff %t.checked/arrstructcaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcallermulti1.c b/clang/test/3C/arrstructcallermulti1.c index 33354c0ad186..89a0dc892550 100644 --- a/clang/test/3C/arrstructcallermulti1.c +++ b/clang/test/3C/arrstructcallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrstructcallermulti2.c -// RUN: %clang -c %S/arrstructcallermulti1.checkedNOALL.c %S/arrstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructcallermulti1.checked.c %S/arrstructcallermulti2.checked.c -// RUN: test ! -f %S/arrstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/arrstructcallermulti2.checked.convert_again.c -// RUN: rm %S/arrstructcallermulti1.checkedALL.c %S/arrstructcallermulti2.checkedALL.c -// RUN: rm %S/arrstructcallermulti1.checkedNOALL.c %S/arrstructcallermulti2.checkedNOALL.c -// RUN: rm %S/arrstructcallermulti1.checked.c %S/arrstructcallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrstructcallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrstructcallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrstructcallermulti1.c arrstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrstructcallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrstructcallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrstructcallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrstructcallermulti1.c %t.checked/arrstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/arrstructcallermulti1.c +// RUN: test ! -f %t.convert_again/arrstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcallermulti2.c b/clang/test/3C/arrstructcallermulti2.c index 1762fefc36f0..257e03da3402 100644 --- a/clang/test/3C/arrstructcallermulti2.c +++ b/clang/test/3C/arrstructcallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrstructcallermulti1.c %s -// RUN: %clang -c %S/arrstructcallermulti1.checkedNOALL2.c %S/arrstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructcallermulti1.checked2.c %S/arrstructcallermulti2.checked2.c -// RUN: test ! -f %S/arrstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/arrstructcallermulti1.checkedALL2.c %S/arrstructcallermulti2.checkedALL2.c -// RUN: rm %S/arrstructcallermulti1.checkedNOALL2.c %S/arrstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/arrstructcallermulti1.checked2.c %S/arrstructcallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrstructcallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrstructcallermulti1.c arrstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrstructcallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrstructcallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrstructcallermulti1.c %t.checked/arrstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/arrstructcallermulti1.c +// RUN: test ! -f %t.convert_again/arrstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrstructprotoboth.c b/clang/test/3C/arrstructprotoboth.c index 89a034eceabf..b942ec65d8f9 100644 --- a/clang/test/3C/arrstructprotoboth.c +++ b/clang/test/3C/arrstructprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/arrstructprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrstructprotoboth.c -- | diff %t.checked/arrstructprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrstructprotocallee.c b/clang/test/3C/arrstructprotocallee.c index 09c59405e2d6..55692c571cfb 100644 --- a/clang/test/3C/arrstructprotocallee.c +++ b/clang/test/3C/arrstructprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/arrstructprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrstructprotocallee.c -- | diff %t.checked/arrstructprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrstructprotocaller.c b/clang/test/3C/arrstructprotocaller.c index 70b401c8dc9a..6d591472d9a2 100644 --- a/clang/test/3C/arrstructprotocaller.c +++ b/clang/test/3C/arrstructprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/arrstructprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrstructprotocaller.c -- | diff %t.checked/arrstructprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrstructprotosafe.c b/clang/test/3C/arrstructprotosafe.c index 63a9e3597c91..04edfed17808 100644 --- a/clang/test/3C/arrstructprotosafe.c +++ b/clang/test/3C/arrstructprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/arrstructprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrstructprotosafe.c -- | diff %t.checked/arrstructprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrstructsafe.c b/clang/test/3C/arrstructsafe.c index 142c9841f4be..bacca4a23858 100644 --- a/clang/test/3C/arrstructsafe.c +++ b/clang/test/3C/arrstructsafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructsafe.checked.c -- | count 0 -// RUN: rm %S/arrstructsafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/arrstructsafe.c -- | diff %t.checked/arrstructsafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/arrstructsafemulti1.c b/clang/test/3C/arrstructsafemulti1.c index 0475219a1c60..dbfd2a09cad2 100644 --- a/clang/test/3C/arrstructsafemulti1.c +++ b/clang/test/3C/arrstructsafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrstructsafemulti2.c -// RUN: %clang -c %S/arrstructsafemulti1.checkedNOALL.c %S/arrstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructsafemulti1.checked.c %S/arrstructsafemulti2.checked.c -// RUN: test ! -f %S/arrstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrstructsafemulti2.checked.convert_again.c -// RUN: rm %S/arrstructsafemulti1.checkedALL.c %S/arrstructsafemulti2.checkedALL.c -// RUN: rm %S/arrstructsafemulti1.checkedNOALL.c %S/arrstructsafemulti2.checkedNOALL.c -// RUN: rm %S/arrstructsafemulti1.checked.c %S/arrstructsafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/arrstructsafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/arrstructsafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c arrstructsafemulti1.c arrstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/arrstructsafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/arrstructsafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrstructsafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrstructsafemulti1.c %t.checked/arrstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/arrstructsafemulti1.c +// RUN: test ! -f %t.convert_again/arrstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/arrstructsafemulti2.c b/clang/test/3C/arrstructsafemulti2.c index d7e938c87566..a75eb285d7c0 100644 --- a/clang/test/3C/arrstructsafemulti2.c +++ b/clang/test/3C/arrstructsafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrstructsafemulti1.c %s -// RUN: %clang -c %S/arrstructsafemulti1.checkedNOALL2.c %S/arrstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructsafemulti1.checked2.c %S/arrstructsafemulti2.checked2.c -// RUN: test ! -f %S/arrstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/arrstructsafemulti1.checkedALL2.c %S/arrstructsafemulti2.checkedALL2.c -// RUN: rm %S/arrstructsafemulti1.checkedNOALL2.c %S/arrstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/arrstructsafemulti1.checked2.c %S/arrstructsafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/arrstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/arrstructsafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c arrstructsafemulti1.c arrstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/arrstructsafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/arrstructsafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/arrstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/arrstructsafemulti1.c %t.checked/arrstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/arrstructsafemulti1.c +// RUN: test ! -f %t.convert_again/arrstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/b10_allsafepointerstruct.c b/clang/test/3C/b10_allsafepointerstruct.c index 44b115943260..26afe9d1b685 100644 --- a/clang/test/3C/b10_allsafepointerstruct.c +++ b/clang/test/3C/b10_allsafepointerstruct.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b10_allsafepointerstruct.checked.c -- | count 0 -// RUN: rm %S/b10_allsafepointerstruct.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b10_allsafepointerstruct.c -- | diff %t.checked/b10_allsafepointerstruct.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b11_calleestructnp.c b/clang/test/3C/b11_calleestructnp.c index 5c667a178640..5a26f360006c 100644 --- a/clang/test/3C/b11_calleestructnp.c +++ b/clang/test/3C/b11_calleestructnp.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b11_calleestructnp.checked.c -- | count 0 -// RUN: rm %S/b11_calleestructnp.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b11_calleestructnp.c -- | diff %t.checked/b11_calleestructnp.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b12_callerstructnp.c b/clang/test/3C/b12_callerstructnp.c index 933b89f7512a..1c20b1364e4d 100644 --- a/clang/test/3C/b12_callerstructnp.c +++ b/clang/test/3C/b12_callerstructnp.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b12_callerstructnp.checked.c -- | count 0 -// RUN: rm %S/b12_callerstructnp.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b12_callerstructnp.c -- | diff %t.checked/b12_callerstructnp.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b13_calleestructp.c b/clang/test/3C/b13_calleestructp.c index a164619b933e..04674c6674d5 100644 --- a/clang/test/3C/b13_calleestructp.c +++ b/clang/test/3C/b13_calleestructp.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b13_calleestructp.checked.c -- | count 0 -// RUN: rm %S/b13_calleestructp.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b13_calleestructp.c -- | diff %t.checked/b13_calleestructp.c - #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b14_callerstructp.c b/clang/test/3C/b14_callerstructp.c index 0d9c9733e1ca..afe89e3ef66c 100644 --- a/clang/test/3C/b14_callerstructp.c +++ b/clang/test/3C/b14_callerstructp.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b14_callerstructp.checked.c -- | count 0 -// RUN: rm %S/b14_callerstructp.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b14_callerstructp.c -- | diff %t.checked/b14_callerstructp.c - #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b15_calleepointerstruct.c b/clang/test/3C/b15_calleepointerstruct.c index 84254e4a5077..e9306c6e559f 100644 --- a/clang/test/3C/b15_calleepointerstruct.c +++ b/clang/test/3C/b15_calleepointerstruct.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b15_calleepointerstruct.checked.c -- | count 0 -// RUN: rm %S/b15_calleepointerstruct.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b15_calleepointerstruct.c -- | diff %t.checked/b15_calleepointerstruct.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b16_callerpointerstruct.c b/clang/test/3C/b16_callerpointerstruct.c index 5df55c6e6023..58390019383e 100644 --- a/clang/test/3C/b16_callerpointerstruct.c +++ b/clang/test/3C/b16_callerpointerstruct.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b16_callerpointerstruct.checked.c -- | count 0 -// RUN: rm %S/b16_callerpointerstruct.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b16_callerpointerstruct.c -- | diff %t.checked/b16_callerpointerstruct.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b17_bothstructnp.c b/clang/test/3C/b17_bothstructnp.c index a71f4be39a68..e0b5ca8bbf31 100644 --- a/clang/test/3C/b17_bothstructnp.c +++ b/clang/test/3C/b17_bothstructnp.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b17_bothstructnp.checked.c -- | count 0 -// RUN: rm %S/b17_bothstructnp.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b17_bothstructnp.c -- | diff %t.checked/b17_bothstructnp.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b18_bothstructp.c b/clang/test/3C/b18_bothstructp.c index 80bd6c9ef70b..f229c931c8bf 100644 --- a/clang/test/3C/b18_bothstructp.c +++ b/clang/test/3C/b18_bothstructp.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b18_bothstructp.checked.c -- | count 0 -// RUN: rm %S/b18_bothstructp.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b18_bothstructp.c -- | diff %t.checked/b18_bothstructp.c - #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b19_bothpointerstruct.c b/clang/test/3C/b19_bothpointerstruct.c index ee2dad80c9e8..044791c4cbf6 100644 --- a/clang/test/3C/b19_bothpointerstruct.c +++ b/clang/test/3C/b19_bothpointerstruct.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b19_bothpointerstruct.checked.c -- | count 0 -// RUN: rm %S/b19_bothpointerstruct.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b19_bothpointerstruct.c -- | diff %t.checked/b19_bothpointerstruct.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b1_allsafe.c b/clang/test/3C/b1_allsafe.c index 76a33c02dbc5..4f0efb3eeaac 100644 --- a/clang/test/3C/b1_allsafe.c +++ b/clang/test/3C/b1_allsafe.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b1_allsafe.checked.c -- | count 0 -// RUN: rm %S/b1_allsafe.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b1_allsafe.c -- | diff %t.checked/b1_allsafe.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b20_allsafepointerstructproto.c b/clang/test/3C/b20_allsafepointerstructproto.c index 6d70f69de5c9..7cd130708611 100644 --- a/clang/test/3C/b20_allsafepointerstructproto.c +++ b/clang/test/3C/b20_allsafepointerstructproto.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b20_allsafepointerstructproto.checked.c -- | count 0 -// RUN: rm %S/b20_allsafepointerstructproto.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b20_allsafepointerstructproto.c -- | diff %t.checked/b20_allsafepointerstructproto.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b21_calleepointerstructproto.c b/clang/test/3C/b21_calleepointerstructproto.c index babbe2af68cc..3f42528ce3a6 100644 --- a/clang/test/3C/b21_calleepointerstructproto.c +++ b/clang/test/3C/b21_calleepointerstructproto.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b21_calleepointerstructproto.checked.c -- | count 0 -// RUN: rm %S/b21_calleepointerstructproto.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b21_calleepointerstructproto.c -- | diff %t.checked/b21_calleepointerstructproto.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b22_callerpointerstructproto.c b/clang/test/3C/b22_callerpointerstructproto.c index ba0e1fa00146..8d5d2656044a 100644 --- a/clang/test/3C/b22_callerpointerstructproto.c +++ b/clang/test/3C/b22_callerpointerstructproto.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b22_callerpointerstructproto.checked.c -- | count 0 -// RUN: rm %S/b22_callerpointerstructproto.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b22_callerpointerstructproto.c -- | diff %t.checked/b22_callerpointerstructproto.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b23_explicitunsafecast.c b/clang/test/3C/b23_explicitunsafecast.c index 755a4ef0b4f8..0c1f9e327a72 100644 --- a/clang/test/3C/b23_explicitunsafecast.c +++ b/clang/test/3C/b23_explicitunsafecast.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b23_explicitunsafecast.checked.c -- | count 0 -// RUN: rm %S/b23_explicitunsafecast.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b23_explicitunsafecast.c -- | diff %t.checked/b23_explicitunsafecast.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b23_retswitchexplicit.c b/clang/test/3C/b23_retswitchexplicit.c index 2b2eb5e77f4a..b2ada95c0ed3 100644 --- a/clang/test/3C/b23_retswitchexplicit.c +++ b/clang/test/3C/b23_retswitchexplicit.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b23_retswitchexplicit.checked.c -- | count 0 -// RUN: rm %S/b23_retswitchexplicit.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b23_retswitchexplicit.c -- | diff %t.checked/b23_retswitchexplicit.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b24_implicitunsafecast.c b/clang/test/3C/b24_implicitunsafecast.c index baf664ccefd3..ad3a78347446 100644 --- a/clang/test/3C/b24_implicitunsafecast.c +++ b/clang/test/3C/b24_implicitunsafecast.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b24_implicitunsafecast.checked.c -- | count 0 -// RUN: rm %S/b24_implicitunsafecast.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b24_implicitunsafecast.c -- | diff %t.checked/b24_implicitunsafecast.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b24_retswitchimplicit.c b/clang/test/3C/b24_retswitchimplicit.c index 2e7aa641fa5e..c23c8564ae2d 100644 --- a/clang/test/3C/b24_retswitchimplicit.c +++ b/clang/test/3C/b24_retswitchimplicit.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b24_retswitchimplicit.checked.c -- | count 0 -// RUN: rm %S/b24_retswitchimplicit.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b24_retswitchimplicit.c -- | diff %t.checked/b24_retswitchimplicit.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b25_castprotosafe.c b/clang/test/3C/b25_castprotosafe.c index bbad01a825d6..bdde01544d28 100644 --- a/clang/test/3C/b25_castprotosafe.c +++ b/clang/test/3C/b25_castprotosafe.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b25_castprotosafe.checked.c -- | count 0 -// RUN: rm %S/b25_castprotosafe.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b25_castprotosafe.c -- | diff %t.checked/b25_castprotosafe.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b26_castprotounsafe.c b/clang/test/3C/b26_castprotounsafe.c index 179195c9abe8..01b1ac35ea63 100644 --- a/clang/test/3C/b26_castprotounsafe.c +++ b/clang/test/3C/b26_castprotounsafe.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b26_castprotounsafe.checked.c -- | count 0 -// RUN: rm %S/b26_castprotounsafe.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b26_castprotounsafe.c -- | diff %t.checked/b26_castprotounsafe.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b26_castprotounsafeimplicit.c b/clang/test/3C/b26_castprotounsafeimplicit.c index 2f3897648268..c592bfd679e3 100644 --- a/clang/test/3C/b26_castprotounsafeimplicit.c +++ b/clang/test/3C/b26_castprotounsafeimplicit.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b26_castprotounsafeimplicit.checked.c -- | count 0 -// RUN: rm %S/b26_castprotounsafeimplicit.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b26_castprotounsafeimplicit.c -- | diff %t.checked/b26_castprotounsafeimplicit.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b26_castprotounsafeimplicitretswitch.c b/clang/test/3C/b26_castprotounsafeimplicitretswitch.c index 94407bc7a442..bb05f66dd7e8 100644 --- a/clang/test/3C/b26_castprotounsafeimplicitretswitch.c +++ b/clang/test/3C/b26_castprotounsafeimplicitretswitch.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b26_castprotounsafeimplicitretswitch.checked.c -- | count 0 -// RUN: rm %S/b26_castprotounsafeimplicitretswitch.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b26_castprotounsafeimplicitretswitch.c -- | diff %t.checked/b26_castprotounsafeimplicitretswitch.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b27_structcastsafe.c b/clang/test/3C/b27_structcastsafe.c index bc105d899d4a..f99cdd7092fc 100644 --- a/clang/test/3C/b27_structcastsafe.c +++ b/clang/test/3C/b27_structcastsafe.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b27_structcastsafe.checked.c -- | count 0 -// RUN: rm %S/b27_structcastsafe.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b27_structcastsafe.c -- | diff %t.checked/b27_structcastsafe.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b28_structcastexplicit.c b/clang/test/3C/b28_structcastexplicit.c index 1f04c4c72c68..7f47f0d75038 100644 --- a/clang/test/3C/b28_structcastexplicit.c +++ b/clang/test/3C/b28_structcastexplicit.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b28_structcastexplicit.checked.c -- | count 0 -// RUN: rm %S/b28_structcastexplicit.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b28_structcastexplicit.c -- | diff %t.checked/b28_structcastexplicit.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b28_structcastimplicit.c b/clang/test/3C/b28_structcastimplicit.c index 59e942d4be01..79866966cc18 100644 --- a/clang/test/3C/b28_structcastimplicit.c +++ b/clang/test/3C/b28_structcastimplicit.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b28_structcastimplicit.checked.c -- | count 0 -// RUN: rm %S/b28_structcastimplicit.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b28_structcastimplicit.c -- | diff %t.checked/b28_structcastimplicit.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b28_structimplicitretcast.c b/clang/test/3C/b28_structimplicitretcast.c index 26ad8facfded..23e4dba7d318 100644 --- a/clang/test/3C/b28_structimplicitretcast.c +++ b/clang/test/3C/b28_structimplicitretcast.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b28_structimplicitretcast.checked.c -- | count 0 -// RUN: rm %S/b28_structimplicitretcast.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b28_structimplicitretcast.c -- | diff %t.checked/b28_structimplicitretcast.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b29_structprotocastsafe.c b/clang/test/3C/b29_structprotocastsafe.c index 9bd93f0e6f16..0c4901597215 100644 --- a/clang/test/3C/b29_structprotocastsafe.c +++ b/clang/test/3C/b29_structprotocastsafe.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b29_structprotocastsafe.checked.c -- | count 0 -// RUN: rm %S/b29_structprotocastsafe.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b29_structprotocastsafe.c -- | diff %t.checked/b29_structprotocastsafe.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b29_structprotocastsafeuseunsafe.c b/clang/test/3C/b29_structprotocastsafeuseunsafe.c index 09a70c74e742..0f88605ccf43 100644 --- a/clang/test/3C/b29_structprotocastsafeuseunsafe.c +++ b/clang/test/3C/b29_structprotocastsafeuseunsafe.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b29_structprotocastsafeuseunsafe.checked.c -- | count 0 -// RUN: rm %S/b29_structprotocastsafeuseunsafe.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b29_structprotocastsafeuseunsafe.c -- | diff %t.checked/b29_structprotocastsafeuseunsafe.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b2_calleeunsafe.c b/clang/test/3C/b2_calleeunsafe.c index 57058d3d82fe..6486c1f02181 100644 --- a/clang/test/3C/b2_calleeunsafe.c +++ b/clang/test/3C/b2_calleeunsafe.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b2_calleeunsafe.checked.c -- | count 0 -// RUN: rm %S/b2_calleeunsafe.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b2_calleeunsafe.c -- | diff %t.checked/b2_calleeunsafe.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotocastexplicitunsafeuseunsafe.c b/clang/test/3C/b30_structprotocastexplicitunsafeuseunsafe.c index c5e9882fcb4f..42b1cd182e75 100644 --- a/clang/test/3C/b30_structprotocastexplicitunsafeuseunsafe.c +++ b/clang/test/3C/b30_structprotocastexplicitunsafeuseunsafe.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotocastexplicitunsafeuseunsafe.checked.c -- | count 0 -// RUN: rm %S/b30_structprotocastexplicitunsafeuseunsafe.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotocastexplicitunsafeuseunsafe.c -- | diff %t.checked/b30_structprotocastexplicitunsafeuseunsafe.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotocastimplicitunsafeuseunsafe.c b/clang/test/3C/b30_structprotocastimplicitunsafeuseunsafe.c index c1e87e8639c2..b09a01e949d9 100644 --- a/clang/test/3C/b30_structprotocastimplicitunsafeuseunsafe.c +++ b/clang/test/3C/b30_structprotocastimplicitunsafeuseunsafe.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotocastimplicitunsafeuseunsafe.checked.c -- | count 0 -// RUN: rm %S/b30_structprotocastimplicitunsafeuseunsafe.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotocastimplicitunsafeuseunsafe.c -- | diff %t.checked/b30_structprotocastimplicitunsafeuseunsafe.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotocastunsafeexplicit.c b/clang/test/3C/b30_structprotocastunsafeexplicit.c index 7a0c0c05e269..64223f5e2c5b 100644 --- a/clang/test/3C/b30_structprotocastunsafeexplicit.c +++ b/clang/test/3C/b30_structprotocastunsafeexplicit.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotocastunsafeexplicit.checked.c -- | count 0 -// RUN: rm %S/b30_structprotocastunsafeexplicit.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotocastunsafeexplicit.c -- | diff %t.checked/b30_structprotocastunsafeexplicit.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotocastunsafeimplicit.c b/clang/test/3C/b30_structprotocastunsafeimplicit.c index 304944060cc5..1356ec3893f0 100644 --- a/clang/test/3C/b30_structprotocastunsafeimplicit.c +++ b/clang/test/3C/b30_structprotocastunsafeimplicit.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotocastunsafeimplicit.checked.c -- | count 0 -// RUN: rm %S/b30_structprotocastunsafeimplicit.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotocastunsafeimplicit.c -- | diff %t.checked/b30_structprotocastunsafeimplicit.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotocastunsafeimplicitretswitch.c b/clang/test/3C/b30_structprotocastunsafeimplicitretswitch.c index 77c4984545cd..3aa6bfee886f 100644 --- a/clang/test/3C/b30_structprotocastunsafeimplicitretswitch.c +++ b/clang/test/3C/b30_structprotocastunsafeimplicitretswitch.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotocastunsafeimplicitretswitch.checked.c -- | count 0 -// RUN: rm %S/b30_structprotocastunsafeimplicitretswitch.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotocastunsafeimplicitretswitch.c -- | diff %t.checked/b30_structprotocastunsafeimplicitretswitch.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotoconflict.c b/clang/test/3C/b30_structprotoconflict.c index cd09caec6b12..a6decb56cee8 100644 --- a/clang/test/3C/b30_structprotoconflict.c +++ b/clang/test/3C/b30_structprotoconflict.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotoconflict.checked.c -- | count 0 -// RUN: rm %S/b30_structprotoconflict.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotoconflict.c -- | diff %t.checked/b30_structprotoconflict.c - #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b30_structprotoconflictbodyconvert.c b/clang/test/3C/b30_structprotoconflictbodyconvert.c index e6fa81dca2c6..c6d03ba6deb2 100644 --- a/clang/test/3C/b30_structprotoconflictbodyconvert.c +++ b/clang/test/3C/b30_structprotoconflictbodyconvert.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotoconflictbodyconvert.checked.c -- | count 0 -// RUN: rm %S/b30_structprotoconflictbodyconvert.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotoconflictbodyconvert.c -- | diff %t.checked/b30_structprotoconflictbodyconvert.c - #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b3_onecallerunsafe.c b/clang/test/3C/b3_onecallerunsafe.c index 86b88be0b42b..5b076f352778 100644 --- a/clang/test/3C/b3_onecallerunsafe.c +++ b/clang/test/3C/b3_onecallerunsafe.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b3_onecallerunsafe.checked.c -- | count 0 -// RUN: rm %S/b3_onecallerunsafe.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b3_onecallerunsafe.c -- | diff %t.checked/b3_onecallerunsafe.c - #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b4_bothunsafe.c b/clang/test/3C/b4_bothunsafe.c index 0c91fb3c5e49..ab1661236c14 100644 --- a/clang/test/3C/b4_bothunsafe.c +++ b/clang/test/3C/b4_bothunsafe.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b4_bothunsafe.checked.c -- | count 0 -// RUN: rm %S/b4_bothunsafe.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b4_bothunsafe.c -- | diff %t.checked/b4_bothunsafe.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b5_calleeunsafeproto.c b/clang/test/3C/b5_calleeunsafeproto.c index ca6138a71f84..ba6f7af77b83 100644 --- a/clang/test/3C/b5_calleeunsafeproto.c +++ b/clang/test/3C/b5_calleeunsafeproto.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b5_calleeunsafeproto.checked.c -- | count 0 -// RUN: rm %S/b5_calleeunsafeproto.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b5_calleeunsafeproto.c -- | diff %t.checked/b5_calleeunsafeproto.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b6_callerunsafeproto.c b/clang/test/3C/b6_callerunsafeproto.c index 63755f67785b..eca04ee16917 100644 --- a/clang/test/3C/b6_callerunsafeproto.c +++ b/clang/test/3C/b6_callerunsafeproto.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b6_callerunsafeproto.checked.c -- | count 0 -// RUN: rm %S/b6_callerunsafeproto.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b6_callerunsafeproto.c -- | diff %t.checked/b6_callerunsafeproto.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b7_allsafeproto.c b/clang/test/3C/b7_allsafeproto.c index ea46da5ac6c2..200d9e518878 100644 --- a/clang/test/3C/b7_allsafeproto.c +++ b/clang/test/3C/b7_allsafeproto.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b7_allsafeproto.checked.c -- | count 0 -// RUN: rm %S/b7_allsafeproto.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b7_allsafeproto.c -- | diff %t.checked/b7_allsafeproto.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b8_allsafestructnp.c b/clang/test/3C/b8_allsafestructnp.c index 10976aac8b38..e118031c2289 100644 --- a/clang/test/3C/b8_allsafestructnp.c +++ b/clang/test/3C/b8_allsafestructnp.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b8_allsafestructnp.checked.c -- | count 0 -// RUN: rm %S/b8_allsafestructnp.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b8_allsafestructnp.c -- | diff %t.checked/b8_allsafestructnp.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b9_allsafestructp.c b/clang/test/3C/b9_allsafestructp.c index 5e6a13a87df7..bacd65847a6e 100644 --- a/clang/test/3C/b9_allsafestructp.c +++ b/clang/test/3C/b9_allsafestructp.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b9_allsafestructp.checked.c -- | count 0 -// RUN: rm %S/b9_allsafestructp.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b9_allsafestructp.c -- | diff %t.checked/b9_allsafestructp.c - #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/calloc.c b/clang/test/3C/calloc.c index 3811879ac44f..e3c5df5a87c1 100644 --- a/clang/test/3C/calloc.c +++ b/clang/test/3C/calloc.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/calloc.checked.c -- | count 0 -// RUN: rm %S/calloc.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/calloc.c -- | diff %t.checked/calloc.c - #include diff --git a/clang/test/3C/canonical_type_cast.c b/clang/test/3C/canonical_type_cast.c index 12c0c5085995..c0dfcb89fdee 100644 --- a/clang/test/3C/canonical_type_cast.c +++ b/clang/test/3C/canonical_type_cast.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/canonical_type_cast.checked.c -- | count 0 -// RUN: rm %S/canonical_type_cast.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/canonical_type_cast.c -- | diff %t.checked/canonical_type_cast.c - /* Examples from issue #58 */ diff --git a/clang/test/3C/cast.c b/clang/test/3C/cast.c index 6346e1779c31..0a4ea6a6fc13 100644 --- a/clang/test/3C/cast.c +++ b/clang/test/3C/cast.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/cast.checked.c -- | count 0 -// RUN: rm %S/cast.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/cast.c -- | diff %t.checked/cast.c - int foo(int* p) { //CHECK: int foo(_Ptr p) { diff --git a/clang/test/3C/checkedregions.c b/clang/test/3C/checkedregions.c index 72b041e7f1cb..9a985e5afe0e 100644 --- a/clang/test/3C/checkedregions.c +++ b/clang/test/3C/checkedregions.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/checkedregions.checked.c -- | count 0 -// RUN: rm %S/checkedregions.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/checkedregions.c -- | diff %t.checked/checkedregions.c - /* Tests for adding (un)checked regions automatically */ #include diff --git a/clang/test/3C/compound_literal.c b/clang/test/3C/compound_literal.c index 6fa0a97cb293..86256021402f 100644 --- a/clang/test/3C/compound_literal.c +++ b/clang/test/3C/compound_literal.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/compound_literal.checked.c -- | count 0 -// RUN: rm %S/compound_literal.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/compound_literal.c -- | diff %t.checked/compound_literal.c - struct a { int *a; diff --git a/clang/test/3C/ex1.c b/clang/test/3C/ex1.c index 475544a94777..90f720e2a8df 100644 --- a/clang/test/3C/ex1.c +++ b/clang/test/3C/ex1.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/ex1.checked.c -- | count 0 -// RUN: rm %S/ex1.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ex1.c -- | diff %t.checked/ex1.c - void foo() { int m = 2; diff --git a/clang/test/3C/extGVar.c b/clang/test/3C/extGVar.c index cf5f2101cc75..2e60bc9f50be 100644 --- a/clang/test/3C/extGVar.c +++ b/clang/test/3C/extGVar.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/extGVar.checked.c -- | count 0 -// RUN: rm %S/extGVar.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/extGVar.c -- | diff %t.checked/extGVar.c - /*what we're interested in*/ extern int *x; diff --git a/clang/test/3C/extstructfields.c b/clang/test/3C/extstructfields.c index 48f6be538ee6..9c293f272197 100644 --- a/clang/test/3C/extstructfields.c +++ b/clang/test/3C/extstructfields.c @@ -3,12 +3,13 @@ // reasonable way to write an analogous test that works on Windows. // UNSUPPORTED: system-windows -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/extstructfields.checked.c -- | count 0 -// RUN: rm %S/extstructfields.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/extstructfields.c -- | diff %t.checked/extstructfields.c - + #include diff --git a/clang/test/3C/fn_sets.c b/clang/test/3C/fn_sets.c index 2d2519339071..89d3c7e02aed 100644 --- a/clang/test/3C/fn_sets.c +++ b/clang/test/3C/fn_sets.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/fn_sets.checked.c -- | count 0 -// RUN: rm %S/fn_sets.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fn_sets.c -- | diff %t.checked/fn_sets.c - /* Tests relating to issue #86 Handling sets of functions */ /* In the first test case, y WILD due to the (int*)5 assignment. This diff --git a/clang/test/3C/fp.c b/clang/test/3C/fp.c index 42fa08087817..d7fc7cd2d554 100644 --- a/clang/test/3C/fp.c +++ b/clang/test/3C/fp.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/fp.checked.c -- | count 0 -// RUN: rm %S/fp.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fp.c -- | diff %t.checked/fp.c - int f(int *p); diff --git a/clang/test/3C/fp_arith.c b/clang/test/3C/fp_arith.c index b6ce9e06da3f..b0f7990b1aa2 100644 --- a/clang/test/3C/fp_arith.c +++ b/clang/test/3C/fp_arith.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/fp_arith.checked.c -- | count 0 -// RUN: rm %S/fp_arith.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fp_arith.c -- | diff %t.checked/fp_arith.c - /* Tests for the error outlined in issue 74. Pointer arithmetic on function pointers with -alltypes active causes the pointers be ARR pointers, but diff --git a/clang/test/3C/fptrarrboth.c b/clang/test/3C/fptrarrboth.c index e05bd1e33f4e..dca0b9f2d5bd 100644 --- a/clang/test/3C/fptrarrboth.c +++ b/clang/test/3C/fptrarrboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrboth.c -- | diff %t.checked/fptrarrboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrbothmulti1.c b/clang/test/3C/fptrarrbothmulti1.c index 6400eeceb26f..abf2ab9d6f1d 100644 --- a/clang/test/3C/fptrarrbothmulti1.c +++ b/clang/test/3C/fptrarrbothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrbothmulti2.c -// RUN: %clang -c %S/fptrarrbothmulti1.checkedNOALL.c %S/fptrarrbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrbothmulti1.checked.c %S/fptrarrbothmulti2.checked.c -// RUN: test ! -f %S/fptrarrbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrbothmulti2.checked.convert_again.c -// RUN: rm %S/fptrarrbothmulti1.checkedALL.c %S/fptrarrbothmulti2.checkedALL.c -// RUN: rm %S/fptrarrbothmulti1.checkedNOALL.c %S/fptrarrbothmulti2.checkedNOALL.c -// RUN: rm %S/fptrarrbothmulti1.checked.c %S/fptrarrbothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrbothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrbothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrbothmulti1.c fptrarrbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrbothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrbothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrbothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrbothmulti1.c %t.checked/fptrarrbothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrbothmulti1.c +// RUN: test ! -f %t.convert_again/fptrarrbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrbothmulti2.c b/clang/test/3C/fptrarrbothmulti2.c index 824b06d3f0a2..b28f7178e974 100644 --- a/clang/test/3C/fptrarrbothmulti2.c +++ b/clang/test/3C/fptrarrbothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrbothmulti1.c %s -// RUN: %clang -c %S/fptrarrbothmulti1.checkedNOALL2.c %S/fptrarrbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrbothmulti1.checked2.c %S/fptrarrbothmulti2.checked2.c -// RUN: test ! -f %S/fptrarrbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrbothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrbothmulti1.checkedALL2.c %S/fptrarrbothmulti2.checkedALL2.c -// RUN: rm %S/fptrarrbothmulti1.checkedNOALL2.c %S/fptrarrbothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrbothmulti1.checked2.c %S/fptrarrbothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrbothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrbothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrbothmulti1.c fptrarrbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrbothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrbothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrbothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrbothmulti1.c %t.checked/fptrarrbothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrbothmulti1.c +// RUN: test ! -f %t.convert_again/fptrarrbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcallee.c b/clang/test/3C/fptrarrcallee.c index 573926cfbe8f..495d8cd8fc5c 100644 --- a/clang/test/3C/fptrarrcallee.c +++ b/clang/test/3C/fptrarrcallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrcallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrcallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrcallee.c -- | diff %t.checked/fptrarrcallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcalleemulti1.c b/clang/test/3C/fptrarrcalleemulti1.c index e23c1d9ff4c8..aa6278bca65f 100644 --- a/clang/test/3C/fptrarrcalleemulti1.c +++ b/clang/test/3C/fptrarrcalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrcalleemulti2.c -// RUN: %clang -c %S/fptrarrcalleemulti1.checkedNOALL.c %S/fptrarrcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrcalleemulti1.checked.c %S/fptrarrcalleemulti2.checked.c -// RUN: test ! -f %S/fptrarrcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrcalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrcalleemulti1.checkedALL.c %S/fptrarrcalleemulti2.checkedALL.c -// RUN: rm %S/fptrarrcalleemulti1.checkedNOALL.c %S/fptrarrcalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrcalleemulti1.checked.c %S/fptrarrcalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrcalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrcalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrcalleemulti1.c fptrarrcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrcalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrcalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrcalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrcalleemulti1.c %t.checked/fptrarrcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrcalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcalleemulti2.c b/clang/test/3C/fptrarrcalleemulti2.c index b2458c79da96..654f51a8f3ca 100644 --- a/clang/test/3C/fptrarrcalleemulti2.c +++ b/clang/test/3C/fptrarrcalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrcalleemulti1.c %s -// RUN: %clang -c %S/fptrarrcalleemulti1.checkedNOALL2.c %S/fptrarrcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrcalleemulti1.checked2.c %S/fptrarrcalleemulti2.checked2.c -// RUN: test ! -f %S/fptrarrcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrcalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrcalleemulti1.checkedALL2.c %S/fptrarrcalleemulti2.checkedALL2.c -// RUN: rm %S/fptrarrcalleemulti1.checkedNOALL2.c %S/fptrarrcalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrcalleemulti1.checked2.c %S/fptrarrcalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrcalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrcalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrcalleemulti1.c fptrarrcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrcalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrcalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrcalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrcalleemulti1.c %t.checked/fptrarrcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrcalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcaller.c b/clang/test/3C/fptrarrcaller.c index 57f8e95a8342..13dc079d3853 100644 --- a/clang/test/3C/fptrarrcaller.c +++ b/clang/test/3C/fptrarrcaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrcaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrcaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrcaller.c -- | diff %t.checked/fptrarrcaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcallermulti1.c b/clang/test/3C/fptrarrcallermulti1.c index 340590a48b96..35cd15b5610d 100644 --- a/clang/test/3C/fptrarrcallermulti1.c +++ b/clang/test/3C/fptrarrcallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrcallermulti2.c -// RUN: %clang -c %S/fptrarrcallermulti1.checkedNOALL.c %S/fptrarrcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrcallermulti1.checked.c %S/fptrarrcallermulti2.checked.c -// RUN: test ! -f %S/fptrarrcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrcallermulti2.checked.convert_again.c -// RUN: rm %S/fptrarrcallermulti1.checkedALL.c %S/fptrarrcallermulti2.checkedALL.c -// RUN: rm %S/fptrarrcallermulti1.checkedNOALL.c %S/fptrarrcallermulti2.checkedNOALL.c -// RUN: rm %S/fptrarrcallermulti1.checked.c %S/fptrarrcallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrcallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrcallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrcallermulti1.c fptrarrcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrcallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrcallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrcallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrcallermulti1.c %t.checked/fptrarrcallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrcallermulti1.c +// RUN: test ! -f %t.convert_again/fptrarrcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcallermulti2.c b/clang/test/3C/fptrarrcallermulti2.c index ca0c214ba8c9..980973ab4e3a 100644 --- a/clang/test/3C/fptrarrcallermulti2.c +++ b/clang/test/3C/fptrarrcallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrcallermulti1.c %s -// RUN: %clang -c %S/fptrarrcallermulti1.checkedNOALL2.c %S/fptrarrcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrcallermulti1.checked2.c %S/fptrarrcallermulti2.checked2.c -// RUN: test ! -f %S/fptrarrcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrcallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrcallermulti1.checkedALL2.c %S/fptrarrcallermulti2.checkedALL2.c -// RUN: rm %S/fptrarrcallermulti1.checkedNOALL2.c %S/fptrarrcallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrcallermulti1.checked2.c %S/fptrarrcallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrcallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrcallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrcallermulti1.c fptrarrcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrcallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrcallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrcallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrcallermulti1.c %t.checked/fptrarrcallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrcallermulti1.c +// RUN: test ! -f %t.convert_again/fptrarrcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructboth.c b/clang/test/3C/fptrarrinstructboth.c index 2bd61e7e15da..d930a8540eda 100644 --- a/clang/test/3C/fptrarrinstructboth.c +++ b/clang/test/3C/fptrarrinstructboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrinstructboth.c -- | diff %t.checked/fptrarrinstructboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructbothmulti1.c b/clang/test/3C/fptrarrinstructbothmulti1.c index b83e01bbf2b4..2d733c017ff4 100644 --- a/clang/test/3C/fptrarrinstructbothmulti1.c +++ b/clang/test/3C/fptrarrinstructbothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrinstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrinstructbothmulti2.c -// RUN: %clang -c %S/fptrarrinstructbothmulti1.checkedNOALL.c %S/fptrarrinstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrinstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructbothmulti1.checked.c %S/fptrarrinstructbothmulti2.checked.c -// RUN: test ! -f %S/fptrarrinstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrinstructbothmulti2.checked.convert_again.c -// RUN: rm %S/fptrarrinstructbothmulti1.checkedALL.c %S/fptrarrinstructbothmulti2.checkedALL.c -// RUN: rm %S/fptrarrinstructbothmulti1.checkedNOALL.c %S/fptrarrinstructbothmulti2.checkedNOALL.c -// RUN: rm %S/fptrarrinstructbothmulti1.checked.c %S/fptrarrinstructbothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrinstructbothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrinstructbothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrinstructbothmulti1.c fptrarrinstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrinstructbothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrinstructbothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrinstructbothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrinstructbothmulti1.c %t.checked/fptrarrinstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrinstructbothmulti1.c +// RUN: test ! -f %t.convert_again/fptrarrinstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructbothmulti2.c b/clang/test/3C/fptrarrinstructbothmulti2.c index 5a0cc7e0450d..bd13aff00407 100644 --- a/clang/test/3C/fptrarrinstructbothmulti2.c +++ b/clang/test/3C/fptrarrinstructbothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrinstructbothmulti1.c %s -// RUN: %clang -c %S/fptrarrinstructbothmulti1.checkedNOALL2.c %S/fptrarrinstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructbothmulti1.checked2.c %S/fptrarrinstructbothmulti2.checked2.c -// RUN: test ! -f %S/fptrarrinstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrinstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrinstructbothmulti1.checkedALL2.c %S/fptrarrinstructbothmulti2.checkedALL2.c -// RUN: rm %S/fptrarrinstructbothmulti1.checkedNOALL2.c %S/fptrarrinstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrinstructbothmulti1.checked2.c %S/fptrarrinstructbothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrinstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrinstructbothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrinstructbothmulti1.c fptrarrinstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrinstructbothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrinstructbothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrinstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrinstructbothmulti1.c %t.checked/fptrarrinstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrinstructbothmulti1.c +// RUN: test ! -f %t.convert_again/fptrarrinstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcallee.c b/clang/test/3C/fptrarrinstructcallee.c index 56a4c9a061a2..991470ec6399 100644 --- a/clang/test/3C/fptrarrinstructcallee.c +++ b/clang/test/3C/fptrarrinstructcallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructcallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructcallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrinstructcallee.c -- | diff %t.checked/fptrarrinstructcallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcalleemulti1.c b/clang/test/3C/fptrarrinstructcalleemulti1.c index 898c05aaef55..edee88877671 100644 --- a/clang/test/3C/fptrarrinstructcalleemulti1.c +++ b/clang/test/3C/fptrarrinstructcalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrinstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrinstructcalleemulti2.c -// RUN: %clang -c %S/fptrarrinstructcalleemulti1.checkedNOALL.c %S/fptrarrinstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrinstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructcalleemulti1.checked.c %S/fptrarrinstructcalleemulti2.checked.c -// RUN: test ! -f %S/fptrarrinstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrinstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checkedALL.c %S/fptrarrinstructcalleemulti2.checkedALL.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checkedNOALL.c %S/fptrarrinstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checked.c %S/fptrarrinstructcalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrinstructcalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrinstructcalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrinstructcalleemulti1.c fptrarrinstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrinstructcalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrinstructcalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrinstructcalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrinstructcalleemulti1.c %t.checked/fptrarrinstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrinstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrinstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcalleemulti2.c b/clang/test/3C/fptrarrinstructcalleemulti2.c index e78e6c1b1d7f..b785761ddfb7 100644 --- a/clang/test/3C/fptrarrinstructcalleemulti2.c +++ b/clang/test/3C/fptrarrinstructcalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrinstructcalleemulti1.c %s -// RUN: %clang -c %S/fptrarrinstructcalleemulti1.checkedNOALL2.c %S/fptrarrinstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructcalleemulti1.checked2.c %S/fptrarrinstructcalleemulti2.checked2.c -// RUN: test ! -f %S/fptrarrinstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrinstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checkedALL2.c %S/fptrarrinstructcalleemulti2.checkedALL2.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checkedNOALL2.c %S/fptrarrinstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checked2.c %S/fptrarrinstructcalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrinstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrinstructcalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrinstructcalleemulti1.c fptrarrinstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrinstructcalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrinstructcalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrinstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrinstructcalleemulti1.c %t.checked/fptrarrinstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrinstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrinstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcaller.c b/clang/test/3C/fptrarrinstructcaller.c index 628a0c4eef3d..f8f98324a8c0 100644 --- a/clang/test/3C/fptrarrinstructcaller.c +++ b/clang/test/3C/fptrarrinstructcaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructcaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructcaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrinstructcaller.c -- | diff %t.checked/fptrarrinstructcaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcallermulti1.c b/clang/test/3C/fptrarrinstructcallermulti1.c index 3cbe84f6a062..b4f861b30e54 100644 --- a/clang/test/3C/fptrarrinstructcallermulti1.c +++ b/clang/test/3C/fptrarrinstructcallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrinstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrinstructcallermulti2.c -// RUN: %clang -c %S/fptrarrinstructcallermulti1.checkedNOALL.c %S/fptrarrinstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrinstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructcallermulti1.checked.c %S/fptrarrinstructcallermulti2.checked.c -// RUN: test ! -f %S/fptrarrinstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrinstructcallermulti2.checked.convert_again.c -// RUN: rm %S/fptrarrinstructcallermulti1.checkedALL.c %S/fptrarrinstructcallermulti2.checkedALL.c -// RUN: rm %S/fptrarrinstructcallermulti1.checkedNOALL.c %S/fptrarrinstructcallermulti2.checkedNOALL.c -// RUN: rm %S/fptrarrinstructcallermulti1.checked.c %S/fptrarrinstructcallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrinstructcallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrinstructcallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrinstructcallermulti1.c fptrarrinstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrinstructcallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrinstructcallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrinstructcallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrinstructcallermulti1.c %t.checked/fptrarrinstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrinstructcallermulti1.c +// RUN: test ! -f %t.convert_again/fptrarrinstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcallermulti2.c b/clang/test/3C/fptrarrinstructcallermulti2.c index 69180923f4c4..0dcc5a4d95c6 100644 --- a/clang/test/3C/fptrarrinstructcallermulti2.c +++ b/clang/test/3C/fptrarrinstructcallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrinstructcallermulti1.c %s -// RUN: %clang -c %S/fptrarrinstructcallermulti1.checkedNOALL2.c %S/fptrarrinstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructcallermulti1.checked2.c %S/fptrarrinstructcallermulti2.checked2.c -// RUN: test ! -f %S/fptrarrinstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrinstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrinstructcallermulti1.checkedALL2.c %S/fptrarrinstructcallermulti2.checkedALL2.c -// RUN: rm %S/fptrarrinstructcallermulti1.checkedNOALL2.c %S/fptrarrinstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrinstructcallermulti1.checked2.c %S/fptrarrinstructcallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrinstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrinstructcallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrinstructcallermulti1.c fptrarrinstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrinstructcallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrinstructcallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrinstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrinstructcallermulti1.c %t.checked/fptrarrinstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrinstructcallermulti1.c +// RUN: test ! -f %t.convert_again/fptrarrinstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructprotoboth.c b/clang/test/3C/fptrarrinstructprotoboth.c index 6d18256e6459..9ea3f8e523cb 100644 --- a/clang/test/3C/fptrarrinstructprotoboth.c +++ b/clang/test/3C/fptrarrinstructprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrinstructprotoboth.c -- | diff %t.checked/fptrarrinstructprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructprotocallee.c b/clang/test/3C/fptrarrinstructprotocallee.c index a03215190cf1..0a3cc331d586 100644 --- a/clang/test/3C/fptrarrinstructprotocallee.c +++ b/clang/test/3C/fptrarrinstructprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrinstructprotocallee.c -- | diff %t.checked/fptrarrinstructprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructprotocaller.c b/clang/test/3C/fptrarrinstructprotocaller.c index dec51e86f562..29074dd29a79 100644 --- a/clang/test/3C/fptrarrinstructprotocaller.c +++ b/clang/test/3C/fptrarrinstructprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrinstructprotocaller.c -- | diff %t.checked/fptrarrinstructprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructprotosafe.c b/clang/test/3C/fptrarrinstructprotosafe.c index 7f0c1383c1c0..8ce0a4481d39 100644 --- a/clang/test/3C/fptrarrinstructprotosafe.c +++ b/clang/test/3C/fptrarrinstructprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrinstructprotosafe.c -- | diff %t.checked/fptrarrinstructprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructsafe.c b/clang/test/3C/fptrarrinstructsafe.c index 93732fc3e79a..cf8df8240bd2 100644 --- a/clang/test/3C/fptrarrinstructsafe.c +++ b/clang/test/3C/fptrarrinstructsafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructsafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructsafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrinstructsafe.c -- | diff %t.checked/fptrarrinstructsafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructsafemulti1.c b/clang/test/3C/fptrarrinstructsafemulti1.c index 8cf70b2d8af0..11bae579b404 100644 --- a/clang/test/3C/fptrarrinstructsafemulti1.c +++ b/clang/test/3C/fptrarrinstructsafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrinstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrinstructsafemulti2.c -// RUN: %clang -c %S/fptrarrinstructsafemulti1.checkedNOALL.c %S/fptrarrinstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrinstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructsafemulti1.checked.c %S/fptrarrinstructsafemulti2.checked.c -// RUN: test ! -f %S/fptrarrinstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrinstructsafemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrinstructsafemulti1.checkedALL.c %S/fptrarrinstructsafemulti2.checkedALL.c -// RUN: rm %S/fptrarrinstructsafemulti1.checkedNOALL.c %S/fptrarrinstructsafemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrinstructsafemulti1.checked.c %S/fptrarrinstructsafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrinstructsafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrinstructsafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrinstructsafemulti1.c fptrarrinstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrinstructsafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrinstructsafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrinstructsafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrinstructsafemulti1.c %t.checked/fptrarrinstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrinstructsafemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrinstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructsafemulti2.c b/clang/test/3C/fptrarrinstructsafemulti2.c index 7bb684cb1a89..69bfbac64f5b 100644 --- a/clang/test/3C/fptrarrinstructsafemulti2.c +++ b/clang/test/3C/fptrarrinstructsafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrinstructsafemulti1.c %s -// RUN: %clang -c %S/fptrarrinstructsafemulti1.checkedNOALL2.c %S/fptrarrinstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructsafemulti1.checked2.c %S/fptrarrinstructsafemulti2.checked2.c -// RUN: test ! -f %S/fptrarrinstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrinstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrinstructsafemulti1.checkedALL2.c %S/fptrarrinstructsafemulti2.checkedALL2.c -// RUN: rm %S/fptrarrinstructsafemulti1.checkedNOALL2.c %S/fptrarrinstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrinstructsafemulti1.checked2.c %S/fptrarrinstructsafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrinstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrinstructsafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrinstructsafemulti1.c fptrarrinstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrinstructsafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrinstructsafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrinstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrinstructsafemulti1.c %t.checked/fptrarrinstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrinstructsafemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrinstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrprotoboth.c b/clang/test/3C/fptrarrprotoboth.c index 56bc4aaec8ef..b667cd54b25d 100644 --- a/clang/test/3C/fptrarrprotoboth.c +++ b/clang/test/3C/fptrarrprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrprotoboth.c -- | diff %t.checked/fptrarrprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrprotocallee.c b/clang/test/3C/fptrarrprotocallee.c index 30af420789d9..773a339247e6 100644 --- a/clang/test/3C/fptrarrprotocallee.c +++ b/clang/test/3C/fptrarrprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrprotocallee.c -- | diff %t.checked/fptrarrprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrprotocaller.c b/clang/test/3C/fptrarrprotocaller.c index 2d704849ff82..c5e96fc76e84 100644 --- a/clang/test/3C/fptrarrprotocaller.c +++ b/clang/test/3C/fptrarrprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrprotocaller.c -- | diff %t.checked/fptrarrprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrprotosafe.c b/clang/test/3C/fptrarrprotosafe.c index e2001ac100c8..0829b21eaae1 100644 --- a/clang/test/3C/fptrarrprotosafe.c +++ b/clang/test/3C/fptrarrprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrprotosafe.c -- | diff %t.checked/fptrarrprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrsafe.c b/clang/test/3C/fptrarrsafe.c index fffacc5f99f8..9e91164bf579 100644 --- a/clang/test/3C/fptrarrsafe.c +++ b/clang/test/3C/fptrarrsafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrsafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrsafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrsafe.c -- | diff %t.checked/fptrarrsafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrsafemulti1.c b/clang/test/3C/fptrarrsafemulti1.c index 4ac21062fd6c..b9de4fb05f21 100644 --- a/clang/test/3C/fptrarrsafemulti1.c +++ b/clang/test/3C/fptrarrsafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrsafemulti2.c -// RUN: %clang -c %S/fptrarrsafemulti1.checkedNOALL.c %S/fptrarrsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrsafemulti1.checked.c %S/fptrarrsafemulti2.checked.c -// RUN: test ! -f %S/fptrarrsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrsafemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrsafemulti1.checkedALL.c %S/fptrarrsafemulti2.checkedALL.c -// RUN: rm %S/fptrarrsafemulti1.checkedNOALL.c %S/fptrarrsafemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrsafemulti1.checked.c %S/fptrarrsafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrsafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrsafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrsafemulti1.c fptrarrsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrsafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrsafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrsafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrsafemulti1.c %t.checked/fptrarrsafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrsafemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrsafemulti2.c b/clang/test/3C/fptrarrsafemulti2.c index 3f8a63d45581..307ed0c73f42 100644 --- a/clang/test/3C/fptrarrsafemulti2.c +++ b/clang/test/3C/fptrarrsafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrsafemulti1.c %s -// RUN: %clang -c %S/fptrarrsafemulti1.checkedNOALL2.c %S/fptrarrsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrsafemulti1.checked2.c %S/fptrarrsafemulti2.checked2.c -// RUN: test ! -f %S/fptrarrsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrsafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrsafemulti1.checkedALL2.c %S/fptrarrsafemulti2.checkedALL2.c -// RUN: rm %S/fptrarrsafemulti1.checkedNOALL2.c %S/fptrarrsafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrsafemulti1.checked2.c %S/fptrarrsafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrsafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrsafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrsafemulti1.c fptrarrsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrsafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrsafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrsafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrsafemulti1.c %t.checked/fptrarrsafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrsafemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructboth.c b/clang/test/3C/fptrarrstructboth.c index a665888b30cd..955aab6e040e 100644 --- a/clang/test/3C/fptrarrstructboth.c +++ b/clang/test/3C/fptrarrstructboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrstructboth.c -- | diff %t.checked/fptrarrstructboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructbothmulti1.c b/clang/test/3C/fptrarrstructbothmulti1.c index cba913dc481e..b80e862749d2 100644 --- a/clang/test/3C/fptrarrstructbothmulti1.c +++ b/clang/test/3C/fptrarrstructbothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrstructbothmulti2.c -// RUN: %clang -c %S/fptrarrstructbothmulti1.checkedNOALL.c %S/fptrarrstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructbothmulti1.checked.c %S/fptrarrstructbothmulti2.checked.c -// RUN: test ! -f %S/fptrarrstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrstructbothmulti2.checked.convert_again.c -// RUN: rm %S/fptrarrstructbothmulti1.checkedALL.c %S/fptrarrstructbothmulti2.checkedALL.c -// RUN: rm %S/fptrarrstructbothmulti1.checkedNOALL.c %S/fptrarrstructbothmulti2.checkedNOALL.c -// RUN: rm %S/fptrarrstructbothmulti1.checked.c %S/fptrarrstructbothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrstructbothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrstructbothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrstructbothmulti1.c fptrarrstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrstructbothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrstructbothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrstructbothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrstructbothmulti1.c %t.checked/fptrarrstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrstructbothmulti1.c +// RUN: test ! -f %t.convert_again/fptrarrstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructbothmulti2.c b/clang/test/3C/fptrarrstructbothmulti2.c index 0c00010b3903..f92e9d89d284 100644 --- a/clang/test/3C/fptrarrstructbothmulti2.c +++ b/clang/test/3C/fptrarrstructbothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrstructbothmulti1.c %s -// RUN: %clang -c %S/fptrarrstructbothmulti1.checkedNOALL2.c %S/fptrarrstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructbothmulti1.checked2.c %S/fptrarrstructbothmulti2.checked2.c -// RUN: test ! -f %S/fptrarrstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrstructbothmulti1.checkedALL2.c %S/fptrarrstructbothmulti2.checkedALL2.c -// RUN: rm %S/fptrarrstructbothmulti1.checkedNOALL2.c %S/fptrarrstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrstructbothmulti1.checked2.c %S/fptrarrstructbothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrstructbothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrstructbothmulti1.c fptrarrstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrstructbothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrstructbothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrstructbothmulti1.c %t.checked/fptrarrstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrstructbothmulti1.c +// RUN: test ! -f %t.convert_again/fptrarrstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcallee.c b/clang/test/3C/fptrarrstructcallee.c index 36fe08cf8302..dee3cdffd1af 100644 --- a/clang/test/3C/fptrarrstructcallee.c +++ b/clang/test/3C/fptrarrstructcallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructcallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructcallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrstructcallee.c -- | diff %t.checked/fptrarrstructcallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcalleemulti1.c b/clang/test/3C/fptrarrstructcalleemulti1.c index c86d43b32fef..04116c5a323d 100644 --- a/clang/test/3C/fptrarrstructcalleemulti1.c +++ b/clang/test/3C/fptrarrstructcalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrstructcalleemulti2.c -// RUN: %clang -c %S/fptrarrstructcalleemulti1.checkedNOALL.c %S/fptrarrstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructcalleemulti1.checked.c %S/fptrarrstructcalleemulti2.checked.c -// RUN: test ! -f %S/fptrarrstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrstructcalleemulti1.checkedALL.c %S/fptrarrstructcalleemulti2.checkedALL.c -// RUN: rm %S/fptrarrstructcalleemulti1.checkedNOALL.c %S/fptrarrstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrstructcalleemulti1.checked.c %S/fptrarrstructcalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrstructcalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrstructcalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrstructcalleemulti1.c fptrarrstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrstructcalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrstructcalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrstructcalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrstructcalleemulti1.c %t.checked/fptrarrstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcalleemulti2.c b/clang/test/3C/fptrarrstructcalleemulti2.c index 3e6b6556b13d..184878a1c322 100644 --- a/clang/test/3C/fptrarrstructcalleemulti2.c +++ b/clang/test/3C/fptrarrstructcalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrstructcalleemulti1.c %s -// RUN: %clang -c %S/fptrarrstructcalleemulti1.checkedNOALL2.c %S/fptrarrstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructcalleemulti1.checked2.c %S/fptrarrstructcalleemulti2.checked2.c -// RUN: test ! -f %S/fptrarrstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrstructcalleemulti1.checkedALL2.c %S/fptrarrstructcalleemulti2.checkedALL2.c -// RUN: rm %S/fptrarrstructcalleemulti1.checkedNOALL2.c %S/fptrarrstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrstructcalleemulti1.checked2.c %S/fptrarrstructcalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrstructcalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrstructcalleemulti1.c fptrarrstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrstructcalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrstructcalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrstructcalleemulti1.c %t.checked/fptrarrstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcaller.c b/clang/test/3C/fptrarrstructcaller.c index 82b2f46b45b7..3d47b0c61ad8 100644 --- a/clang/test/3C/fptrarrstructcaller.c +++ b/clang/test/3C/fptrarrstructcaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructcaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructcaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrstructcaller.c -- | diff %t.checked/fptrarrstructcaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcallermulti1.c b/clang/test/3C/fptrarrstructcallermulti1.c index 913eae91e89f..0b24d5d8909a 100644 --- a/clang/test/3C/fptrarrstructcallermulti1.c +++ b/clang/test/3C/fptrarrstructcallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrstructcallermulti2.c -// RUN: %clang -c %S/fptrarrstructcallermulti1.checkedNOALL.c %S/fptrarrstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructcallermulti1.checked.c %S/fptrarrstructcallermulti2.checked.c -// RUN: test ! -f %S/fptrarrstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrstructcallermulti2.checked.convert_again.c -// RUN: rm %S/fptrarrstructcallermulti1.checkedALL.c %S/fptrarrstructcallermulti2.checkedALL.c -// RUN: rm %S/fptrarrstructcallermulti1.checkedNOALL.c %S/fptrarrstructcallermulti2.checkedNOALL.c -// RUN: rm %S/fptrarrstructcallermulti1.checked.c %S/fptrarrstructcallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrstructcallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrstructcallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrstructcallermulti1.c fptrarrstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrstructcallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrstructcallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrstructcallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrstructcallermulti1.c %t.checked/fptrarrstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrstructcallermulti1.c +// RUN: test ! -f %t.convert_again/fptrarrstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcallermulti2.c b/clang/test/3C/fptrarrstructcallermulti2.c index 97ee5fc9cf48..035e138325c8 100644 --- a/clang/test/3C/fptrarrstructcallermulti2.c +++ b/clang/test/3C/fptrarrstructcallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrstructcallermulti1.c %s -// RUN: %clang -c %S/fptrarrstructcallermulti1.checkedNOALL2.c %S/fptrarrstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructcallermulti1.checked2.c %S/fptrarrstructcallermulti2.checked2.c -// RUN: test ! -f %S/fptrarrstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrstructcallermulti1.checkedALL2.c %S/fptrarrstructcallermulti2.checkedALL2.c -// RUN: rm %S/fptrarrstructcallermulti1.checkedNOALL2.c %S/fptrarrstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrstructcallermulti1.checked2.c %S/fptrarrstructcallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrstructcallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrstructcallermulti1.c fptrarrstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrstructcallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrstructcallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrstructcallermulti1.c %t.checked/fptrarrstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrstructcallermulti1.c +// RUN: test ! -f %t.convert_again/fptrarrstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructprotoboth.c b/clang/test/3C/fptrarrstructprotoboth.c index 0b96e8fbe9f7..c9f99011e2b7 100644 --- a/clang/test/3C/fptrarrstructprotoboth.c +++ b/clang/test/3C/fptrarrstructprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrstructprotoboth.c -- | diff %t.checked/fptrarrstructprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructprotocallee.c b/clang/test/3C/fptrarrstructprotocallee.c index 91793ea1ac35..40077cb47c5e 100644 --- a/clang/test/3C/fptrarrstructprotocallee.c +++ b/clang/test/3C/fptrarrstructprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrstructprotocallee.c -- | diff %t.checked/fptrarrstructprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructprotocaller.c b/clang/test/3C/fptrarrstructprotocaller.c index 75fc8e48da5b..68bb4ea9f3b9 100644 --- a/clang/test/3C/fptrarrstructprotocaller.c +++ b/clang/test/3C/fptrarrstructprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrstructprotocaller.c -- | diff %t.checked/fptrarrstructprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructprotosafe.c b/clang/test/3C/fptrarrstructprotosafe.c index 3d87c4bfca3b..5543cbfcca72 100644 --- a/clang/test/3C/fptrarrstructprotosafe.c +++ b/clang/test/3C/fptrarrstructprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrstructprotosafe.c -- | diff %t.checked/fptrarrstructprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructsafe.c b/clang/test/3C/fptrarrstructsafe.c index 36b743309416..194149270a4a 100644 --- a/clang/test/3C/fptrarrstructsafe.c +++ b/clang/test/3C/fptrarrstructsafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructsafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructsafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrarrstructsafe.c -- | diff %t.checked/fptrarrstructsafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructsafemulti1.c b/clang/test/3C/fptrarrstructsafemulti1.c index a931294669f3..124a11430124 100644 --- a/clang/test/3C/fptrarrstructsafemulti1.c +++ b/clang/test/3C/fptrarrstructsafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrstructsafemulti2.c -// RUN: %clang -c %S/fptrarrstructsafemulti1.checkedNOALL.c %S/fptrarrstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructsafemulti1.checked.c %S/fptrarrstructsafemulti2.checked.c -// RUN: test ! -f %S/fptrarrstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrstructsafemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrstructsafemulti1.checkedALL.c %S/fptrarrstructsafemulti2.checkedALL.c -// RUN: rm %S/fptrarrstructsafemulti1.checkedNOALL.c %S/fptrarrstructsafemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrstructsafemulti1.checked.c %S/fptrarrstructsafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrarrstructsafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrarrstructsafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrarrstructsafemulti1.c fptrarrstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrarrstructsafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrarrstructsafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrstructsafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrstructsafemulti1.c %t.checked/fptrarrstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrstructsafemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructsafemulti2.c b/clang/test/3C/fptrarrstructsafemulti2.c index 4da80e114872..96e3e1d0716e 100644 --- a/clang/test/3C/fptrarrstructsafemulti2.c +++ b/clang/test/3C/fptrarrstructsafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrstructsafemulti1.c %s -// RUN: %clang -c %S/fptrarrstructsafemulti1.checkedNOALL2.c %S/fptrarrstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructsafemulti1.checked2.c %S/fptrarrstructsafemulti2.checked2.c -// RUN: test ! -f %S/fptrarrstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrstructsafemulti1.checkedALL2.c %S/fptrarrstructsafemulti2.checkedALL2.c -// RUN: rm %S/fptrarrstructsafemulti1.checkedNOALL2.c %S/fptrarrstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrstructsafemulti1.checked2.c %S/fptrarrstructsafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrarrstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrarrstructsafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrarrstructsafemulti1.c fptrarrstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrarrstructsafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrarrstructsafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrarrstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrarrstructsafemulti1.c %t.checked/fptrarrstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrarrstructsafemulti1.c +// RUN: test ! -f %t.convert_again/fptrarrstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructboth.c b/clang/test/3C/fptrinstructboth.c index 4ac3446fa99b..fdd613b723dd 100644 --- a/clang/test/3C/fptrinstructboth.c +++ b/clang/test/3C/fptrinstructboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructboth.checked.c -- | count 0 -// RUN: rm %S/fptrinstructboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrinstructboth.c -- | diff %t.checked/fptrinstructboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructbothmulti1.c b/clang/test/3C/fptrinstructbothmulti1.c index db46419b9da3..e0aff9eceaa4 100644 --- a/clang/test/3C/fptrinstructbothmulti1.c +++ b/clang/test/3C/fptrinstructbothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrinstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrinstructbothmulti2.c -// RUN: %clang -c %S/fptrinstructbothmulti1.checkedNOALL.c %S/fptrinstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrinstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructbothmulti1.checked.c %S/fptrinstructbothmulti2.checked.c -// RUN: test ! -f %S/fptrinstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrinstructbothmulti2.checked.convert_again.c -// RUN: rm %S/fptrinstructbothmulti1.checkedALL.c %S/fptrinstructbothmulti2.checkedALL.c -// RUN: rm %S/fptrinstructbothmulti1.checkedNOALL.c %S/fptrinstructbothmulti2.checkedNOALL.c -// RUN: rm %S/fptrinstructbothmulti1.checked.c %S/fptrinstructbothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrinstructbothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrinstructbothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrinstructbothmulti1.c fptrinstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrinstructbothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrinstructbothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrinstructbothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrinstructbothmulti1.c %t.checked/fptrinstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrinstructbothmulti1.c +// RUN: test ! -f %t.convert_again/fptrinstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructbothmulti2.c b/clang/test/3C/fptrinstructbothmulti2.c index d2ae730701d9..8ba5ddbe0662 100644 --- a/clang/test/3C/fptrinstructbothmulti2.c +++ b/clang/test/3C/fptrinstructbothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrinstructbothmulti1.c %s -// RUN: %clang -c %S/fptrinstructbothmulti1.checkedNOALL2.c %S/fptrinstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructbothmulti1.checked2.c %S/fptrinstructbothmulti2.checked2.c -// RUN: test ! -f %S/fptrinstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrinstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrinstructbothmulti1.checkedALL2.c %S/fptrinstructbothmulti2.checkedALL2.c -// RUN: rm %S/fptrinstructbothmulti1.checkedNOALL2.c %S/fptrinstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrinstructbothmulti1.checked2.c %S/fptrinstructbothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrinstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrinstructbothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrinstructbothmulti1.c fptrinstructbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrinstructbothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrinstructbothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrinstructbothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrinstructbothmulti1.c %t.checked/fptrinstructbothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrinstructbothmulti1.c +// RUN: test ! -f %t.convert_again/fptrinstructbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcallee.c b/clang/test/3C/fptrinstructcallee.c index 43b3e312e57d..ec888acc491e 100644 --- a/clang/test/3C/fptrinstructcallee.c +++ b/clang/test/3C/fptrinstructcallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructcallee.checked.c -- | count 0 -// RUN: rm %S/fptrinstructcallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrinstructcallee.c -- | diff %t.checked/fptrinstructcallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcalleemulti1.c b/clang/test/3C/fptrinstructcalleemulti1.c index 040af35e1f46..ab8a452208b4 100644 --- a/clang/test/3C/fptrinstructcalleemulti1.c +++ b/clang/test/3C/fptrinstructcalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrinstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrinstructcalleemulti2.c -// RUN: %clang -c %S/fptrinstructcalleemulti1.checkedNOALL.c %S/fptrinstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrinstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructcalleemulti1.checked.c %S/fptrinstructcalleemulti2.checked.c -// RUN: test ! -f %S/fptrinstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrinstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrinstructcalleemulti1.checkedALL.c %S/fptrinstructcalleemulti2.checkedALL.c -// RUN: rm %S/fptrinstructcalleemulti1.checkedNOALL.c %S/fptrinstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrinstructcalleemulti1.checked.c %S/fptrinstructcalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrinstructcalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrinstructcalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrinstructcalleemulti1.c fptrinstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrinstructcalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrinstructcalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrinstructcalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrinstructcalleemulti1.c %t.checked/fptrinstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrinstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrinstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcalleemulti2.c b/clang/test/3C/fptrinstructcalleemulti2.c index c4c63d541841..8bce445f8e95 100644 --- a/clang/test/3C/fptrinstructcalleemulti2.c +++ b/clang/test/3C/fptrinstructcalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrinstructcalleemulti1.c %s -// RUN: %clang -c %S/fptrinstructcalleemulti1.checkedNOALL2.c %S/fptrinstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructcalleemulti1.checked2.c %S/fptrinstructcalleemulti2.checked2.c -// RUN: test ! -f %S/fptrinstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrinstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrinstructcalleemulti1.checkedALL2.c %S/fptrinstructcalleemulti2.checkedALL2.c -// RUN: rm %S/fptrinstructcalleemulti1.checkedNOALL2.c %S/fptrinstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrinstructcalleemulti1.checked2.c %S/fptrinstructcalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrinstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrinstructcalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrinstructcalleemulti1.c fptrinstructcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrinstructcalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrinstructcalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrinstructcalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrinstructcalleemulti1.c %t.checked/fptrinstructcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrinstructcalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrinstructcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcaller.c b/clang/test/3C/fptrinstructcaller.c index db0a2e392ab6..9a4c9f74a125 100644 --- a/clang/test/3C/fptrinstructcaller.c +++ b/clang/test/3C/fptrinstructcaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructcaller.checked.c -- | count 0 -// RUN: rm %S/fptrinstructcaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrinstructcaller.c -- | diff %t.checked/fptrinstructcaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcallermulti1.c b/clang/test/3C/fptrinstructcallermulti1.c index 26ac4c90c340..9c2a4a79b1dc 100644 --- a/clang/test/3C/fptrinstructcallermulti1.c +++ b/clang/test/3C/fptrinstructcallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrinstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrinstructcallermulti2.c -// RUN: %clang -c %S/fptrinstructcallermulti1.checkedNOALL.c %S/fptrinstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrinstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructcallermulti1.checked.c %S/fptrinstructcallermulti2.checked.c -// RUN: test ! -f %S/fptrinstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrinstructcallermulti2.checked.convert_again.c -// RUN: rm %S/fptrinstructcallermulti1.checkedALL.c %S/fptrinstructcallermulti2.checkedALL.c -// RUN: rm %S/fptrinstructcallermulti1.checkedNOALL.c %S/fptrinstructcallermulti2.checkedNOALL.c -// RUN: rm %S/fptrinstructcallermulti1.checked.c %S/fptrinstructcallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrinstructcallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrinstructcallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrinstructcallermulti1.c fptrinstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrinstructcallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrinstructcallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrinstructcallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrinstructcallermulti1.c %t.checked/fptrinstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrinstructcallermulti1.c +// RUN: test ! -f %t.convert_again/fptrinstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcallermulti2.c b/clang/test/3C/fptrinstructcallermulti2.c index fe7d76138541..0bcd68f127b8 100644 --- a/clang/test/3C/fptrinstructcallermulti2.c +++ b/clang/test/3C/fptrinstructcallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrinstructcallermulti1.c %s -// RUN: %clang -c %S/fptrinstructcallermulti1.checkedNOALL2.c %S/fptrinstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructcallermulti1.checked2.c %S/fptrinstructcallermulti2.checked2.c -// RUN: test ! -f %S/fptrinstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrinstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrinstructcallermulti1.checkedALL2.c %S/fptrinstructcallermulti2.checkedALL2.c -// RUN: rm %S/fptrinstructcallermulti1.checkedNOALL2.c %S/fptrinstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrinstructcallermulti1.checked2.c %S/fptrinstructcallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrinstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrinstructcallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrinstructcallermulti1.c fptrinstructcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrinstructcallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrinstructcallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrinstructcallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrinstructcallermulti1.c %t.checked/fptrinstructcallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrinstructcallermulti1.c +// RUN: test ! -f %t.convert_again/fptrinstructcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructprotoboth.c b/clang/test/3C/fptrinstructprotoboth.c index c059ee078df6..5fa4e3f9d91a 100644 --- a/clang/test/3C/fptrinstructprotoboth.c +++ b/clang/test/3C/fptrinstructprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrinstructprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrinstructprotoboth.c -- | diff %t.checked/fptrinstructprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructprotocallee.c b/clang/test/3C/fptrinstructprotocallee.c index c54026a90043..003abf3e92d5 100644 --- a/clang/test/3C/fptrinstructprotocallee.c +++ b/clang/test/3C/fptrinstructprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrinstructprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrinstructprotocallee.c -- | diff %t.checked/fptrinstructprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructprotocaller.c b/clang/test/3C/fptrinstructprotocaller.c index 35fe6506d06c..4f68509d4294 100644 --- a/clang/test/3C/fptrinstructprotocaller.c +++ b/clang/test/3C/fptrinstructprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrinstructprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrinstructprotocaller.c -- | diff %t.checked/fptrinstructprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructprotosafe.c b/clang/test/3C/fptrinstructprotosafe.c index 7da2a9679379..a03555bc3ffc 100644 --- a/clang/test/3C/fptrinstructprotosafe.c +++ b/clang/test/3C/fptrinstructprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrinstructprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrinstructprotosafe.c -- | diff %t.checked/fptrinstructprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructsafe.c b/clang/test/3C/fptrinstructsafe.c index 59691a81b5cd..85062e37c752 100644 --- a/clang/test/3C/fptrinstructsafe.c +++ b/clang/test/3C/fptrinstructsafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructsafe.checked.c -- | count 0 -// RUN: rm %S/fptrinstructsafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrinstructsafe.c -- | diff %t.checked/fptrinstructsafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructsafemulti1.c b/clang/test/3C/fptrinstructsafemulti1.c index 7763fd4f380d..5de7ad5c0c03 100644 --- a/clang/test/3C/fptrinstructsafemulti1.c +++ b/clang/test/3C/fptrinstructsafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrinstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrinstructsafemulti2.c -// RUN: %clang -c %S/fptrinstructsafemulti1.checkedNOALL.c %S/fptrinstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrinstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructsafemulti1.checked.c %S/fptrinstructsafemulti2.checked.c -// RUN: test ! -f %S/fptrinstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrinstructsafemulti2.checked.convert_again.c -// RUN: rm %S/fptrinstructsafemulti1.checkedALL.c %S/fptrinstructsafemulti2.checkedALL.c -// RUN: rm %S/fptrinstructsafemulti1.checkedNOALL.c %S/fptrinstructsafemulti2.checkedNOALL.c -// RUN: rm %S/fptrinstructsafemulti1.checked.c %S/fptrinstructsafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrinstructsafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrinstructsafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrinstructsafemulti1.c fptrinstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrinstructsafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrinstructsafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrinstructsafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrinstructsafemulti1.c %t.checked/fptrinstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrinstructsafemulti1.c +// RUN: test ! -f %t.convert_again/fptrinstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructsafemulti2.c b/clang/test/3C/fptrinstructsafemulti2.c index fdc96487cc0a..7c1eb70befcf 100644 --- a/clang/test/3C/fptrinstructsafemulti2.c +++ b/clang/test/3C/fptrinstructsafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrinstructsafemulti1.c %s -// RUN: %clang -c %S/fptrinstructsafemulti1.checkedNOALL2.c %S/fptrinstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructsafemulti1.checked2.c %S/fptrinstructsafemulti2.checked2.c -// RUN: test ! -f %S/fptrinstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrinstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrinstructsafemulti1.checkedALL2.c %S/fptrinstructsafemulti2.checkedALL2.c -// RUN: rm %S/fptrinstructsafemulti1.checkedNOALL2.c %S/fptrinstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrinstructsafemulti1.checked2.c %S/fptrinstructsafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrinstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrinstructsafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrinstructsafemulti1.c fptrinstructsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrinstructsafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrinstructsafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrinstructsafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrinstructsafemulti1.c %t.checked/fptrinstructsafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrinstructsafemulti1.c +// RUN: test ! -f %t.convert_again/fptrinstructsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafeboth.c b/clang/test/3C/fptrsafeboth.c index 402fb413f30e..d967076e6806 100644 --- a/clang/test/3C/fptrsafeboth.c +++ b/clang/test/3C/fptrsafeboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafeboth.checked.c -- | count 0 -// RUN: rm %S/fptrsafeboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrsafeboth.c -- | diff %t.checked/fptrsafeboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafebothmulti1.c b/clang/test/3C/fptrsafebothmulti1.c index 86eeebb6b8f5..4d09a33059e2 100644 --- a/clang/test/3C/fptrsafebothmulti1.c +++ b/clang/test/3C/fptrsafebothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrsafebothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrsafebothmulti2.c -// RUN: %clang -c %S/fptrsafebothmulti1.checkedNOALL.c %S/fptrsafebothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafebothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafebothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrsafebothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafebothmulti1.checked.c %S/fptrsafebothmulti2.checked.c -// RUN: test ! -f %S/fptrsafebothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrsafebothmulti2.checked.convert_again.c -// RUN: rm %S/fptrsafebothmulti1.checkedALL.c %S/fptrsafebothmulti2.checkedALL.c -// RUN: rm %S/fptrsafebothmulti1.checkedNOALL.c %S/fptrsafebothmulti2.checkedNOALL.c -// RUN: rm %S/fptrsafebothmulti1.checked.c %S/fptrsafebothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrsafebothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrsafebothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrsafebothmulti1.c fptrsafebothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrsafebothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrsafebothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrsafebothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrsafebothmulti1.c %t.checked/fptrsafebothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrsafebothmulti1.c +// RUN: test ! -f %t.convert_again/fptrsafebothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafebothmulti2.c b/clang/test/3C/fptrsafebothmulti2.c index 901bd68ac41f..f82181aa1c1c 100644 --- a/clang/test/3C/fptrsafebothmulti2.c +++ b/clang/test/3C/fptrsafebothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrsafebothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrsafebothmulti1.c %s -// RUN: %clang -c %S/fptrsafebothmulti1.checkedNOALL2.c %S/fptrsafebothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafebothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafebothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrsafebothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafebothmulti1.checked2.c %S/fptrsafebothmulti2.checked2.c -// RUN: test ! -f %S/fptrsafebothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrsafebothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrsafebothmulti1.checkedALL2.c %S/fptrsafebothmulti2.checkedALL2.c -// RUN: rm %S/fptrsafebothmulti1.checkedNOALL2.c %S/fptrsafebothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrsafebothmulti1.checked2.c %S/fptrsafebothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrsafebothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrsafebothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrsafebothmulti1.c fptrsafebothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrsafebothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrsafebothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrsafebothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrsafebothmulti1.c %t.checked/fptrsafebothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrsafebothmulti1.c +// RUN: test ! -f %t.convert_again/fptrsafebothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecallee.c b/clang/test/3C/fptrsafecallee.c index 886dba171d79..ceba86a238f3 100644 --- a/clang/test/3C/fptrsafecallee.c +++ b/clang/test/3C/fptrsafecallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafecallee.checked.c -- | count 0 -// RUN: rm %S/fptrsafecallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrsafecallee.c -- | diff %t.checked/fptrsafecallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecalleemulti1.c b/clang/test/3C/fptrsafecalleemulti1.c index d3df47bce3d7..f21cbb227cf4 100644 --- a/clang/test/3C/fptrsafecalleemulti1.c +++ b/clang/test/3C/fptrsafecalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrsafecalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrsafecalleemulti2.c -// RUN: %clang -c %S/fptrsafecalleemulti1.checkedNOALL.c %S/fptrsafecalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafecalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafecalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrsafecalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafecalleemulti1.checked.c %S/fptrsafecalleemulti2.checked.c -// RUN: test ! -f %S/fptrsafecalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrsafecalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrsafecalleemulti1.checkedALL.c %S/fptrsafecalleemulti2.checkedALL.c -// RUN: rm %S/fptrsafecalleemulti1.checkedNOALL.c %S/fptrsafecalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrsafecalleemulti1.checked.c %S/fptrsafecalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrsafecalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrsafecalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrsafecalleemulti1.c fptrsafecalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrsafecalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrsafecalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrsafecalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrsafecalleemulti1.c %t.checked/fptrsafecalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrsafecalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrsafecalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecalleemulti2.c b/clang/test/3C/fptrsafecalleemulti2.c index 18eb94b11c6b..f8c3f7710418 100644 --- a/clang/test/3C/fptrsafecalleemulti2.c +++ b/clang/test/3C/fptrsafecalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrsafecalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrsafecalleemulti1.c %s -// RUN: %clang -c %S/fptrsafecalleemulti1.checkedNOALL2.c %S/fptrsafecalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafecalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafecalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrsafecalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafecalleemulti1.checked2.c %S/fptrsafecalleemulti2.checked2.c -// RUN: test ! -f %S/fptrsafecalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrsafecalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrsafecalleemulti1.checkedALL2.c %S/fptrsafecalleemulti2.checkedALL2.c -// RUN: rm %S/fptrsafecalleemulti1.checkedNOALL2.c %S/fptrsafecalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrsafecalleemulti1.checked2.c %S/fptrsafecalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrsafecalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrsafecalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrsafecalleemulti1.c fptrsafecalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrsafecalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrsafecalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrsafecalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrsafecalleemulti1.c %t.checked/fptrsafecalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrsafecalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrsafecalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecaller.c b/clang/test/3C/fptrsafecaller.c index a260a9e3d731..0cecbcb49307 100644 --- a/clang/test/3C/fptrsafecaller.c +++ b/clang/test/3C/fptrsafecaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafecaller.checked.c -- | count 0 -// RUN: rm %S/fptrsafecaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrsafecaller.c -- | diff %t.checked/fptrsafecaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecallermulti1.c b/clang/test/3C/fptrsafecallermulti1.c index d4460cb607a7..e99cd65cd895 100644 --- a/clang/test/3C/fptrsafecallermulti1.c +++ b/clang/test/3C/fptrsafecallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrsafecallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrsafecallermulti2.c -// RUN: %clang -c %S/fptrsafecallermulti1.checkedNOALL.c %S/fptrsafecallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafecallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafecallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrsafecallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafecallermulti1.checked.c %S/fptrsafecallermulti2.checked.c -// RUN: test ! -f %S/fptrsafecallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrsafecallermulti2.checked.convert_again.c -// RUN: rm %S/fptrsafecallermulti1.checkedALL.c %S/fptrsafecallermulti2.checkedALL.c -// RUN: rm %S/fptrsafecallermulti1.checkedNOALL.c %S/fptrsafecallermulti2.checkedNOALL.c -// RUN: rm %S/fptrsafecallermulti1.checked.c %S/fptrsafecallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrsafecallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrsafecallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrsafecallermulti1.c fptrsafecallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrsafecallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrsafecallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrsafecallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrsafecallermulti1.c %t.checked/fptrsafecallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrsafecallermulti1.c +// RUN: test ! -f %t.convert_again/fptrsafecallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecallermulti2.c b/clang/test/3C/fptrsafecallermulti2.c index 185067bfdee0..f6fdaa702c91 100644 --- a/clang/test/3C/fptrsafecallermulti2.c +++ b/clang/test/3C/fptrsafecallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrsafecallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrsafecallermulti1.c %s -// RUN: %clang -c %S/fptrsafecallermulti1.checkedNOALL2.c %S/fptrsafecallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafecallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafecallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrsafecallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafecallermulti1.checked2.c %S/fptrsafecallermulti2.checked2.c -// RUN: test ! -f %S/fptrsafecallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrsafecallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrsafecallermulti1.checkedALL2.c %S/fptrsafecallermulti2.checkedALL2.c -// RUN: rm %S/fptrsafecallermulti1.checkedNOALL2.c %S/fptrsafecallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrsafecallermulti1.checked2.c %S/fptrsafecallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrsafecallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrsafecallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrsafecallermulti1.c fptrsafecallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrsafecallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrsafecallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrsafecallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrsafecallermulti1.c %t.checked/fptrsafecallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrsafecallermulti1.c +// RUN: test ! -f %t.convert_again/fptrsafecallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafeprotoboth.c b/clang/test/3C/fptrsafeprotoboth.c index b214074caafa..50d4b7f64949 100644 --- a/clang/test/3C/fptrsafeprotoboth.c +++ b/clang/test/3C/fptrsafeprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafeprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrsafeprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrsafeprotoboth.c -- | diff %t.checked/fptrsafeprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafeprotocallee.c b/clang/test/3C/fptrsafeprotocallee.c index 42e36c3601d7..99085461aae1 100644 --- a/clang/test/3C/fptrsafeprotocallee.c +++ b/clang/test/3C/fptrsafeprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafeprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrsafeprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrsafeprotocallee.c -- | diff %t.checked/fptrsafeprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafeprotocaller.c b/clang/test/3C/fptrsafeprotocaller.c index f6a65140cf7e..ff31078342ab 100644 --- a/clang/test/3C/fptrsafeprotocaller.c +++ b/clang/test/3C/fptrsafeprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafeprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrsafeprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrsafeprotocaller.c -- | diff %t.checked/fptrsafeprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafeprotosafe.c b/clang/test/3C/fptrsafeprotosafe.c index 94c6f5aa35f9..9e1cf6b8636a 100644 --- a/clang/test/3C/fptrsafeprotosafe.c +++ b/clang/test/3C/fptrsafeprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafeprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrsafeprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrsafeprotosafe.c -- | diff %t.checked/fptrsafeprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafesafe.c b/clang/test/3C/fptrsafesafe.c index d3871f2368e2..92cd7c020eff 100644 --- a/clang/test/3C/fptrsafesafe.c +++ b/clang/test/3C/fptrsafesafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafesafe.checked.c -- | count 0 -// RUN: rm %S/fptrsafesafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrsafesafe.c -- | diff %t.checked/fptrsafesafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafesafemulti1.c b/clang/test/3C/fptrsafesafemulti1.c index 2ad05debbc22..e77cbdd72aae 100644 --- a/clang/test/3C/fptrsafesafemulti1.c +++ b/clang/test/3C/fptrsafesafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrsafesafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrsafesafemulti2.c -// RUN: %clang -c %S/fptrsafesafemulti1.checkedNOALL.c %S/fptrsafesafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafesafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafesafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrsafesafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafesafemulti1.checked.c %S/fptrsafesafemulti2.checked.c -// RUN: test ! -f %S/fptrsafesafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrsafesafemulti2.checked.convert_again.c -// RUN: rm %S/fptrsafesafemulti1.checkedALL.c %S/fptrsafesafemulti2.checkedALL.c -// RUN: rm %S/fptrsafesafemulti1.checkedNOALL.c %S/fptrsafesafemulti2.checkedNOALL.c -// RUN: rm %S/fptrsafesafemulti1.checked.c %S/fptrsafesafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrsafesafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrsafesafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrsafesafemulti1.c fptrsafesafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrsafesafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrsafesafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrsafesafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrsafesafemulti1.c %t.checked/fptrsafesafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrsafesafemulti1.c +// RUN: test ! -f %t.convert_again/fptrsafesafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafesafemulti2.c b/clang/test/3C/fptrsafesafemulti2.c index 6ab5e3578bf8..1a5ca5d24c02 100644 --- a/clang/test/3C/fptrsafesafemulti2.c +++ b/clang/test/3C/fptrsafesafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrsafesafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrsafesafemulti1.c %s -// RUN: %clang -c %S/fptrsafesafemulti1.checkedNOALL2.c %S/fptrsafesafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafesafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafesafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrsafesafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafesafemulti1.checked2.c %S/fptrsafesafemulti2.checked2.c -// RUN: test ! -f %S/fptrsafesafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrsafesafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrsafesafemulti1.checkedALL2.c %S/fptrsafesafemulti2.checkedALL2.c -// RUN: rm %S/fptrsafesafemulti1.checkedNOALL2.c %S/fptrsafesafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrsafesafemulti1.checked2.c %S/fptrsafesafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrsafesafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrsafesafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrsafesafemulti1.c fptrsafesafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrsafesafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrsafesafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrsafesafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrsafesafemulti1.c %t.checked/fptrsafesafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrsafesafemulti1.c +// RUN: test ! -f %t.convert_again/fptrsafesafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafeboth.c b/clang/test/3C/fptrunsafeboth.c index 9e632c58a6c6..3c2c4a71a8f9 100644 --- a/clang/test/3C/fptrunsafeboth.c +++ b/clang/test/3C/fptrunsafeboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafeboth.checked.c -- | count 0 -// RUN: rm %S/fptrunsafeboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrunsafeboth.c -- | diff %t.checked/fptrunsafeboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafebothmulti1.c b/clang/test/3C/fptrunsafebothmulti1.c index ea34492339b9..c6f415eee135 100644 --- a/clang/test/3C/fptrunsafebothmulti1.c +++ b/clang/test/3C/fptrunsafebothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrunsafebothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrunsafebothmulti2.c -// RUN: %clang -c %S/fptrunsafebothmulti1.checkedNOALL.c %S/fptrunsafebothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafebothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafebothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrunsafebothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafebothmulti1.checked.c %S/fptrunsafebothmulti2.checked.c -// RUN: test ! -f %S/fptrunsafebothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrunsafebothmulti2.checked.convert_again.c -// RUN: rm %S/fptrunsafebothmulti1.checkedALL.c %S/fptrunsafebothmulti2.checkedALL.c -// RUN: rm %S/fptrunsafebothmulti1.checkedNOALL.c %S/fptrunsafebothmulti2.checkedNOALL.c -// RUN: rm %S/fptrunsafebothmulti1.checked.c %S/fptrunsafebothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrunsafebothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrunsafebothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrunsafebothmulti1.c fptrunsafebothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrunsafebothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrunsafebothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrunsafebothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrunsafebothmulti1.c %t.checked/fptrunsafebothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrunsafebothmulti1.c +// RUN: test ! -f %t.convert_again/fptrunsafebothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafebothmulti2.c b/clang/test/3C/fptrunsafebothmulti2.c index 770828b1ccfc..ea486b6daf2d 100644 --- a/clang/test/3C/fptrunsafebothmulti2.c +++ b/clang/test/3C/fptrunsafebothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrunsafebothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrunsafebothmulti1.c %s -// RUN: %clang -c %S/fptrunsafebothmulti1.checkedNOALL2.c %S/fptrunsafebothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafebothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafebothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrunsafebothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafebothmulti1.checked2.c %S/fptrunsafebothmulti2.checked2.c -// RUN: test ! -f %S/fptrunsafebothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrunsafebothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrunsafebothmulti1.checkedALL2.c %S/fptrunsafebothmulti2.checkedALL2.c -// RUN: rm %S/fptrunsafebothmulti1.checkedNOALL2.c %S/fptrunsafebothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrunsafebothmulti1.checked2.c %S/fptrunsafebothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrunsafebothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrunsafebothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrunsafebothmulti1.c fptrunsafebothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrunsafebothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrunsafebothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrunsafebothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrunsafebothmulti1.c %t.checked/fptrunsafebothmulti2.c -- +// RUN: test ! -f %t.convert_again/fptrunsafebothmulti1.c +// RUN: test ! -f %t.convert_again/fptrunsafebothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecallee.c b/clang/test/3C/fptrunsafecallee.c index 6c38a237ebef..72253d08ca6d 100644 --- a/clang/test/3C/fptrunsafecallee.c +++ b/clang/test/3C/fptrunsafecallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafecallee.checked.c -- | count 0 -// RUN: rm %S/fptrunsafecallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrunsafecallee.c -- | diff %t.checked/fptrunsafecallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecalleemulti1.c b/clang/test/3C/fptrunsafecalleemulti1.c index 1b70a6cf069f..bdddffa5237d 100644 --- a/clang/test/3C/fptrunsafecalleemulti1.c +++ b/clang/test/3C/fptrunsafecalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrunsafecalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrunsafecalleemulti2.c -// RUN: %clang -c %S/fptrunsafecalleemulti1.checkedNOALL.c %S/fptrunsafecalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafecalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafecalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrunsafecalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafecalleemulti1.checked.c %S/fptrunsafecalleemulti2.checked.c -// RUN: test ! -f %S/fptrunsafecalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrunsafecalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrunsafecalleemulti1.checkedALL.c %S/fptrunsafecalleemulti2.checkedALL.c -// RUN: rm %S/fptrunsafecalleemulti1.checkedNOALL.c %S/fptrunsafecalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrunsafecalleemulti1.checked.c %S/fptrunsafecalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrunsafecalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrunsafecalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrunsafecalleemulti1.c fptrunsafecalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrunsafecalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrunsafecalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrunsafecalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrunsafecalleemulti1.c %t.checked/fptrunsafecalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrunsafecalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrunsafecalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecalleemulti2.c b/clang/test/3C/fptrunsafecalleemulti2.c index 1359b39c7b75..8fd0dbf4f16b 100644 --- a/clang/test/3C/fptrunsafecalleemulti2.c +++ b/clang/test/3C/fptrunsafecalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrunsafecalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrunsafecalleemulti1.c %s -// RUN: %clang -c %S/fptrunsafecalleemulti1.checkedNOALL2.c %S/fptrunsafecalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafecalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafecalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrunsafecalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafecalleemulti1.checked2.c %S/fptrunsafecalleemulti2.checked2.c -// RUN: test ! -f %S/fptrunsafecalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrunsafecalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrunsafecalleemulti1.checkedALL2.c %S/fptrunsafecalleemulti2.checkedALL2.c -// RUN: rm %S/fptrunsafecalleemulti1.checkedNOALL2.c %S/fptrunsafecalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrunsafecalleemulti1.checked2.c %S/fptrunsafecalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrunsafecalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrunsafecalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrunsafecalleemulti1.c fptrunsafecalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrunsafecalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrunsafecalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrunsafecalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrunsafecalleemulti1.c %t.checked/fptrunsafecalleemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrunsafecalleemulti1.c +// RUN: test ! -f %t.convert_again/fptrunsafecalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecaller.c b/clang/test/3C/fptrunsafecaller.c index e1e19dd55d01..f6ff727f09ed 100644 --- a/clang/test/3C/fptrunsafecaller.c +++ b/clang/test/3C/fptrunsafecaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafecaller.checked.c -- | count 0 -// RUN: rm %S/fptrunsafecaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrunsafecaller.c -- | diff %t.checked/fptrunsafecaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecallermulti1.c b/clang/test/3C/fptrunsafecallermulti1.c index fa68feb816a2..489abea6c742 100644 --- a/clang/test/3C/fptrunsafecallermulti1.c +++ b/clang/test/3C/fptrunsafecallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrunsafecallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrunsafecallermulti2.c -// RUN: %clang -c %S/fptrunsafecallermulti1.checkedNOALL.c %S/fptrunsafecallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafecallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafecallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrunsafecallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafecallermulti1.checked.c %S/fptrunsafecallermulti2.checked.c -// RUN: test ! -f %S/fptrunsafecallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrunsafecallermulti2.checked.convert_again.c -// RUN: rm %S/fptrunsafecallermulti1.checkedALL.c %S/fptrunsafecallermulti2.checkedALL.c -// RUN: rm %S/fptrunsafecallermulti1.checkedNOALL.c %S/fptrunsafecallermulti2.checkedNOALL.c -// RUN: rm %S/fptrunsafecallermulti1.checked.c %S/fptrunsafecallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrunsafecallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrunsafecallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrunsafecallermulti1.c fptrunsafecallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrunsafecallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrunsafecallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrunsafecallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrunsafecallermulti1.c %t.checked/fptrunsafecallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrunsafecallermulti1.c +// RUN: test ! -f %t.convert_again/fptrunsafecallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecallermulti2.c b/clang/test/3C/fptrunsafecallermulti2.c index 6a6fccefd1ba..4e6c32493b2c 100644 --- a/clang/test/3C/fptrunsafecallermulti2.c +++ b/clang/test/3C/fptrunsafecallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrunsafecallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrunsafecallermulti1.c %s -// RUN: %clang -c %S/fptrunsafecallermulti1.checkedNOALL2.c %S/fptrunsafecallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafecallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafecallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrunsafecallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafecallermulti1.checked2.c %S/fptrunsafecallermulti2.checked2.c -// RUN: test ! -f %S/fptrunsafecallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrunsafecallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrunsafecallermulti1.checkedALL2.c %S/fptrunsafecallermulti2.checkedALL2.c -// RUN: rm %S/fptrunsafecallermulti1.checkedNOALL2.c %S/fptrunsafecallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrunsafecallermulti1.checked2.c %S/fptrunsafecallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrunsafecallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrunsafecallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrunsafecallermulti1.c fptrunsafecallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrunsafecallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrunsafecallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrunsafecallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrunsafecallermulti1.c %t.checked/fptrunsafecallermulti2.c -- +// RUN: test ! -f %t.convert_again/fptrunsafecallermulti1.c +// RUN: test ! -f %t.convert_again/fptrunsafecallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafeprotoboth.c b/clang/test/3C/fptrunsafeprotoboth.c index e06cfde8b12c..91f35dbbf9f8 100644 --- a/clang/test/3C/fptrunsafeprotoboth.c +++ b/clang/test/3C/fptrunsafeprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafeprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrunsafeprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrunsafeprotoboth.c -- | diff %t.checked/fptrunsafeprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafeprotocallee.c b/clang/test/3C/fptrunsafeprotocallee.c index 4b59f103d0f8..fb95444d5cee 100644 --- a/clang/test/3C/fptrunsafeprotocallee.c +++ b/clang/test/3C/fptrunsafeprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafeprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrunsafeprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrunsafeprotocallee.c -- | diff %t.checked/fptrunsafeprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafeprotocaller.c b/clang/test/3C/fptrunsafeprotocaller.c index 3d528326a58c..8b2c5b5e9cf2 100644 --- a/clang/test/3C/fptrunsafeprotocaller.c +++ b/clang/test/3C/fptrunsafeprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafeprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrunsafeprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrunsafeprotocaller.c -- | diff %t.checked/fptrunsafeprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafeprotosafe.c b/clang/test/3C/fptrunsafeprotosafe.c index d7d0252d1f24..eef67b486ff3 100644 --- a/clang/test/3C/fptrunsafeprotosafe.c +++ b/clang/test/3C/fptrunsafeprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafeprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrunsafeprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrunsafeprotosafe.c -- | diff %t.checked/fptrunsafeprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafesafe.c b/clang/test/3C/fptrunsafesafe.c index 137f36ed12ac..460bd533205d 100644 --- a/clang/test/3C/fptrunsafesafe.c +++ b/clang/test/3C/fptrunsafesafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafesafe.checked.c -- | count 0 -// RUN: rm %S/fptrunsafesafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/fptrunsafesafe.c -- | diff %t.checked/fptrunsafesafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafesafemulti1.c b/clang/test/3C/fptrunsafesafemulti1.c index 83974814f3c3..15baa84757b5 100644 --- a/clang/test/3C/fptrunsafesafemulti1.c +++ b/clang/test/3C/fptrunsafesafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrunsafesafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrunsafesafemulti2.c -// RUN: %clang -c %S/fptrunsafesafemulti1.checkedNOALL.c %S/fptrunsafesafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafesafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafesafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrunsafesafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafesafemulti1.checked.c %S/fptrunsafesafemulti2.checked.c -// RUN: test ! -f %S/fptrunsafesafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrunsafesafemulti2.checked.convert_again.c -// RUN: rm %S/fptrunsafesafemulti1.checkedALL.c %S/fptrunsafesafemulti2.checkedALL.c -// RUN: rm %S/fptrunsafesafemulti1.checkedNOALL.c %S/fptrunsafesafemulti2.checkedNOALL.c -// RUN: rm %S/fptrunsafesafemulti1.checked.c %S/fptrunsafesafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/fptrunsafesafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/fptrunsafesafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c fptrunsafesafemulti1.c fptrunsafesafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/fptrunsafesafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/fptrunsafesafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrunsafesafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrunsafesafemulti1.c %t.checked/fptrunsafesafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrunsafesafemulti1.c +// RUN: test ! -f %t.convert_again/fptrunsafesafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafesafemulti2.c b/clang/test/3C/fptrunsafesafemulti2.c index e4d03a249c57..ac48353ee814 100644 --- a/clang/test/3C/fptrunsafesafemulti2.c +++ b/clang/test/3C/fptrunsafesafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrunsafesafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrunsafesafemulti1.c %s -// RUN: %clang -c %S/fptrunsafesafemulti1.checkedNOALL2.c %S/fptrunsafesafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafesafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafesafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrunsafesafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafesafemulti1.checked2.c %S/fptrunsafesafemulti2.checked2.c -// RUN: test ! -f %S/fptrunsafesafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrunsafesafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrunsafesafemulti1.checkedALL2.c %S/fptrunsafesafemulti2.checkedALL2.c -// RUN: rm %S/fptrunsafesafemulti1.checkedNOALL2.c %S/fptrunsafesafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrunsafesafemulti1.checked2.c %S/fptrunsafesafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/fptrunsafesafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/fptrunsafesafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c fptrunsafesafemulti1.c fptrunsafesafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/fptrunsafesafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/fptrunsafesafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/fptrunsafesafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/fptrunsafesafemulti1.c %t.checked/fptrunsafesafemulti2.c -- +// RUN: test ! -f %t.convert_again/fptrunsafesafemulti1.c +// RUN: test ! -f %t.convert_again/fptrunsafesafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/funcptr1.c b/clang/test/3C/funcptr1.c index fc4714b28851..1a0ef1698241 100644 --- a/clang/test/3C/funcptr1.c +++ b/clang/test/3C/funcptr1.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/funcptr1.checked.c -- | count 0 -// RUN: rm %S/funcptr1.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/funcptr1.c -- | diff %t.checked/funcptr1.c - void f(int *(*fp)(int *)) { //CHECK: void f(_Ptr<_Ptr (int * : itype(_Ptr))> fp) { diff --git a/clang/test/3C/funcptr2.c b/clang/test/3C/funcptr2.c index 26b5cf3ae87f..aac43b01c485 100644 --- a/clang/test/3C/funcptr2.c +++ b/clang/test/3C/funcptr2.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/funcptr2.checked.c -- | count 0 -// RUN: rm %S/funcptr2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/funcptr2.c -- | diff %t.checked/funcptr2.c - void f(int *(*fp)(int *)) { //CHECK: void f(_Ptr)) : itype(_Ptr)> fp) { diff --git a/clang/test/3C/funcptr3.c b/clang/test/3C/funcptr3.c index 2ac3a56c5112..824500dcb7fe 100644 --- a/clang/test/3C/funcptr3.c +++ b/clang/test/3C/funcptr3.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/funcptr3.checked.c -- | count 0 -// RUN: rm %S/funcptr3.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/funcptr3.c -- | diff %t.checked/funcptr3.c - void f(int *(*fp)(int *)) { //CHECK: void f(_Ptr<_Ptr (_Ptr )> fp) _Checked { diff --git a/clang/test/3C/funcptr4.c b/clang/test/3C/funcptr4.c index a19da22fcf8f..3e3773dcae29 100644 --- a/clang/test/3C/funcptr4.c +++ b/clang/test/3C/funcptr4.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/funcptr4.checked.c -- | count 0 -// RUN: rm %S/funcptr4.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/funcptr4.c -- | diff %t.checked/funcptr4.c - void f(int *(*fp)(int *)) { //CHECK: void f(_Ptr<_Ptr (_Ptr )> fp) _Checked { diff --git a/clang/test/3C/graphs.c b/clang/test/3C/graphs.c index 689d5a6add9e..75528c404cc3 100644 --- a/clang/test/3C/graphs.c +++ b/clang/test/3C/graphs.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/graphs.checked.c -- | count 0 -// RUN: rm %S/graphs.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/graphs.c -- | diff %t.checked/graphs.c - #include diff --git a/clang/test/3C/graphs2.c b/clang/test/3C/graphs2.c index 54a5859a0a7c..5c482b133fda 100644 --- a/clang/test/3C/graphs2.c +++ b/clang/test/3C/graphs2.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/graphs2.checked.c -- | count 0 -// RUN: rm %S/graphs2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/graphs2.c -- | diff %t.checked/graphs2.c - #include diff --git a/clang/test/3C/gvar.c b/clang/test/3C/gvar.c index fb7d5bc2a7a0..8c7f59a3b510 100644 --- a/clang/test/3C/gvar.c +++ b/clang/test/3C/gvar.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/gvar.checked.c -- | count 0 -// RUN: rm %S/gvar.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/gvar.c -- | diff %t.checked/gvar.c - int *x; //CHECK: _Ptr x = ((void *)0); diff --git a/clang/test/3C/i1.c b/clang/test/3C/i1.c index a74414b59669..8f87670f69ff 100644 --- a/clang/test/3C/i1.c +++ b/clang/test/3C/i1.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/i1.checked.c -- | count 0 -// RUN: rm %S/i1.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/i1.c -- | diff %t.checked/i1.c - /*nothing in this file, save the trivially converted w, should be converted*/ int *foo(int *w) { diff --git a/clang/test/3C/i2.c b/clang/test/3C/i2.c index c6cfdb23bc38..d21b7c5e3243 100644 --- a/clang/test/3C/i2.c +++ b/clang/test/3C/i2.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/i2.checked.c -- | count 0 -// RUN: rm %S/i2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/i2.c -- | diff %t.checked/i2.c - static int *f(int *x) { //CHECK: static _Ptr f(_Ptr x) _Checked { diff --git a/clang/test/3C/i3.c b/clang/test/3C/i3.c index 4c506063b9ab..06bfacc440cc 100644 --- a/clang/test/3C/i3.c +++ b/clang/test/3C/i3.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/i3.checked.c -- | count 0 -// RUN: rm %S/i3.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/i3.c -- | diff %t.checked/i3.c - static int * f(int *x) { //CHECK: static int *f(int *x : itype(_Ptr)) : itype(_Ptr) { diff --git a/clang/test/3C/linkedlist.c b/clang/test/3C/linkedlist.c index e2cef5532ba6..74fe8a6637b6 100644 --- a/clang/test/3C/linkedlist.c +++ b/clang/test/3C/linkedlist.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/linkedlist.checked.c -- | count 0 -// RUN: rm %S/linkedlist.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/linkedlist.c -- | diff %t.checked/linkedlist.c - #include diff --git a/clang/test/3C/malloc_array.c b/clang/test/3C/malloc_array.c index 1d7f98e99292..faf4bd600496 100644 --- a/clang/test/3C/malloc_array.c +++ b/clang/test/3C/malloc_array.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/malloc_array.checked.c -- | count 0 -// RUN: rm %S/malloc_array.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/malloc_array.c -- | diff %t.checked/malloc_array.c - #include extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr) byte_count(size); diff --git a/clang/test/3C/ptrTOptrboth.c b/clang/test/3C/ptrTOptrboth.c index 3c4cf980ddd6..74352b3c7fb0 100644 --- a/clang/test/3C/ptrTOptrboth.c +++ b/clang/test/3C/ptrTOptrboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrboth.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrTOptrboth.c -- | diff %t.checked/ptrTOptrboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrbothmulti1.c b/clang/test/3C/ptrTOptrbothmulti1.c index b68c31941124..dd4fd8c5c35f 100644 --- a/clang/test/3C/ptrTOptrbothmulti1.c +++ b/clang/test/3C/ptrTOptrbothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/ptrTOptrbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/ptrTOptrbothmulti2.c -// RUN: %clang -c %S/ptrTOptrbothmulti1.checkedNOALL.c %S/ptrTOptrbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/ptrTOptrbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrbothmulti1.checked.c %S/ptrTOptrbothmulti2.checked.c -// RUN: test ! -f %S/ptrTOptrbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/ptrTOptrbothmulti2.checked.convert_again.c -// RUN: rm %S/ptrTOptrbothmulti1.checkedALL.c %S/ptrTOptrbothmulti2.checkedALL.c -// RUN: rm %S/ptrTOptrbothmulti1.checkedNOALL.c %S/ptrTOptrbothmulti2.checkedNOALL.c -// RUN: rm %S/ptrTOptrbothmulti1.checked.c %S/ptrTOptrbothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/ptrTOptrbothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/ptrTOptrbothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c ptrTOptrbothmulti1.c ptrTOptrbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/ptrTOptrbothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/ptrTOptrbothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/ptrTOptrbothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/ptrTOptrbothmulti1.c %t.checked/ptrTOptrbothmulti2.c -- +// RUN: test ! -f %t.convert_again/ptrTOptrbothmulti1.c +// RUN: test ! -f %t.convert_again/ptrTOptrbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrbothmulti2.c b/clang/test/3C/ptrTOptrbothmulti2.c index b059285239ac..92b3a84a7b1f 100644 --- a/clang/test/3C/ptrTOptrbothmulti2.c +++ b/clang/test/3C/ptrTOptrbothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/ptrTOptrbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/ptrTOptrbothmulti1.c %s -// RUN: %clang -c %S/ptrTOptrbothmulti1.checkedNOALL2.c %S/ptrTOptrbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/ptrTOptrbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrbothmulti1.checked2.c %S/ptrTOptrbothmulti2.checked2.c -// RUN: test ! -f %S/ptrTOptrbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/ptrTOptrbothmulti2.checked2.convert_again.c -// RUN: rm %S/ptrTOptrbothmulti1.checkedALL2.c %S/ptrTOptrbothmulti2.checkedALL2.c -// RUN: rm %S/ptrTOptrbothmulti1.checkedNOALL2.c %S/ptrTOptrbothmulti2.checkedNOALL2.c -// RUN: rm %S/ptrTOptrbothmulti1.checked2.c %S/ptrTOptrbothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/ptrTOptrbothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/ptrTOptrbothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c ptrTOptrbothmulti1.c ptrTOptrbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/ptrTOptrbothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/ptrTOptrbothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/ptrTOptrbothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/ptrTOptrbothmulti1.c %t.checked/ptrTOptrbothmulti2.c -- +// RUN: test ! -f %t.convert_again/ptrTOptrbothmulti1.c +// RUN: test ! -f %t.convert_again/ptrTOptrbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcallee.c b/clang/test/3C/ptrTOptrcallee.c index 662dfcd02fab..33adeafb514c 100644 --- a/clang/test/3C/ptrTOptrcallee.c +++ b/clang/test/3C/ptrTOptrcallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrcallee.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrcallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrTOptrcallee.c -- | diff %t.checked/ptrTOptrcallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcalleemulti1.c b/clang/test/3C/ptrTOptrcalleemulti1.c index d43042374094..d539a0279e5b 100644 --- a/clang/test/3C/ptrTOptrcalleemulti1.c +++ b/clang/test/3C/ptrTOptrcalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/ptrTOptrcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/ptrTOptrcalleemulti2.c -// RUN: %clang -c %S/ptrTOptrcalleemulti1.checkedNOALL.c %S/ptrTOptrcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/ptrTOptrcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrcalleemulti1.checked.c %S/ptrTOptrcalleemulti2.checked.c -// RUN: test ! -f %S/ptrTOptrcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/ptrTOptrcalleemulti2.checked.convert_again.c -// RUN: rm %S/ptrTOptrcalleemulti1.checkedALL.c %S/ptrTOptrcalleemulti2.checkedALL.c -// RUN: rm %S/ptrTOptrcalleemulti1.checkedNOALL.c %S/ptrTOptrcalleemulti2.checkedNOALL.c -// RUN: rm %S/ptrTOptrcalleemulti1.checked.c %S/ptrTOptrcalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/ptrTOptrcalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/ptrTOptrcalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c ptrTOptrcalleemulti1.c ptrTOptrcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/ptrTOptrcalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/ptrTOptrcalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/ptrTOptrcalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/ptrTOptrcalleemulti1.c %t.checked/ptrTOptrcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/ptrTOptrcalleemulti1.c +// RUN: test ! -f %t.convert_again/ptrTOptrcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcalleemulti2.c b/clang/test/3C/ptrTOptrcalleemulti2.c index 0b791795b9fe..3ad71ca80aa6 100644 --- a/clang/test/3C/ptrTOptrcalleemulti2.c +++ b/clang/test/3C/ptrTOptrcalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/ptrTOptrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/ptrTOptrcalleemulti1.c %s -// RUN: %clang -c %S/ptrTOptrcalleemulti1.checkedNOALL2.c %S/ptrTOptrcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/ptrTOptrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrcalleemulti1.checked2.c %S/ptrTOptrcalleemulti2.checked2.c -// RUN: test ! -f %S/ptrTOptrcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/ptrTOptrcalleemulti2.checked2.convert_again.c -// RUN: rm %S/ptrTOptrcalleemulti1.checkedALL2.c %S/ptrTOptrcalleemulti2.checkedALL2.c -// RUN: rm %S/ptrTOptrcalleemulti1.checkedNOALL2.c %S/ptrTOptrcalleemulti2.checkedNOALL2.c -// RUN: rm %S/ptrTOptrcalleemulti1.checked2.c %S/ptrTOptrcalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/ptrTOptrcalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/ptrTOptrcalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c ptrTOptrcalleemulti1.c ptrTOptrcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/ptrTOptrcalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/ptrTOptrcalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/ptrTOptrcalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/ptrTOptrcalleemulti1.c %t.checked/ptrTOptrcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/ptrTOptrcalleemulti1.c +// RUN: test ! -f %t.convert_again/ptrTOptrcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcaller.c b/clang/test/3C/ptrTOptrcaller.c index 0390485a0353..9e1eb9ecaff0 100644 --- a/clang/test/3C/ptrTOptrcaller.c +++ b/clang/test/3C/ptrTOptrcaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrcaller.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrcaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrTOptrcaller.c -- | diff %t.checked/ptrTOptrcaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcallermulti1.c b/clang/test/3C/ptrTOptrcallermulti1.c index 1f9d38a80e9d..f5d1d799ec1b 100644 --- a/clang/test/3C/ptrTOptrcallermulti1.c +++ b/clang/test/3C/ptrTOptrcallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/ptrTOptrcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/ptrTOptrcallermulti2.c -// RUN: %clang -c %S/ptrTOptrcallermulti1.checkedNOALL.c %S/ptrTOptrcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/ptrTOptrcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrcallermulti1.checked.c %S/ptrTOptrcallermulti2.checked.c -// RUN: test ! -f %S/ptrTOptrcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/ptrTOptrcallermulti2.checked.convert_again.c -// RUN: rm %S/ptrTOptrcallermulti1.checkedALL.c %S/ptrTOptrcallermulti2.checkedALL.c -// RUN: rm %S/ptrTOptrcallermulti1.checkedNOALL.c %S/ptrTOptrcallermulti2.checkedNOALL.c -// RUN: rm %S/ptrTOptrcallermulti1.checked.c %S/ptrTOptrcallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/ptrTOptrcallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/ptrTOptrcallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c ptrTOptrcallermulti1.c ptrTOptrcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/ptrTOptrcallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/ptrTOptrcallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/ptrTOptrcallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/ptrTOptrcallermulti1.c %t.checked/ptrTOptrcallermulti2.c -- +// RUN: test ! -f %t.convert_again/ptrTOptrcallermulti1.c +// RUN: test ! -f %t.convert_again/ptrTOptrcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcallermulti2.c b/clang/test/3C/ptrTOptrcallermulti2.c index 1e47ea16a2e1..80b7f8162e5d 100644 --- a/clang/test/3C/ptrTOptrcallermulti2.c +++ b/clang/test/3C/ptrTOptrcallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/ptrTOptrcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/ptrTOptrcallermulti1.c %s -// RUN: %clang -c %S/ptrTOptrcallermulti1.checkedNOALL2.c %S/ptrTOptrcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/ptrTOptrcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrcallermulti1.checked2.c %S/ptrTOptrcallermulti2.checked2.c -// RUN: test ! -f %S/ptrTOptrcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/ptrTOptrcallermulti2.checked2.convert_again.c -// RUN: rm %S/ptrTOptrcallermulti1.checkedALL2.c %S/ptrTOptrcallermulti2.checkedALL2.c -// RUN: rm %S/ptrTOptrcallermulti1.checkedNOALL2.c %S/ptrTOptrcallermulti2.checkedNOALL2.c -// RUN: rm %S/ptrTOptrcallermulti1.checked2.c %S/ptrTOptrcallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/ptrTOptrcallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/ptrTOptrcallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c ptrTOptrcallermulti1.c ptrTOptrcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/ptrTOptrcallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/ptrTOptrcallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/ptrTOptrcallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/ptrTOptrcallermulti1.c %t.checked/ptrTOptrcallermulti2.c -- +// RUN: test ! -f %t.convert_again/ptrTOptrcallermulti1.c +// RUN: test ! -f %t.convert_again/ptrTOptrcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrprotoboth.c b/clang/test/3C/ptrTOptrprotoboth.c index 626434ed9ffe..99750e8b361b 100644 --- a/clang/test/3C/ptrTOptrprotoboth.c +++ b/clang/test/3C/ptrTOptrprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrprotoboth.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrTOptrprotoboth.c -- | diff %t.checked/ptrTOptrprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrprotocallee.c b/clang/test/3C/ptrTOptrprotocallee.c index de68cba05887..c19cff3523a2 100644 --- a/clang/test/3C/ptrTOptrprotocallee.c +++ b/clang/test/3C/ptrTOptrprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrprotocallee.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrTOptrprotocallee.c -- | diff %t.checked/ptrTOptrprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrprotocaller.c b/clang/test/3C/ptrTOptrprotocaller.c index aaddf1b37c30..e4acf3e95d04 100644 --- a/clang/test/3C/ptrTOptrprotocaller.c +++ b/clang/test/3C/ptrTOptrprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrprotocaller.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrTOptrprotocaller.c -- | diff %t.checked/ptrTOptrprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrprotosafe.c b/clang/test/3C/ptrTOptrprotosafe.c index a10573077b9f..96fd64101e42 100644 --- a/clang/test/3C/ptrTOptrprotosafe.c +++ b/clang/test/3C/ptrTOptrprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrprotosafe.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrTOptrprotosafe.c -- | diff %t.checked/ptrTOptrprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrsafe.c b/clang/test/3C/ptrTOptrsafe.c index 6e0dbc21cf04..6ec31abfdd8c 100644 --- a/clang/test/3C/ptrTOptrsafe.c +++ b/clang/test/3C/ptrTOptrsafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrsafe.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrsafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrTOptrsafe.c -- | diff %t.checked/ptrTOptrsafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrsafemulti1.c b/clang/test/3C/ptrTOptrsafemulti1.c index 2d6495fce49c..5a6345b36a5b 100644 --- a/clang/test/3C/ptrTOptrsafemulti1.c +++ b/clang/test/3C/ptrTOptrsafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/ptrTOptrsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/ptrTOptrsafemulti2.c -// RUN: %clang -c %S/ptrTOptrsafemulti1.checkedNOALL.c %S/ptrTOptrsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/ptrTOptrsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrsafemulti1.checked.c %S/ptrTOptrsafemulti2.checked.c -// RUN: test ! -f %S/ptrTOptrsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/ptrTOptrsafemulti2.checked.convert_again.c -// RUN: rm %S/ptrTOptrsafemulti1.checkedALL.c %S/ptrTOptrsafemulti2.checkedALL.c -// RUN: rm %S/ptrTOptrsafemulti1.checkedNOALL.c %S/ptrTOptrsafemulti2.checkedNOALL.c -// RUN: rm %S/ptrTOptrsafemulti1.checked.c %S/ptrTOptrsafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/ptrTOptrsafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/ptrTOptrsafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c ptrTOptrsafemulti1.c ptrTOptrsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/ptrTOptrsafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/ptrTOptrsafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/ptrTOptrsafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/ptrTOptrsafemulti1.c %t.checked/ptrTOptrsafemulti2.c -- +// RUN: test ! -f %t.convert_again/ptrTOptrsafemulti1.c +// RUN: test ! -f %t.convert_again/ptrTOptrsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrsafemulti2.c b/clang/test/3C/ptrTOptrsafemulti2.c index c2c28983983d..0d31f6666e7d 100644 --- a/clang/test/3C/ptrTOptrsafemulti2.c +++ b/clang/test/3C/ptrTOptrsafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/ptrTOptrsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/ptrTOptrsafemulti1.c %s -// RUN: %clang -c %S/ptrTOptrsafemulti1.checkedNOALL2.c %S/ptrTOptrsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/ptrTOptrsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrsafemulti1.checked2.c %S/ptrTOptrsafemulti2.checked2.c -// RUN: test ! -f %S/ptrTOptrsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/ptrTOptrsafemulti2.checked2.convert_again.c -// RUN: rm %S/ptrTOptrsafemulti1.checkedALL2.c %S/ptrTOptrsafemulti2.checkedALL2.c -// RUN: rm %S/ptrTOptrsafemulti1.checkedNOALL2.c %S/ptrTOptrsafemulti2.checkedNOALL2.c -// RUN: rm %S/ptrTOptrsafemulti1.checked2.c %S/ptrTOptrsafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/ptrTOptrsafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/ptrTOptrsafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c ptrTOptrsafemulti1.c ptrTOptrsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/ptrTOptrsafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/ptrTOptrsafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/ptrTOptrsafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/ptrTOptrsafemulti1.c %t.checked/ptrTOptrsafemulti2.c -- +// RUN: test ! -f %t.convert_again/ptrTOptrsafemulti1.c +// RUN: test ! -f %t.convert_again/ptrTOptrsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/ptr_array.c b/clang/test/3C/ptr_array.c index fd53dec752b7..cf68e21ca84f 100644 --- a/clang/test/3C/ptr_array.c +++ b/clang/test/3C/ptr_array.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/ptr_array.checked.c -- | count 0 -// RUN: rm %S/ptr_array.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptr_array.c -- | diff %t.checked/ptr_array.c - /* Tests for issue 60. Array initialization had not been implemented, so wild pointer inside and array initializer did not cause the array to be an array diff --git a/clang/test/3C/realloc.c b/clang/test/3C/realloc.c index 8321ec49de22..a1901a3d7a70 100644 --- a/clang/test/3C/realloc.c +++ b/clang/test/3C/realloc.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/realloc.checked.c -- | count 0 -// RUN: rm %S/realloc.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/realloc.c -- | diff %t.checked/realloc.c - #include diff --git a/clang/test/3C/realloc_complex.c b/clang/test/3C/realloc_complex.c index 75aca97969c9..40b9e966b0dc 100644 --- a/clang/test/3C/realloc_complex.c +++ b/clang/test/3C/realloc_complex.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/realloc_complex.checked.c -- | count 0 -// RUN: rm %S/realloc_complex.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/realloc_complex.c -- | diff %t.checked/realloc_complex.c - /**********************************************************/ /* This file tests the conversion tool's behavior with */ diff --git a/clang/test/3C/refarrsubscript.c b/clang/test/3C/refarrsubscript.c index 30a3dff56d3c..de6c202218f7 100644 --- a/clang/test/3C/refarrsubscript.c +++ b/clang/test/3C/refarrsubscript.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/refarrsubscript.checked.c -- | count 0 -// RUN: rm %S/refarrsubscript.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/refarrsubscript.c -- | diff %t.checked/refarrsubscript.c - int **func(int **p, int *x) { //CHECK_NOALL: int **func(int **p : itype(_Ptr<_Ptr>), _Ptr x) : itype(_Ptr) { diff --git a/clang/test/3C/return_not_least.c b/clang/test/3C/return_not_least.c index 0020be84061b..0b98ccd3495b 100644 --- a/clang/test/3C/return_not_least.c +++ b/clang/test/3C/return_not_least.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/return_not_least.checked.c -- | count 0 -// RUN: rm %S/return_not_least.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/return_not_least.c -- | diff %t.checked/return_not_least.c - int *a() { //CHECK_NOALL: int *a(void) : itype(_Ptr) { diff --git a/clang/test/3C/safefptrargboth.c b/clang/test/3C/safefptrargboth.c index 2e2a622a1728..aad22a74dae2 100644 --- a/clang/test/3C/safefptrargboth.c +++ b/clang/test/3C/safefptrargboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargboth.checked.c -- | count 0 -// RUN: rm %S/safefptrargboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/safefptrargboth.c -- | diff %t.checked/safefptrargboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargbothmulti1.c b/clang/test/3C/safefptrargbothmulti1.c index da8a9350a444..e3918c482c01 100644 --- a/clang/test/3C/safefptrargbothmulti1.c +++ b/clang/test/3C/safefptrargbothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/safefptrargbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/safefptrargbothmulti2.c -// RUN: %clang -c %S/safefptrargbothmulti1.checkedNOALL.c %S/safefptrargbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/safefptrargbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargbothmulti1.checked.c %S/safefptrargbothmulti2.checked.c -// RUN: test ! -f %S/safefptrargbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/safefptrargbothmulti2.checked.convert_again.c -// RUN: rm %S/safefptrargbothmulti1.checkedALL.c %S/safefptrargbothmulti2.checkedALL.c -// RUN: rm %S/safefptrargbothmulti1.checkedNOALL.c %S/safefptrargbothmulti2.checkedNOALL.c -// RUN: rm %S/safefptrargbothmulti1.checked.c %S/safefptrargbothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/safefptrargbothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/safefptrargbothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c safefptrargbothmulti1.c safefptrargbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/safefptrargbothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/safefptrargbothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/safefptrargbothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/safefptrargbothmulti1.c %t.checked/safefptrargbothmulti2.c -- +// RUN: test ! -f %t.convert_again/safefptrargbothmulti1.c +// RUN: test ! -f %t.convert_again/safefptrargbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargbothmulti2.c b/clang/test/3C/safefptrargbothmulti2.c index 11cdd8debfad..4c272bae5905 100644 --- a/clang/test/3C/safefptrargbothmulti2.c +++ b/clang/test/3C/safefptrargbothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/safefptrargbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/safefptrargbothmulti1.c %s -// RUN: %clang -c %S/safefptrargbothmulti1.checkedNOALL2.c %S/safefptrargbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/safefptrargbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargbothmulti1.checked2.c %S/safefptrargbothmulti2.checked2.c -// RUN: test ! -f %S/safefptrargbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/safefptrargbothmulti2.checked2.convert_again.c -// RUN: rm %S/safefptrargbothmulti1.checkedALL2.c %S/safefptrargbothmulti2.checkedALL2.c -// RUN: rm %S/safefptrargbothmulti1.checkedNOALL2.c %S/safefptrargbothmulti2.checkedNOALL2.c -// RUN: rm %S/safefptrargbothmulti1.checked2.c %S/safefptrargbothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/safefptrargbothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/safefptrargbothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c safefptrargbothmulti1.c safefptrargbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/safefptrargbothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/safefptrargbothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/safefptrargbothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/safefptrargbothmulti1.c %t.checked/safefptrargbothmulti2.c -- +// RUN: test ! -f %t.convert_again/safefptrargbothmulti1.c +// RUN: test ! -f %t.convert_again/safefptrargbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcallee.c b/clang/test/3C/safefptrargcallee.c index afeaf44c1d92..3bd57ce7e218 100644 --- a/clang/test/3C/safefptrargcallee.c +++ b/clang/test/3C/safefptrargcallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargcallee.checked.c -- | count 0 -// RUN: rm %S/safefptrargcallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/safefptrargcallee.c -- | diff %t.checked/safefptrargcallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcalleemulti1.c b/clang/test/3C/safefptrargcalleemulti1.c index 5a149a569af3..f51cb0fde41c 100644 --- a/clang/test/3C/safefptrargcalleemulti1.c +++ b/clang/test/3C/safefptrargcalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/safefptrargcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/safefptrargcalleemulti2.c -// RUN: %clang -c %S/safefptrargcalleemulti1.checkedNOALL.c %S/safefptrargcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/safefptrargcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargcalleemulti1.checked.c %S/safefptrargcalleemulti2.checked.c -// RUN: test ! -f %S/safefptrargcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/safefptrargcalleemulti2.checked.convert_again.c -// RUN: rm %S/safefptrargcalleemulti1.checkedALL.c %S/safefptrargcalleemulti2.checkedALL.c -// RUN: rm %S/safefptrargcalleemulti1.checkedNOALL.c %S/safefptrargcalleemulti2.checkedNOALL.c -// RUN: rm %S/safefptrargcalleemulti1.checked.c %S/safefptrargcalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/safefptrargcalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/safefptrargcalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c safefptrargcalleemulti1.c safefptrargcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/safefptrargcalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/safefptrargcalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/safefptrargcalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/safefptrargcalleemulti1.c %t.checked/safefptrargcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/safefptrargcalleemulti1.c +// RUN: test ! -f %t.convert_again/safefptrargcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcalleemulti2.c b/clang/test/3C/safefptrargcalleemulti2.c index b8402f8a7a95..f45afc873821 100644 --- a/clang/test/3C/safefptrargcalleemulti2.c +++ b/clang/test/3C/safefptrargcalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/safefptrargcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/safefptrargcalleemulti1.c %s -// RUN: %clang -c %S/safefptrargcalleemulti1.checkedNOALL2.c %S/safefptrargcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/safefptrargcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargcalleemulti1.checked2.c %S/safefptrargcalleemulti2.checked2.c -// RUN: test ! -f %S/safefptrargcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/safefptrargcalleemulti2.checked2.convert_again.c -// RUN: rm %S/safefptrargcalleemulti1.checkedALL2.c %S/safefptrargcalleemulti2.checkedALL2.c -// RUN: rm %S/safefptrargcalleemulti1.checkedNOALL2.c %S/safefptrargcalleemulti2.checkedNOALL2.c -// RUN: rm %S/safefptrargcalleemulti1.checked2.c %S/safefptrargcalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/safefptrargcalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/safefptrargcalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c safefptrargcalleemulti1.c safefptrargcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/safefptrargcalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/safefptrargcalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/safefptrargcalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/safefptrargcalleemulti1.c %t.checked/safefptrargcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/safefptrargcalleemulti1.c +// RUN: test ! -f %t.convert_again/safefptrargcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcaller.c b/clang/test/3C/safefptrargcaller.c index 7531e7b975f6..5c056b2bb7ea 100644 --- a/clang/test/3C/safefptrargcaller.c +++ b/clang/test/3C/safefptrargcaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargcaller.checked.c -- | count 0 -// RUN: rm %S/safefptrargcaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/safefptrargcaller.c -- | diff %t.checked/safefptrargcaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcallermulti1.c b/clang/test/3C/safefptrargcallermulti1.c index be3147533fc0..f44ebc9f6056 100644 --- a/clang/test/3C/safefptrargcallermulti1.c +++ b/clang/test/3C/safefptrargcallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/safefptrargcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/safefptrargcallermulti2.c -// RUN: %clang -c %S/safefptrargcallermulti1.checkedNOALL.c %S/safefptrargcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/safefptrargcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargcallermulti1.checked.c %S/safefptrargcallermulti2.checked.c -// RUN: test ! -f %S/safefptrargcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/safefptrargcallermulti2.checked.convert_again.c -// RUN: rm %S/safefptrargcallermulti1.checkedALL.c %S/safefptrargcallermulti2.checkedALL.c -// RUN: rm %S/safefptrargcallermulti1.checkedNOALL.c %S/safefptrargcallermulti2.checkedNOALL.c -// RUN: rm %S/safefptrargcallermulti1.checked.c %S/safefptrargcallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/safefptrargcallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/safefptrargcallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c safefptrargcallermulti1.c safefptrargcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/safefptrargcallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/safefptrargcallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/safefptrargcallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/safefptrargcallermulti1.c %t.checked/safefptrargcallermulti2.c -- +// RUN: test ! -f %t.convert_again/safefptrargcallermulti1.c +// RUN: test ! -f %t.convert_again/safefptrargcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcallermulti2.c b/clang/test/3C/safefptrargcallermulti2.c index 5d9e7ca6b1f4..5f5538ad1edd 100644 --- a/clang/test/3C/safefptrargcallermulti2.c +++ b/clang/test/3C/safefptrargcallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/safefptrargcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/safefptrargcallermulti1.c %s -// RUN: %clang -c %S/safefptrargcallermulti1.checkedNOALL2.c %S/safefptrargcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/safefptrargcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargcallermulti1.checked2.c %S/safefptrargcallermulti2.checked2.c -// RUN: test ! -f %S/safefptrargcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/safefptrargcallermulti2.checked2.convert_again.c -// RUN: rm %S/safefptrargcallermulti1.checkedALL2.c %S/safefptrargcallermulti2.checkedALL2.c -// RUN: rm %S/safefptrargcallermulti1.checkedNOALL2.c %S/safefptrargcallermulti2.checkedNOALL2.c -// RUN: rm %S/safefptrargcallermulti1.checked2.c %S/safefptrargcallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/safefptrargcallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/safefptrargcallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c safefptrargcallermulti1.c safefptrargcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/safefptrargcallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/safefptrargcallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/safefptrargcallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/safefptrargcallermulti1.c %t.checked/safefptrargcallermulti2.c -- +// RUN: test ! -f %t.convert_again/safefptrargcallermulti1.c +// RUN: test ! -f %t.convert_again/safefptrargcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargprotoboth.c b/clang/test/3C/safefptrargprotoboth.c index 4844375c2dec..9e216c690962 100644 --- a/clang/test/3C/safefptrargprotoboth.c +++ b/clang/test/3C/safefptrargprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargprotoboth.checked.c -- | count 0 -// RUN: rm %S/safefptrargprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/safefptrargprotoboth.c -- | diff %t.checked/safefptrargprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargprotocallee.c b/clang/test/3C/safefptrargprotocallee.c index 40e2a77e8e91..fc4e30151d01 100644 --- a/clang/test/3C/safefptrargprotocallee.c +++ b/clang/test/3C/safefptrargprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargprotocallee.checked.c -- | count 0 -// RUN: rm %S/safefptrargprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/safefptrargprotocallee.c -- | diff %t.checked/safefptrargprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargprotocaller.c b/clang/test/3C/safefptrargprotocaller.c index 5c11921c714a..0950fcb4798c 100644 --- a/clang/test/3C/safefptrargprotocaller.c +++ b/clang/test/3C/safefptrargprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargprotocaller.checked.c -- | count 0 -// RUN: rm %S/safefptrargprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/safefptrargprotocaller.c -- | diff %t.checked/safefptrargprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargprotosafe.c b/clang/test/3C/safefptrargprotosafe.c index ba52bbeedc60..59b7ffff7a01 100644 --- a/clang/test/3C/safefptrargprotosafe.c +++ b/clang/test/3C/safefptrargprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargprotosafe.checked.c -- | count 0 -// RUN: rm %S/safefptrargprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/safefptrargprotosafe.c -- | diff %t.checked/safefptrargprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargsafe.c b/clang/test/3C/safefptrargsafe.c index 53975d16fc7f..ac8de95d6a78 100644 --- a/clang/test/3C/safefptrargsafe.c +++ b/clang/test/3C/safefptrargsafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargsafe.checked.c -- | count 0 -// RUN: rm %S/safefptrargsafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/safefptrargsafe.c -- | diff %t.checked/safefptrargsafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargsafemulti1.c b/clang/test/3C/safefptrargsafemulti1.c index bf1f2ee797e8..cc1fdcdabe2c 100644 --- a/clang/test/3C/safefptrargsafemulti1.c +++ b/clang/test/3C/safefptrargsafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/safefptrargsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/safefptrargsafemulti2.c -// RUN: %clang -c %S/safefptrargsafemulti1.checkedNOALL.c %S/safefptrargsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/safefptrargsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargsafemulti1.checked.c %S/safefptrargsafemulti2.checked.c -// RUN: test ! -f %S/safefptrargsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/safefptrargsafemulti2.checked.convert_again.c -// RUN: rm %S/safefptrargsafemulti1.checkedALL.c %S/safefptrargsafemulti2.checkedALL.c -// RUN: rm %S/safefptrargsafemulti1.checkedNOALL.c %S/safefptrargsafemulti2.checkedNOALL.c -// RUN: rm %S/safefptrargsafemulti1.checked.c %S/safefptrargsafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/safefptrargsafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/safefptrargsafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c safefptrargsafemulti1.c safefptrargsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/safefptrargsafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/safefptrargsafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/safefptrargsafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/safefptrargsafemulti1.c %t.checked/safefptrargsafemulti2.c -- +// RUN: test ! -f %t.convert_again/safefptrargsafemulti1.c +// RUN: test ! -f %t.convert_again/safefptrargsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargsafemulti2.c b/clang/test/3C/safefptrargsafemulti2.c index 72b4e750017c..7dde7e880f13 100644 --- a/clang/test/3C/safefptrargsafemulti2.c +++ b/clang/test/3C/safefptrargsafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/safefptrargsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/safefptrargsafemulti1.c %s -// RUN: %clang -c %S/safefptrargsafemulti1.checkedNOALL2.c %S/safefptrargsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/safefptrargsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargsafemulti1.checked2.c %S/safefptrargsafemulti2.checked2.c -// RUN: test ! -f %S/safefptrargsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/safefptrargsafemulti2.checked2.convert_again.c -// RUN: rm %S/safefptrargsafemulti1.checkedALL2.c %S/safefptrargsafemulti2.checkedALL2.c -// RUN: rm %S/safefptrargsafemulti1.checkedNOALL2.c %S/safefptrargsafemulti2.checkedNOALL2.c -// RUN: rm %S/safefptrargsafemulti1.checked2.c %S/safefptrargsafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/safefptrargsafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/safefptrargsafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c safefptrargsafemulti1.c safefptrargsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/safefptrargsafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/safefptrargsafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/safefptrargsafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/safefptrargsafemulti1.c %t.checked/safefptrargsafemulti2.c -- +// RUN: test ! -f %t.convert_again/safefptrargsafemulti1.c +// RUN: test ! -f %t.convert_again/safefptrargsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/single_ptr_calloc.c b/clang/test/3C/single_ptr_calloc.c index e235f6f76a69..18d5e07942f3 100644 --- a/clang/test/3C/single_ptr_calloc.c +++ b/clang/test/3C/single_ptr_calloc.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/single_ptr_calloc.checked.c -- | count 0 -// RUN: rm %S/single_ptr_calloc.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/single_ptr_calloc.c -- | diff %t.checked/single_ptr_calloc.c - #include diff --git a/clang/test/3C/subtyp.c b/clang/test/3C/subtyp.c index 0ade3c53cf1c..a9b31b686523 100644 --- a/clang/test/3C/subtyp.c +++ b/clang/test/3C/subtyp.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/subtyp.checked.c -- | count 0 -// RUN: rm %S/subtyp.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/subtyp.c -- | diff %t.checked/subtyp.c - void take(int *p : itype(_Nt_array_ptr)); //CHECK: void take(int *p : itype(_Nt_array_ptr)); diff --git a/clang/test/3C/unsafefptrargboth.c b/clang/test/3C/unsafefptrargboth.c index ba1398ec8e29..7e1b9bcec8f7 100644 --- a/clang/test/3C/unsafefptrargboth.c +++ b/clang/test/3C/unsafefptrargboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/unsafefptrargboth.checked.c -- | count 0 -// RUN: rm %S/unsafefptrargboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/unsafefptrargboth.c -- | diff %t.checked/unsafefptrargboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargbothmulti1.c b/clang/test/3C/unsafefptrargbothmulti1.c index febfcc9569c3..f1110134aec5 100644 --- a/clang/test/3C/unsafefptrargbothmulti1.c +++ b/clang/test/3C/unsafefptrargbothmulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/unsafefptrargbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/unsafefptrargbothmulti2.c -// RUN: %clang -c %S/unsafefptrargbothmulti1.checkedNOALL.c %S/unsafefptrargbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/unsafefptrargbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/unsafefptrargbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/unsafefptrargbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/unsafefptrargbothmulti1.checked.c %S/unsafefptrargbothmulti2.checked.c -// RUN: test ! -f %S/unsafefptrargbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/unsafefptrargbothmulti2.checked.convert_again.c -// RUN: rm %S/unsafefptrargbothmulti1.checkedALL.c %S/unsafefptrargbothmulti2.checkedALL.c -// RUN: rm %S/unsafefptrargbothmulti1.checkedNOALL.c %S/unsafefptrargbothmulti2.checkedNOALL.c -// RUN: rm %S/unsafefptrargbothmulti1.checked.c %S/unsafefptrargbothmulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/unsafefptrargbothmulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/unsafefptrargbothmulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c unsafefptrargbothmulti1.c unsafefptrargbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/unsafefptrargbothmulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/unsafefptrargbothmulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/unsafefptrargbothmulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/unsafefptrargbothmulti1.c %t.checked/unsafefptrargbothmulti2.c -- +// RUN: test ! -f %t.convert_again/unsafefptrargbothmulti1.c +// RUN: test ! -f %t.convert_again/unsafefptrargbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargbothmulti2.c b/clang/test/3C/unsafefptrargbothmulti2.c index b512d5ca9586..ff8aa7a89089 100644 --- a/clang/test/3C/unsafefptrargbothmulti2.c +++ b/clang/test/3C/unsafefptrargbothmulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/unsafefptrargbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/unsafefptrargbothmulti1.c %s -// RUN: %clang -c %S/unsafefptrargbothmulti1.checkedNOALL2.c %S/unsafefptrargbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/unsafefptrargbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/unsafefptrargbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/unsafefptrargbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/unsafefptrargbothmulti1.checked2.c %S/unsafefptrargbothmulti2.checked2.c -// RUN: test ! -f %S/unsafefptrargbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/unsafefptrargbothmulti2.checked2.convert_again.c -// RUN: rm %S/unsafefptrargbothmulti1.checkedALL2.c %S/unsafefptrargbothmulti2.checkedALL2.c -// RUN: rm %S/unsafefptrargbothmulti1.checkedNOALL2.c %S/unsafefptrargbothmulti2.checkedNOALL2.c -// RUN: rm %S/unsafefptrargbothmulti1.checked2.c %S/unsafefptrargbothmulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/unsafefptrargbothmulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/unsafefptrargbothmulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c unsafefptrargbothmulti1.c unsafefptrargbothmulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/unsafefptrargbothmulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/unsafefptrargbothmulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/unsafefptrargbothmulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/unsafefptrargbothmulti1.c %t.checked/unsafefptrargbothmulti2.c -- +// RUN: test ! -f %t.convert_again/unsafefptrargbothmulti1.c +// RUN: test ! -f %t.convert_again/unsafefptrargbothmulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargcallee.c b/clang/test/3C/unsafefptrargcallee.c index 15941da5ec20..451817da6017 100644 --- a/clang/test/3C/unsafefptrargcallee.c +++ b/clang/test/3C/unsafefptrargcallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/unsafefptrargcallee.checked.c -- | count 0 -// RUN: rm %S/unsafefptrargcallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/unsafefptrargcallee.c -- | diff %t.checked/unsafefptrargcallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargcalleemulti1.c b/clang/test/3C/unsafefptrargcalleemulti1.c index 43ffd800a4c1..7ff82c50b5e5 100644 --- a/clang/test/3C/unsafefptrargcalleemulti1.c +++ b/clang/test/3C/unsafefptrargcalleemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/unsafefptrargcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/unsafefptrargcalleemulti2.c -// RUN: %clang -c %S/unsafefptrargcalleemulti1.checkedNOALL.c %S/unsafefptrargcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/unsafefptrargcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/unsafefptrargcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/unsafefptrargcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/unsafefptrargcalleemulti1.checked.c %S/unsafefptrargcalleemulti2.checked.c -// RUN: test ! -f %S/unsafefptrargcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/unsafefptrargcalleemulti2.checked.convert_again.c -// RUN: rm %S/unsafefptrargcalleemulti1.checkedALL.c %S/unsafefptrargcalleemulti2.checkedALL.c -// RUN: rm %S/unsafefptrargcalleemulti1.checkedNOALL.c %S/unsafefptrargcalleemulti2.checkedNOALL.c -// RUN: rm %S/unsafefptrargcalleemulti1.checked.c %S/unsafefptrargcalleemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/unsafefptrargcalleemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/unsafefptrargcalleemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c unsafefptrargcalleemulti1.c unsafefptrargcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/unsafefptrargcalleemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/unsafefptrargcalleemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/unsafefptrargcalleemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/unsafefptrargcalleemulti1.c %t.checked/unsafefptrargcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/unsafefptrargcalleemulti1.c +// RUN: test ! -f %t.convert_again/unsafefptrargcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargcalleemulti2.c b/clang/test/3C/unsafefptrargcalleemulti2.c index 21cfb1321d57..6b896c4616af 100644 --- a/clang/test/3C/unsafefptrargcalleemulti2.c +++ b/clang/test/3C/unsafefptrargcalleemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/unsafefptrargcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/unsafefptrargcalleemulti1.c %s -// RUN: %clang -c %S/unsafefptrargcalleemulti1.checkedNOALL2.c %S/unsafefptrargcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/unsafefptrargcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/unsafefptrargcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/unsafefptrargcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/unsafefptrargcalleemulti1.checked2.c %S/unsafefptrargcalleemulti2.checked2.c -// RUN: test ! -f %S/unsafefptrargcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/unsafefptrargcalleemulti2.checked2.convert_again.c -// RUN: rm %S/unsafefptrargcalleemulti1.checkedALL2.c %S/unsafefptrargcalleemulti2.checkedALL2.c -// RUN: rm %S/unsafefptrargcalleemulti1.checkedNOALL2.c %S/unsafefptrargcalleemulti2.checkedNOALL2.c -// RUN: rm %S/unsafefptrargcalleemulti1.checked2.c %S/unsafefptrargcalleemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/unsafefptrargcalleemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/unsafefptrargcalleemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c unsafefptrargcalleemulti1.c unsafefptrargcalleemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/unsafefptrargcalleemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/unsafefptrargcalleemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/unsafefptrargcalleemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/unsafefptrargcalleemulti1.c %t.checked/unsafefptrargcalleemulti2.c -- +// RUN: test ! -f %t.convert_again/unsafefptrargcalleemulti1.c +// RUN: test ! -f %t.convert_again/unsafefptrargcalleemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargcaller.c b/clang/test/3C/unsafefptrargcaller.c index 2e84c8ac1b7d..2503ae2f183d 100644 --- a/clang/test/3C/unsafefptrargcaller.c +++ b/clang/test/3C/unsafefptrargcaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/unsafefptrargcaller.checked.c -- | count 0 -// RUN: rm %S/unsafefptrargcaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/unsafefptrargcaller.c -- | diff %t.checked/unsafefptrargcaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargcallermulti1.c b/clang/test/3C/unsafefptrargcallermulti1.c index 5dfc4b0d7d50..a5a3165feadf 100644 --- a/clang/test/3C/unsafefptrargcallermulti1.c +++ b/clang/test/3C/unsafefptrargcallermulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/unsafefptrargcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/unsafefptrargcallermulti2.c -// RUN: %clang -c %S/unsafefptrargcallermulti1.checkedNOALL.c %S/unsafefptrargcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/unsafefptrargcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/unsafefptrargcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/unsafefptrargcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/unsafefptrargcallermulti1.checked.c %S/unsafefptrargcallermulti2.checked.c -// RUN: test ! -f %S/unsafefptrargcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/unsafefptrargcallermulti2.checked.convert_again.c -// RUN: rm %S/unsafefptrargcallermulti1.checkedALL.c %S/unsafefptrargcallermulti2.checkedALL.c -// RUN: rm %S/unsafefptrargcallermulti1.checkedNOALL.c %S/unsafefptrargcallermulti2.checkedNOALL.c -// RUN: rm %S/unsafefptrargcallermulti1.checked.c %S/unsafefptrargcallermulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/unsafefptrargcallermulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/unsafefptrargcallermulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c unsafefptrargcallermulti1.c unsafefptrargcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/unsafefptrargcallermulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/unsafefptrargcallermulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/unsafefptrargcallermulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/unsafefptrargcallermulti1.c %t.checked/unsafefptrargcallermulti2.c -- +// RUN: test ! -f %t.convert_again/unsafefptrargcallermulti1.c +// RUN: test ! -f %t.convert_again/unsafefptrargcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargcallermulti2.c b/clang/test/3C/unsafefptrargcallermulti2.c index 79afd4d04a38..f2a9ac0e663a 100644 --- a/clang/test/3C/unsafefptrargcallermulti2.c +++ b/clang/test/3C/unsafefptrargcallermulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/unsafefptrargcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/unsafefptrargcallermulti1.c %s -// RUN: %clang -c %S/unsafefptrargcallermulti1.checkedNOALL2.c %S/unsafefptrargcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/unsafefptrargcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/unsafefptrargcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/unsafefptrargcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/unsafefptrargcallermulti1.checked2.c %S/unsafefptrargcallermulti2.checked2.c -// RUN: test ! -f %S/unsafefptrargcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/unsafefptrargcallermulti2.checked2.convert_again.c -// RUN: rm %S/unsafefptrargcallermulti1.checkedALL2.c %S/unsafefptrargcallermulti2.checkedALL2.c -// RUN: rm %S/unsafefptrargcallermulti1.checkedNOALL2.c %S/unsafefptrargcallermulti2.checkedNOALL2.c -// RUN: rm %S/unsafefptrargcallermulti1.checked2.c %S/unsafefptrargcallermulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/unsafefptrargcallermulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/unsafefptrargcallermulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c unsafefptrargcallermulti1.c unsafefptrargcallermulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/unsafefptrargcallermulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/unsafefptrargcallermulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/unsafefptrargcallermulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/unsafefptrargcallermulti1.c %t.checked/unsafefptrargcallermulti2.c -- +// RUN: test ! -f %t.convert_again/unsafefptrargcallermulti1.c +// RUN: test ! -f %t.convert_again/unsafefptrargcallermulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargprotoboth.c b/clang/test/3C/unsafefptrargprotoboth.c index ad5c4d73ef81..7c40062126a9 100644 --- a/clang/test/3C/unsafefptrargprotoboth.c +++ b/clang/test/3C/unsafefptrargprotoboth.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/unsafefptrargprotoboth.checked.c -- | count 0 -// RUN: rm %S/unsafefptrargprotoboth.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/unsafefptrargprotoboth.c -- | diff %t.checked/unsafefptrargprotoboth.c - /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargprotocallee.c b/clang/test/3C/unsafefptrargprotocallee.c index e7cef3635a0c..d00813b46dd4 100644 --- a/clang/test/3C/unsafefptrargprotocallee.c +++ b/clang/test/3C/unsafefptrargprotocallee.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/unsafefptrargprotocallee.checked.c -- | count 0 -// RUN: rm %S/unsafefptrargprotocallee.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/unsafefptrargprotocallee.c -- | diff %t.checked/unsafefptrargprotocallee.c - /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargprotocaller.c b/clang/test/3C/unsafefptrargprotocaller.c index 081065085987..a041b3e117aa 100644 --- a/clang/test/3C/unsafefptrargprotocaller.c +++ b/clang/test/3C/unsafefptrargprotocaller.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/unsafefptrargprotocaller.checked.c -- | count 0 -// RUN: rm %S/unsafefptrargprotocaller.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/unsafefptrargprotocaller.c -- | diff %t.checked/unsafefptrargprotocaller.c - /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargprotosafe.c b/clang/test/3C/unsafefptrargprotosafe.c index ced38ff2fe1d..6649014b664e 100644 --- a/clang/test/3C/unsafefptrargprotosafe.c +++ b/clang/test/3C/unsafefptrargprotosafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/unsafefptrargprotosafe.checked.c -- | count 0 -// RUN: rm %S/unsafefptrargprotosafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/unsafefptrargprotosafe.c -- | diff %t.checked/unsafefptrargprotosafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargsafe.c b/clang/test/3C/unsafefptrargsafe.c index 0914eaec3537..073e481d7198 100644 --- a/clang/test/3C/unsafefptrargsafe.c +++ b/clang/test/3C/unsafefptrargsafe.c @@ -1,10 +1,10 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/unsafefptrargsafe.checked.c -- | count 0 -// RUN: rm %S/unsafefptrargsafe.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/unsafefptrargsafe.c -- | diff %t.checked/unsafefptrargsafe.c - /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargsafemulti1.c b/clang/test/3C/unsafefptrargsafemulti1.c index 5835fed43780..81b273ec1775 100644 --- a/clang/test/3C/unsafefptrargsafemulti1.c +++ b/clang/test/3C/unsafefptrargsafemulti1.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/unsafefptrargsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/unsafefptrargsafemulti2.c -// RUN: %clang -c %S/unsafefptrargsafemulti1.checkedNOALL.c %S/unsafefptrargsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/unsafefptrargsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/unsafefptrargsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/unsafefptrargsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/unsafefptrargsafemulti1.checked.c %S/unsafefptrargsafemulti2.checked.c -// RUN: test ! -f %S/unsafefptrargsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/unsafefptrargsafemulti2.checked.convert_again.c -// RUN: rm %S/unsafefptrargsafemulti1.checkedALL.c %S/unsafefptrargsafemulti2.checkedALL.c -// RUN: rm %S/unsafefptrargsafemulti1.checkedNOALL.c %S/unsafefptrargsafemulti2.checkedNOALL.c -// RUN: rm %S/unsafefptrargsafemulti1.checked.c %S/unsafefptrargsafemulti2.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL %s %S/unsafefptrargsafemulti2.c -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL %s %S/unsafefptrargsafemulti2.c -- +// RUN: %clang -working-directory=%t.checkedNOALL -c unsafefptrargsafemulti1.c unsafefptrargsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/unsafefptrargsafemulti1.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/unsafefptrargsafemulti1.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/unsafefptrargsafemulti2.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/unsafefptrargsafemulti1.c %t.checked/unsafefptrargsafemulti2.c -- +// RUN: test ! -f %t.convert_again/unsafefptrargsafemulti1.c +// RUN: test ! -f %t.convert_again/unsafefptrargsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/unsafefptrargsafemulti2.c b/clang/test/3C/unsafefptrargsafemulti2.c index 746819eb02c0..2d01e461a831 100644 --- a/clang/test/3C/unsafefptrargsafemulti2.c +++ b/clang/test/3C/unsafefptrargsafemulti2.c @@ -1,15 +1,13 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/unsafefptrargsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/unsafefptrargsafemulti1.c %s -// RUN: %clang -c %S/unsafefptrargsafemulti1.checkedNOALL2.c %S/unsafefptrargsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/unsafefptrargsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/unsafefptrargsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/unsafefptrargsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/unsafefptrargsafemulti1.checked2.c %S/unsafefptrargsafemulti2.checked2.c -// RUN: test ! -f %S/unsafefptrargsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/unsafefptrargsafemulti2.checked2.convert_again.c -// RUN: rm %S/unsafefptrargsafemulti1.checkedALL2.c %S/unsafefptrargsafemulti2.checkedALL2.c -// RUN: rm %S/unsafefptrargsafemulti1.checkedNOALL2.c %S/unsafefptrargsafemulti2.checkedNOALL2.c -// RUN: rm %S/unsafefptrargsafemulti1.checked2.c %S/unsafefptrargsafemulti2.checked2.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checkedALL2 %S/unsafefptrargsafemulti1.c %s -- +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checkedNOALL2 %S/unsafefptrargsafemulti1.c %s -- +// RUN: %clang -working-directory=%t.checkedNOALL2 -c unsafefptrargsafemulti1.c unsafefptrargsafemulti2.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL2/unsafefptrargsafemulti2.c %s +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL2/unsafefptrargsafemulti2.c %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %S/unsafefptrargsafemulti1.c %s -- +// RUN: 3c -base-dir=%t.checked -alltypes -output-dir=%t.convert_again %t.checked/unsafefptrargsafemulti1.c %t.checked/unsafefptrargsafemulti2.c -- +// RUN: test ! -f %t.convert_again/unsafefptrargsafemulti1.c +// RUN: test ! -f %t.convert_again/unsafefptrargsafemulti2.c /*********************************************************************************/ diff --git a/clang/test/3C/unsafeunion.c b/clang/test/3C/unsafeunion.c index 436f5d2a4c7a..06764a613c0d 100644 --- a/clang/test/3C/unsafeunion.c +++ b/clang/test/3C/unsafeunion.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/unsafeunion.checked.c -- | count 0 -// RUN: rm %S/unsafeunion.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/unsafeunion.c -- | diff %t.checked/unsafeunion.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/unsigned_signed_cast.c b/clang/test/3C/unsigned_signed_cast.c index ad9df747128e..2f6172162919 100644 --- a/clang/test/3C/unsigned_signed_cast.c +++ b/clang/test/3C/unsigned_signed_cast.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/unsigned_signed_cast.checked.c -- | count 0 -// RUN: rm %S/unsigned_signed_cast.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/unsigned_signed_cast.c -- | diff %t.checked/unsigned_signed_cast.c - /*unsigned integer cast*/ diff --git a/clang/test/3C/valist.c b/clang/test/3C/valist.c index 09a678e31738..11ed61467196 100644 --- a/clang/test/3C/valist.c +++ b/clang/test/3C/valist.c @@ -1,9 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/valist.checked.c -- | count 0 -// RUN: rm %S/valist.checked.c +// RUN: rm -rf %t* +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/valist.c -- | diff %t.checked/valist.c - #include typedef int lua_State; From b245b59db872f09fed89aa98069f57d3f01c52e8 Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Tue, 9 Feb 2021 21:15:02 -0500 Subject: [PATCH 05/12] Update RUN commands of unmanaged tests. This was partially scripted, but there are enough special cases that it deserves some manual review. typedefs, typedefbounds: Turn the commented-out commands for an idempotence test into a real test, since it passes. Addition of "rm -rf %t*" lines is split into a separate commit to make this diff easier for naive diff tools (e.g., GitHub) to review by avoiding breaking the alignment of corresponding old and new commands. --- clang/test/3C/addrof_crash.c | 4 ++-- clang/test/3C/allarrays.c | 4 ++-- clang/test/3C/alloc_type_param.c | 11 +++++------ clang/test/3C/allocator.c | 9 ++++----- clang/test/3C/alreadychecked.c | 9 ++++----- clang/test/3C/arrboundsadvanced.c | 4 ++-- clang/test/3C/arrboundsbasic.c | 4 ++-- clang/test/3C/arrboundsbasicinfer.c | 4 ++-- clang/test/3C/arrboundsbyte.c | 4 ++-- clang/test/3C/arrboundsheuristics.c | 8 ++++---- clang/test/3C/arrboundsinfer2.c | 4 ++-- clang/test/3C/arrtests_xfail.c | 4 ++-- clang/test/3C/basic.c | 6 +++--- clang/test/3C/basic_checks.c | 6 +++--- clang/test/3C/basic_inter.c | 4 ++-- clang/test/3C/basic_inter_field.c | 4 ++-- clang/test/3C/basic_inter_field_arr.c | 4 ++-- clang/test/3C/basic_inter_field_ntarr.c | 4 ++-- clang/test/3C/basic_inter_ntarr.c | 4 ++-- clang/test/3C/basic_local_field.c | 4 ++-- clang/test/3C/basic_local_ntarr.c | 4 ++-- clang/test/3C/basic_return_itype.c | 4 ++-- clang/test/3C/bodiless.c | 2 +- clang/test/3C/boundary_tests.c | 9 ++++----- clang/test/3C/bounds_interface.c | 9 ++++----- clang/test/3C/checkedptrret.c | 4 ++-- clang/test/3C/checkedregioninterweave.c | 4 ++-- clang/test/3C/checkedregionsitypeparams.c | 4 ++-- clang/test/3C/checkedregionvariadicBUG.c | 4 ++-- clang/test/3C/checkedregionvoid.c | 4 ++-- clang/test/3C/complex_expression.c | 11 +++++------ clang/test/3C/const_tests.c | 9 ++++----- clang/test/3C/contextsensitivebounds.c | 8 ++++---- clang/test/3C/contextsensitivebounds1.c | 8 ++++---- clang/test/3C/definedType.c | 11 +++++------ clang/test/3C/defn_then_decl.c | 11 +++++------ clang/test/3C/difftypes_xfail1.c | 2 +- clang/test/3C/difftypes_xfail2.c | 2 +- clang/test/3C/dont_rewrite.c | 6 +++--- clang/test/3C/dont_rewrite_header.c | 14 +++++++------- clang/test/3C/extGVarbar1.c | 7 +++---- clang/test/3C/extGVarbar2.c | 7 +++---- clang/test/3C/extGVarm1.c | 7 +++---- clang/test/3C/extGVarm2.c | 7 +++---- clang/test/3C/extGVarm3.c | 7 +++---- clang/test/3C/fptr.c | 4 ++-- clang/test/3C/free.c | 6 +++--- clang/test/3C/functionDeclEnd.c | 11 +++++------ clang/test/3C/global.c | 9 ++++----- clang/test/3C/globalschecked.c | 4 ++-- clang/test/3C/hash.c | 4 ++-- clang/test/3C/inline_anon_structs.c | 11 +++++------ clang/test/3C/invalidbounds.c | 6 +++--- clang/test/3C/itypecast.c | 11 +++++------ clang/test/3C/liberal_itypes_fp.c | 11 +++++------ clang/test/3C/liberal_itypes_ptr.c | 11 +++++------ clang/test/3C/liberal_itypes_ptrptr.c | 11 +++++------ clang/test/3C/lowerbound.c | 4 ++-- clang/test/3C/macroConcat.c | 11 +++++------ clang/test/3C/manyprotos.c | 4 ++-- clang/test/3C/multiconstant_bounds.c | 4 ++-- clang/test/3C/multidef_xfail1.c | 2 +- clang/test/3C/multidef_xfail2.c | 2 +- clang/test/3C/multipledecls.c | 9 ++++----- clang/test/3C/multistructdecls.c | 4 ++-- clang/test/3C/multivardecls.c | 11 +++++------ clang/test/3C/no_casts.c | 4 ++-- clang/test/3C/noproto.c | 4 ++-- clang/test/3C/order.c | 4 ++-- clang/test/3C/partial_checked.c | 11 +++++------ clang/test/3C/partial_checked_arr.c | 13 ++++++------- clang/test/3C/patch_issue_272.c | 4 ++-- clang/test/3C/placements.c | 11 +++++------ clang/test/3C/pointerarithm.c | 9 ++++----- clang/test/3C/prototype_success1.c | 7 +++---- clang/test/3C/prototype_success2.c | 7 +++---- clang/test/3C/ptrintBUG.c | 6 +++--- clang/test/3C/ptrptr.c | 11 +++++------ clang/test/3C/ptrtoconstarr.c | 11 +++++------ clang/test/3C/qualifiers.c | 11 +++++------ clang/test/3C/regression_tests_xfail.c | 4 ++-- clang/test/3C/rewrite_header.c | 16 ++++++---------- clang/test/3C/root_cause.c | 2 +- clang/test/3C/simple_locals.c | 11 +++++------ clang/test/3C/some_checked.c | 4 ++-- clang/test/3C/stmtExprA.c | 6 +++--- clang/test/3C/stmtExprBUG.c | 6 +++--- clang/test/3C/stmtexpr.c | 4 ++-- clang/test/3C/struct_init_list.c | 11 +++++------ clang/test/3C/supernested.c | 4 ++-- clang/test/3C/tree.c | 6 +++--- clang/test/3C/type_params.c | 6 +++--- clang/test/3C/type_params_xfail1.c | 2 +- clang/test/3C/typedefbounds.c | 10 ++++------ clang/test/3C/typedefnoptr.c | 4 ++-- clang/test/3C/typedefs.c | 14 ++++++-------- clang/test/3C/uncheckedredundant.c | 4 ++-- clang/test/3C/uncheckedvars.c | 4 ++-- clang/test/3C/untypedprototypes.c | 4 ++-- clang/test/3C/user_malloc.c | 6 +++--- clang/test/3C/vargs.c | 6 +++--- 101 files changed, 312 insertions(+), 355 deletions(-) diff --git a/clang/test/3C/addrof_crash.c b/clang/test/3C/addrof_crash.c index fda656b93e02..4e83a26c0464 100644 --- a/clang/test/3C/addrof_crash.c +++ b/clang/test/3C/addrof_crash.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s -- | FileCheck %s -// RUN: 3c -alltypes %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c - // No conversions expected for these two, they just shouldn't crash diff --git a/clang/test/3C/allarrays.c b/clang/test/3C/allarrays.c index ec55cce7577e..3f8874e1997f 100644 --- a/clang/test/3C/allarrays.c +++ b/clang/test/3C/allarrays.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - int* foo(); //CHECK: _Array_ptr foo(_Array_ptr r); diff --git a/clang/test/3C/alloc_type_param.c b/clang/test/3C/alloc_type_param.c index d3caa865be00..b2f3a5610e43 100644 --- a/clang/test/3C/alloc_type_param.c +++ b/clang/test/3C/alloc_type_param.c @@ -1,9 +1,8 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/alloc_type_param.checked.c -- | count 0 -// RUN: rm %S/alloc_type_param.checked.c +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/alloc_type_param.c -- | diff %t.checked/alloc_type_param.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/allocator.c b/clang/test/3C/allocator.c index 6d730480d1bd..87ce1d8e690c 100644 --- a/clang/test/3C/allocator.c +++ b/clang/test/3C/allocator.c @@ -2,11 +2,10 @@ // // Tests for malloc and friends. // -// RUN: 3c %s -- | FileCheck -match-full-lines %s -// RUN: 3c %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c - -// RUN: 3c -output-postfix=checked %s -// RUN: 3c %S/allocator.checked.c -- | count 0 -// RUN: rm %S/allocator.checked.c +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked %t.checked/allocator.c -- | diff %t.checked/allocator.c - // expected-no-diagnostics // typedef __SIZE_TYPE__ size_t; diff --git a/clang/test/3C/alreadychecked.c b/clang/test/3C/alreadychecked.c index 57082010f08f..4882d0a15d4f 100644 --- a/clang/test/3C/alreadychecked.c +++ b/clang/test/3C/alreadychecked.c @@ -1,8 +1,7 @@ -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/alreadychecked.checked.c -- | count 0 -// RUN: rm %S/alreadychecked.checked.c +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/alreadychecked.c -- | diff %t.checked/alreadychecked.c - int fib(int n) _Checked //CHECK: int fib(int n) _Checked diff --git a/clang/test/3C/arrboundsadvanced.c b/clang/test/3C/arrboundsadvanced.c index e273b90d2add..525d31706983 100644 --- a/clang/test/3C/arrboundsadvanced.c +++ b/clang/test/3C/arrboundsadvanced.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - /* Advanced array-bounds inference (based on control-dependencies). diff --git a/clang/test/3C/arrboundsbasic.c b/clang/test/3C/arrboundsbasic.c index c89b277b0676..047db3feaca9 100644 --- a/clang/test/3C/arrboundsbasic.c +++ b/clang/test/3C/arrboundsbasic.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - /* diff --git a/clang/test/3C/arrboundsbasicinfer.c b/clang/test/3C/arrboundsbasicinfer.c index db7f057c5ac6..b0ca154a4742 100644 --- a/clang/test/3C/arrboundsbasicinfer.c +++ b/clang/test/3C/arrboundsbasicinfer.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - /* diff --git a/clang/test/3C/arrboundsbyte.c b/clang/test/3C/arrboundsbyte.c index 7aa39c3b6c20..a48e93c6f374 100644 --- a/clang/test/3C/arrboundsbyte.c +++ b/clang/test/3C/arrboundsbyte.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - /* diff --git a/clang/test/3C/arrboundsheuristics.c b/clang/test/3C/arrboundsheuristics.c index fd5708e76b34..ca217eda1429 100644 --- a/clang/test/3C/arrboundsheuristics.c +++ b/clang/test/3C/arrboundsheuristics.c @@ -2,10 +2,10 @@ // // Checks wrong array heuristics. // -// RUN: 3c -alltypes %s | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - -// RUN: 3c %s | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t2.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o %t2.unused - int *glob; int lenplusone; diff --git a/clang/test/3C/arrboundsinfer2.c b/clang/test/3C/arrboundsinfer2.c index fa624463afa7..fc140eaf40f3 100644 --- a/clang/test/3C/arrboundsinfer2.c +++ b/clang/test/3C/arrboundsinfer2.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - /* diff --git a/clang/test/3C/arrtests_xfail.c b/clang/test/3C/arrtests_xfail.c index 24a0a03e14f0..477c581d3d66 100644 --- a/clang/test/3C/arrtests_xfail.c +++ b/clang/test/3C/arrtests_xfail.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // XFAIL: * diff --git a/clang/test/3C/basic.c b/clang/test/3C/basic.c index f93c15f5d606..2549c14f7d2c 100644 --- a/clang/test/3C/basic.c +++ b/clang/test/3C/basic.c @@ -1,6 +1,6 @@ -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - #include #include #include diff --git a/clang/test/3C/basic_checks.c b/clang/test/3C/basic_checks.c index 20a04f9bf57f..d36b82186fa4 100644 --- a/clang/test/3C/basic_checks.c +++ b/clang/test/3C/basic_checks.c @@ -3,9 +3,9 @@ // Tests properties about type re-writing and replacement, and simple function // return value stuff. // -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK","CHECK_NEXT" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK","CHECK-NEXT" %s -// RUN: 3c %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK","CHECK_NEXT" %s +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK","CHECK-NEXT" %s +// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - // expected-no-diagnostics // diff --git a/clang/test/3C/basic_inter.c b/clang/test/3C/basic_inter.c index 79211aecadca..85b8108df6fe 100644 --- a/clang/test/3C/basic_inter.c +++ b/clang/test/3C/basic_inter.c @@ -2,8 +2,8 @@ // // Tests properties about constraint propagation between functions. // -// RUN: 3c %s | FileCheck -match-full-lines %s -// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - // int funcdecl(int *ptr, int *iptr, int *wild); diff --git a/clang/test/3C/basic_inter_field.c b/clang/test/3C/basic_inter_field.c index 57069fc59ab7..004164be1ded 100644 --- a/clang/test/3C/basic_inter_field.c +++ b/clang/test/3C/basic_inter_field.c @@ -2,8 +2,8 @@ // // Tests properties about constraint propagation of structure fields // across functions -// RUN: 3c %s -- | FileCheck -match-full-lines %s -// RUN: 3c %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - // expected-no-diagnostics // diff --git a/clang/test/3C/basic_inter_field_arr.c b/clang/test/3C/basic_inter_field_arr.c index d66486b36863..d622ee5e0a45 100644 --- a/clang/test/3C/basic_inter_field_arr.c +++ b/clang/test/3C/basic_inter_field_arr.c @@ -2,8 +2,8 @@ // // Tests properties about arr constraints propagation. // -// RUN: 3c %s -- | FileCheck -match-full-lines %s -// RUN: 3c %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - // expected-no-diagnostics // // This tests the propagation of constraints diff --git a/clang/test/3C/basic_inter_field_ntarr.c b/clang/test/3C/basic_inter_field_ntarr.c index 07869b3e11f1..dd0cb906d391 100644 --- a/clang/test/3C/basic_inter_field_ntarr.c +++ b/clang/test/3C/basic_inter_field_ntarr.c @@ -2,8 +2,8 @@ // // Tests rewriting of Nt_array_ptrs within structure fields -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // unsigned long strlen(const char *s : itype(_Nt_array_ptr)) ; diff --git a/clang/test/3C/basic_inter_ntarr.c b/clang/test/3C/basic_inter_ntarr.c index 1063b4ef9e27..8fbea3a67d46 100644 --- a/clang/test/3C/basic_inter_ntarr.c +++ b/clang/test/3C/basic_inter_ntarr.c @@ -2,8 +2,8 @@ // // Tests rewriting and propagation of Nt_array_ptr constraints across functions. // -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // char *strstr(const char *s1 : itype(_Nt_array_ptr), const char *s2 : itype(_Nt_array_ptr)) : itype(_Nt_array_ptr); diff --git a/clang/test/3C/basic_local_field.c b/clang/test/3C/basic_local_field.c index d19f2d8b696a..40f2da3547c5 100644 --- a/clang/test/3C/basic_local_field.c +++ b/clang/test/3C/basic_local_field.c @@ -2,8 +2,8 @@ // // Tests properties about type re-writing and replacement of structure members // -// RUN: 3c %s -- | FileCheck -match-full-lines %s -// RUN: 3c %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - // expected-no-diagnostics // diff --git a/clang/test/3C/basic_local_ntarr.c b/clang/test/3C/basic_local_ntarr.c index cae3598b9136..ca0f3ead824e 100644 --- a/clang/test/3C/basic_local_ntarr.c +++ b/clang/test/3C/basic_local_ntarr.c @@ -2,8 +2,8 @@ // // Tests basic rewriting of Nt_array_ptrs -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // unsigned long strlen(const char *s : itype(_Nt_array_ptr)); diff --git a/clang/test/3C/basic_return_itype.c b/clang/test/3C/basic_return_itype.c index 5f0981581095..b2ba1b34935b 100644 --- a/clang/test/3C/basic_return_itype.c +++ b/clang/test/3C/basic_return_itype.c @@ -2,8 +2,8 @@ // // Tests properties about rewriter for return type when it is an itype // -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - // static int funcvar; diff --git a/clang/test/3C/bodiless.c b/clang/test/3C/bodiless.c index ba2bc088bf6c..b5421dbb746d 100644 --- a/clang/test/3C/bodiless.c +++ b/clang/test/3C/bodiless.c @@ -1,4 +1,4 @@ -// RUN: 3c %s > %S/temp_bodiless.c +// RUN: 3c -base-dir=%S %s > %S/temp_bodiless.c -- // RUN: %clang -c %S/temp_bodiless.c // RUN: FileCheck -match-full-lines --input-file %S/temp_bodiless.c %s // RUN: rm %S/temp_bodiless.c diff --git a/clang/test/3C/boundary_tests.c b/clang/test/3C/boundary_tests.c index 91d310549cab..2e3ef90d6186 100644 --- a/clang/test/3C/boundary_tests.c +++ b/clang/test/3C/boundary_tests.c @@ -1,10 +1,9 @@ // Tests for 3C. // -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines %s -// RUN: 3c -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - -// RUN: 3c -addcr -output-postfix=checked %s -// RUN: 3c -addcr %S/boundary_tests.checked.c -- | count 0 -// RUN: rm %S/boundary_tests.checked.c +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -addcr %t.checked/boundary_tests.c -- | diff %t.checked/boundary_tests.c - // expected-no-diagnostics void do_something(int *a, int b) { diff --git a/clang/test/3C/bounds_interface.c b/clang/test/3C/bounds_interface.c index f5bc710b7c16..1aa254340e16 100644 --- a/clang/test/3C/bounds_interface.c +++ b/clang/test/3C/bounds_interface.c @@ -1,10 +1,9 @@ // Tests for the 3C. // -// RUN: 3c -addcr %s -- -fcheckedc-extension | FileCheck -match-full-lines %s -// RUN: 3c -addcr %s -- -fcheckedc-extension | %clang_cc1 -verify -fcheckedc-extension -x c - -// RUN: 3c -addcr -output-postfix=checked %s -// RUN: 3c -addcr %S/bounds_interface.checked.c -- | count 0 -// RUN: rm %S/bounds_interface.checked.c +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -addcr %t.checked/bounds_interface.c -- | diff %t.checked/bounds_interface.c - // expected-no-diagnostics // diff --git a/clang/test/3C/checkedptrret.c b/clang/test/3C/checkedptrret.c index b6dc5f600911..ec3f80121439 100644 --- a/clang/test/3C/checkedptrret.c +++ b/clang/test/3C/checkedptrret.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - int* foo() { diff --git a/clang/test/3C/checkedregioninterweave.c b/clang/test/3C/checkedregioninterweave.c index 208fc1b9e772..2a5895058e5c 100644 --- a/clang/test/3C/checkedregioninterweave.c +++ b/clang/test/3C/checkedregioninterweave.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - void foo(int *x) { diff --git a/clang/test/3C/checkedregionsitypeparams.c b/clang/test/3C/checkedregionsitypeparams.c index f0ccd29d7618..095ce3a5173f 100644 --- a/clang/test/3C/checkedregionsitypeparams.c +++ b/clang/test/3C/checkedregionsitypeparams.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - struct A { int b; diff --git a/clang/test/3C/checkedregionvariadicBUG.c b/clang/test/3C/checkedregionvariadicBUG.c index 0fc3690238c4..eafec0db50ce 100644 --- a/clang/test/3C/checkedregionvariadicBUG.c +++ b/clang/test/3C/checkedregionvariadicBUG.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - // XFAIL: * #include diff --git a/clang/test/3C/checkedregionvoid.c b/clang/test/3C/checkedregionvoid.c index 629c0568eb65..eb53d71c2e1e 100644 --- a/clang/test/3C/checkedregionvoid.c +++ b/clang/test/3C/checkedregionvoid.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -addcr %s | %clang -c -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - void unsafe(void *);// Dummy to cause output void f(int *x) {} diff --git a/clang/test/3C/complex_expression.c b/clang/test/3C/complex_expression.c index b9103767344b..d5159fd1c9b3 100644 --- a/clang/test/3C/complex_expression.c +++ b/clang/test/3C/complex_expression.c @@ -1,12 +1,11 @@ // Tests for 3C. // // Tests 3c tool for complex expressions -// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK","CHECK_NEXT" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK","CHECK_NEXT" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -addcr -output-postfix=checked %s -// RUN: 3c -addcr %S/complex_expression.checked.c -- | count 0 -// RUN: rm %S/complex_expression.checked.c +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK","CHECK_NEXT" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK","CHECK_NEXT" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -addcr %t.checked/complex_expression.c -- | diff %t.checked/complex_expression.c - #include diff --git a/clang/test/3C/const_tests.c b/clang/test/3C/const_tests.c index cff2deb2fdce..8d4800c09d08 100644 --- a/clang/test/3C/const_tests.c +++ b/clang/test/3C/const_tests.c @@ -2,11 +2,10 @@ // // Checks for conversions involving const-qualified types. // -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines %s -// RUN: 3c -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - -// RUN: 3c -addcr -output-postfix=checked %s -// RUN: 3c -addcr %S/const_tests.checked.c -- | count 0 -// RUN: rm %S/const_tests.checked.c +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -addcr %t.checked/const_tests.c -- | diff %t.checked/const_tests.c - // expected-no-diagnostics void cst1(const int *a) { diff --git a/clang/test/3C/contextsensitivebounds.c b/clang/test/3C/contextsensitivebounds.c index 5988bdc51031..e70df9e1ffa4 100644 --- a/clang/test/3C/contextsensitivebounds.c +++ b/clang/test/3C/contextsensitivebounds.c @@ -2,10 +2,10 @@ Test for context sensitive bounds. **/ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unusedl - -// RUN: 3c %s | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t2.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unusedl - +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o %t2.unused - _Itype_for_any(T) void *somefunc(unsigned long size) : itype(_Array_ptr) byte_count(size); struct hash_node diff --git a/clang/test/3C/contextsensitivebounds1.c b/clang/test/3C/contextsensitivebounds1.c index 9e1457cdc7c9..0e9bb3ae4f58 100644 --- a/clang/test/3C/contextsensitivebounds1.c +++ b/clang/test/3C/contextsensitivebounds1.c @@ -2,10 +2,10 @@ Test for context sensitive bounds for internal functions. **/ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused - -// RUN: 3c %s | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t2.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o %t2.unused - _Itype_for_any(T) void *somefunc(unsigned long size) : itype(_Array_ptr) byte_count(size); struct hash_node diff --git a/clang/test/3C/definedType.c b/clang/test/3C/definedType.c index e7b8c93772d2..8287d632b372 100644 --- a/clang/test/3C/definedType.c +++ b/clang/test/3C/definedType.c @@ -1,9 +1,8 @@ -// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/definedType.checked.c | diff %S/definedType.checked.c - -// RUN: rm %S/definedType.checked.c +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/definedType.c -- | diff %t.checked/definedType.c - #include _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr) byte_count(size); diff --git a/clang/test/3C/defn_then_decl.c b/clang/test/3C/defn_then_decl.c index b58163750d4f..36d93cc0f884 100644 --- a/clang/test/3C/defn_then_decl.c +++ b/clang/test/3C/defn_then_decl.c @@ -1,9 +1,8 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/defn_then_decl.checked.c -- | count 0 -// RUN: rm %S/defn_then_decl.checked.c +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/defn_then_decl.c -- | diff %t.checked/defn_then_decl.c - // Tests behavior when a function declaration appears after the definition for // that function. A specific issue that existed caused constraints applied to diff --git a/clang/test/3C/difftypes_xfail1.c b/clang/test/3C/difftypes_xfail1.c index b44fe2230815..d5a2f601367e 100644 --- a/clang/test/3C/difftypes_xfail1.c +++ b/clang/test/3C/difftypes_xfail1.c @@ -1,4 +1,4 @@ -//RUN: 3c -base-dir=%S -output-postfix=checked %s %S/difftypes_xfail2.c +//RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes_xfail2.c -- // XFAIL: * diff --git a/clang/test/3C/difftypes_xfail2.c b/clang/test/3C/difftypes_xfail2.c index d85951033c95..be1641574f23 100644 --- a/clang/test/3C/difftypes_xfail2.c +++ b/clang/test/3C/difftypes_xfail2.c @@ -1,4 +1,4 @@ -//RUN: 3c -base-dir=%S -output-postfix=checked %s %S/difftypes_xfail1.c +//RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes_xfail1.c -- // XFAIL: * diff --git a/clang/test/3C/dont_rewrite.c b/clang/test/3C/dont_rewrite.c index dd0377ae54d3..3b6f934e4441 100644 --- a/clang/test/3C/dont_rewrite.c +++ b/clang/test/3C/dont_rewrite.c @@ -1,6 +1,6 @@ -// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - #include diff --git a/clang/test/3C/dont_rewrite_header.c b/clang/test/3C/dont_rewrite_header.c index 78e193bfc40f..36bdc24a3b3d 100644 --- a/clang/test/3C/dont_rewrite_header.c +++ b/clang/test/3C/dont_rewrite_header.c @@ -1,10 +1,10 @@ -// RUN: 3c -base-dir=%S -alltypes -addcr -output-postfix=checked %S/dont_rewrite_header.c %S/dont_rewrite_header.h -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK" %S/dont_rewrite_header.checked.c --input-file %S/dont_rewrite_header.checked.c -// RUN: test ! -f %S/dont_rewrite_header.checked.h -// RUN: %clang -c -fcheckedc-extension -x c -o /dev/null %S/dont_rewrite_header.checked.c -// RUN: 3c -base-dir=%S -alltypes -addcr --output-postfix=checked2 %S/dont_rewrite_header.checked.c %S/dont_rewrite_header.h -// RUN: test ! -f %S/dont_rewrite_header.checked.checked2.h -a ! -f %S/dont_rewrite_header.checked.checked2.c -// RUN: rm %S/dont_rewrite_header.checked.c +// RUN: 3c -base-dir=%S -alltypes -addcr -output-dir=%t.checked %S/dont_rewrite_header.c %S/dont_rewrite_header.h -- +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK" %t.checked/dont_rewrite_header.c --input-file %t.checked/dont_rewrite_header.c +// RUN: test ! -f %t.checked/dont_rewrite_header.h +// RUN: cp %S/dont_rewrite_header.h %t.checked/dont_rewrite_header.h +// RUN: %clang -c -fcheckedc-extension -x c -o /dev/null %t.checked/dont_rewrite_header.c +// RUN: 3c -base-dir=%t.checked -alltypes -addcr -output-dir=%t.checked2 %t.checked/dont_rewrite_header.c %t.checked/dont_rewrite_header.h -- +// RUN: test ! -f %t.checked2/dont_rewrite_header.h -a ! -f %t.checked2/dont_rewrite_header.c #include "dont_rewrite_header.h" int *foo(int *x) { diff --git a/clang/test/3C/extGVarbar1.c b/clang/test/3C/extGVarbar1.c index 4247c3e9c79a..728f8ac5b18e 100644 --- a/clang/test/3C/extGVarbar1.c +++ b/clang/test/3C/extGVarbar1.c @@ -1,7 +1,6 @@ -//RUN: 3c -base-dir=%S -output-postfix=checked %s %S/extGVarbar2.c -//RUN: FileCheck -match-full-lines --input-file %S/extGVarbar1.checked.c %s -//RUN: %clang -c %S/extGVarbar1.checked.c %S/extGVarbar2.checked.c -//RUN: rm %S/extGVarbar1.checked.c %S/extGVarbar2.checked.c +//RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/extGVarbar2.c -- +//RUN: FileCheck -match-full-lines --input-file %t.checked/extGVarbar1.c %s +//RUN: %clang -c %t.checked/extGVarbar1.c %t.checked/extGVarbar2.c // This test cannot use pipes because it requires multiple output files diff --git a/clang/test/3C/extGVarbar2.c b/clang/test/3C/extGVarbar2.c index 6183f2599da2..7fd66af75d3e 100644 --- a/clang/test/3C/extGVarbar2.c +++ b/clang/test/3C/extGVarbar2.c @@ -1,7 +1,6 @@ -//RUN: 3c -base-dir=%S -output-postfix=checked2 %s %S/extGVarbar1.c -//RUN: FileCheck -match-full-lines --input-file %S/extGVarbar2.checked2.c %s -//RUN: %clang -c %S/extGVarbar2.checked2.c %S/extGVarbar1.checked2.c -//RUN: rm %S/extGVarbar1.checked2.c %S/extGVarbar2.checked2.c +//RUN: 3c -base-dir=%S -output-dir=%t.checked2 %s %S/extGVarbar1.c -- +//RUN: FileCheck -match-full-lines --input-file %t.checked2/extGVarbar2.c %s +//RUN: %clang -c %t.checked2/extGVarbar2.c %t.checked2/extGVarbar1.c // This test cannot use pipes because it requires multiple output files diff --git a/clang/test/3C/extGVarm1.c b/clang/test/3C/extGVarm1.c index 0ce4cc8f6950..80c31e646844 100644 --- a/clang/test/3C/extGVarm1.c +++ b/clang/test/3C/extGVarm1.c @@ -1,7 +1,6 @@ -//RUN: 3c -base-dir=%S -output-postfix=checked %s %S/extGVarm2.c %S/extGVarm3.c -//RUN: FileCheck -match-full-lines --input-file %S/extGVarm1.checked.c %s -//RUN: %clang -c %S/extGVarm1.checked.c %S/extGVarm2.checked.c %S/extGVarm3.checked.c -//RUN: rm %S/extGVarm1.checked.c %S/extGVarm2.checked.c %S/extGVarm3.checked.c +//RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/extGVarm2.c %S/extGVarm3.c -- +//RUN: FileCheck -match-full-lines --input-file %t.checked/extGVarm1.c %s +//RUN: %clang -c %t.checked/extGVarm1.c %t.checked/extGVarm2.c %t.checked/extGVarm3.c // This test cannot use pipes because it requires multiple output files diff --git a/clang/test/3C/extGVarm2.c b/clang/test/3C/extGVarm2.c index 2eb0404ad30a..54d6afac1853 100644 --- a/clang/test/3C/extGVarm2.c +++ b/clang/test/3C/extGVarm2.c @@ -1,7 +1,6 @@ -//RUN: 3c -base-dir=%S -output-postfix=checked2 %s %S/extGVarm1.c %S/extGVarm3.c -//RUN: FileCheck -match-full-lines --input-file %S/extGVarm2.checked2.c %s -//RUN: %clang -c %S/extGVarm2.checked2.c %S/extGVarm3.checked2.c %S/extGVarm1.checked2.c -//RUN: rm %S/extGVarm1.checked2.c %S/extGVarm2.checked2.c %S/extGVarm3.checked2.c +//RUN: 3c -base-dir=%S -output-dir=%t.checked2 %s %S/extGVarm1.c %S/extGVarm3.c -- +//RUN: FileCheck -match-full-lines --input-file %t.checked2/extGVarm2.c %s +//RUN: %clang -c %t.checked2/extGVarm2.c %t.checked2/extGVarm3.c %t.checked2/extGVarm1.c // This test cannot use pipes because it requires multiple output files diff --git a/clang/test/3C/extGVarm3.c b/clang/test/3C/extGVarm3.c index 162406a31235..e510e7da563b 100644 --- a/clang/test/3C/extGVarm3.c +++ b/clang/test/3C/extGVarm3.c @@ -1,7 +1,6 @@ -//RUN: 3c -base-dir=%S -output-postfix=checked3 %s %S/extGVarm1.c %S/extGVarm2.c -//RUN: FileCheck -match-full-lines --input-file %S/extGVarm3.checked3.c %s -//RUN: %clang -c %S/extGVarm3.checked3.c %S/extGVarm2.checked3.c %S/extGVarm1.checked3.c -//RUN: rm %S/extGVarm1.checked3.c %S/extGVarm2.checked3.c %S/extGVarm3.checked3.c +//RUN: 3c -base-dir=%S -output-dir=%t.checked3 %s %S/extGVarm1.c %S/extGVarm2.c -- +//RUN: FileCheck -match-full-lines --input-file %t.checked3/extGVarm3.c %s +//RUN: %clang -c %t.checked3/extGVarm3.c %t.checked3/extGVarm2.c %t.checked3/extGVarm1.c // This test cannot use pipes because it requires multiple output files diff --git a/clang/test/3C/fptr.c b/clang/test/3C/fptr.c index 7196c99feb0f..056587bc9524 100644 --- a/clang/test/3C/fptr.c +++ b/clang/test/3C/fptr.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s -- -fcheckedc-extension | FileCheck -match-full-lines %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - int foo(char *c) { //CHECK: int foo(char *c : itype(_Ptr)) { diff --git a/clang/test/3C/free.c b/clang/test/3C/free.c index 26a640caea8f..c33593c1d0ca 100644 --- a/clang/test/3C/free.c +++ b/clang/test/3C/free.c @@ -1,6 +1,6 @@ -// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - #include _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/functionDeclEnd.c b/clang/test/3C/functionDeclEnd.c index b0faf735b58a..ee8b776e48c8 100644 --- a/clang/test/3C/functionDeclEnd.c +++ b/clang/test/3C/functionDeclEnd.c @@ -1,9 +1,8 @@ -// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/functionDeclEnd.checked.c | count 0 -// RUN: rm %S/functionDeclEnd.checked.c +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/functionDeclEnd.c -- | diff %t.checked/functionDeclEnd.c - // Tests for issue 392. When rewriting function prototypes sometimes code diff --git a/clang/test/3C/global.c b/clang/test/3C/global.c index 2aa580956b43..87b38846b2ec 100644 --- a/clang/test/3C/global.c +++ b/clang/test/3C/global.c @@ -2,11 +2,10 @@ // // Tests for rewriting global declarations. // -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines %s -// RUN: 3c -addcr %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c - -// RUN: 3c -addcr -output-postfix=checked %s -// RUN: 3c -addcr %S/global.checked.c -- | count 0 -// RUN: rm %S/global.checked.c +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -addcr %t.checked/global.c -- | diff %t.checked/global.c - // expected-no-diagnostics #include char *c; diff --git a/clang/test/3C/globalschecked.c b/clang/test/3C/globalschecked.c index 7a00d48f8359..e22552241e52 100644 --- a/clang/test/3C/globalschecked.c +++ b/clang/test/3C/globalschecked.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s -- -fcheckedc-extension | FileCheck -match-full-lines %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - int foo(void *x) { int *p = (int*) x; diff --git a/clang/test/3C/hash.c b/clang/test/3C/hash.c index e3d1a99e22b2..82b8977922ce 100644 --- a/clang/test/3C/hash.c +++ b/clang/test/3C/hash.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -alltypes %s | %clang -f3c-tool -c -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -f3c-tool -c -fcheckedc-extension -x c -o %t1.unused - /* * Based on hash.c in Very Secure FTPd diff --git a/clang/test/3C/inline_anon_structs.c b/clang/test/3C/inline_anon_structs.c index 1d66cc693f01..e83689cfd76a 100644 --- a/clang/test/3C/inline_anon_structs.c +++ b/clang/test/3C/inline_anon_structs.c @@ -1,9 +1,8 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked %s -// RUN: 3c %S/inline_anon_structs.checked.c -- | count 0 -// RUN: rm %S/inline_anon_structs.checked.c +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked %t.checked/inline_anon_structs.c -- | diff %t.checked/inline_anon_structs.c - #include extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr) byte_count(size); diff --git a/clang/test/3C/invalidbounds.c b/clang/test/3C/invalidbounds.c index afa240e547eb..4103d00bf964 100644 --- a/clang/test/3C/invalidbounds.c +++ b/clang/test/3C/invalidbounds.c @@ -1,6 +1,6 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - /* diff --git a/clang/test/3C/itypecast.c b/clang/test/3C/itypecast.c index 93318ff16c4c..c3d18bfb3f17 100644 --- a/clang/test/3C/itypecast.c +++ b/clang/test/3C/itypecast.c @@ -2,12 +2,11 @@ // // Checks cast insertion while passing arguments to itype parameters. // -// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked %s -// RUN: 3c %S/itypecast.checked.c -- | diff -w %S/itypecast.checked.c - -// RUN: rm %S/itypecast.checked.c +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked %t.checked/itypecast.c -- | diff -w %t.checked/itypecast.c - int foo(int **p:itype(_Ptr<_Ptr>)); int bar(int **p:itype(_Ptr)); diff --git a/clang/test/3C/liberal_itypes_fp.c b/clang/test/3C/liberal_itypes_fp.c index c7325edc6a2a..3e4dd2f0776c 100644 --- a/clang/test/3C/liberal_itypes_fp.c +++ b/clang/test/3C/liberal_itypes_fp.c @@ -1,9 +1,8 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/liberal_itypes_fp.checked.c -- | count 0 -// RUN: rm %S/liberal_itypes_fp.checked.c +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/liberal_itypes_fp.c -- | diff %t.checked/liberal_itypes_fp.c - void fp_test0(int *i) { i = 0; } // CHECK: void fp_test0(int *i : itype(_Ptr)) { i = 0; } diff --git a/clang/test/3C/liberal_itypes_ptr.c b/clang/test/3C/liberal_itypes_ptr.c index bd24f65e3372..46acf988a703 100644 --- a/clang/test/3C/liberal_itypes_ptr.c +++ b/clang/test/3C/liberal_itypes_ptr.c @@ -1,9 +1,8 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/liberal_itypes_ptr.checked.c -- | count 0 -// RUN: rm %S/liberal_itypes_ptr.checked.c +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/liberal_itypes_ptr.c -- | diff %t.checked/liberal_itypes_ptr.c - void foo(int *a) { } // CHECK: void foo(_Ptr a) _Checked { } diff --git a/clang/test/3C/liberal_itypes_ptrptr.c b/clang/test/3C/liberal_itypes_ptrptr.c index 463a341d02dd..5dddd6eebddf 100644 --- a/clang/test/3C/liberal_itypes_ptrptr.c +++ b/clang/test/3C/liberal_itypes_ptrptr.c @@ -1,9 +1,8 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/liberal_itypes_ptrptr.checked.c -- | count 0 -// RUN: rm %S/liberal_itypes_ptrptr.checked.c +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/liberal_itypes_ptrptr.c -- | diff %t.checked/liberal_itypes_ptrptr.c - void ptrptr(int **g) {} //CHECK: void ptrptr(_Ptr g) {} diff --git a/clang/test/3C/lowerbound.c b/clang/test/3C/lowerbound.c index da6d774b0950..20459918d588 100644 --- a/clang/test/3C/lowerbound.c +++ b/clang/test/3C/lowerbound.c @@ -1,8 +1,8 @@ // Generates graph q0 --> ARR --> q1, to confirm that bound bound // constraints are properly solved // The following test is supposed to fail with the current tool. -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - // _Array_ptr foo(_Array_ptr x); diff --git a/clang/test/3C/macroConcat.c b/clang/test/3C/macroConcat.c index 2f8aa6e09482..333feded89a9 100644 --- a/clang/test/3C/macroConcat.c +++ b/clang/test/3C/macroConcat.c @@ -1,9 +1,8 @@ -// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/macroConcat.checked.c -- | count 0 -// RUN: rm %S/macroConcat.checked.c +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/macroConcat.c -- | diff %t.checked/macroConcat.c - #define c(g) void FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO##g () c(BAR0); c(BAR1); c(BAR2); c(BAR3); c(BAR4); c(BAR5); c(BAR6); c(BAR7); diff --git a/clang/test/3C/manyprotos.c b/clang/test/3C/manyprotos.c index d3d402128fae..e709cbc9d444 100644 --- a/clang/test/3C/manyprotos.c +++ b/clang/test/3C/manyprotos.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - int foo(); //CHECK: int foo(_Array_ptr x : count(y), int y); diff --git a/clang/test/3C/multiconstant_bounds.c b/clang/test/3C/multiconstant_bounds.c index 63c16e0e610c..c5f81c7a2565 100644 --- a/clang/test/3C/multiconstant_bounds.c +++ b/clang/test/3C/multiconstant_bounds.c @@ -3,8 +3,8 @@ // When multiple constants are potential bounds, pick the lower constant. // Issue: https://github.com/correctcomputation/checkedc-clang/issues/390 // -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -Xclang -verify -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -Xclang -verify -x c -o %t1.unused - // expected-no-diagnostics // int a(char * : itype(_Nt_array_ptr)); diff --git a/clang/test/3C/multidef_xfail1.c b/clang/test/3C/multidef_xfail1.c index b556b7c03d52..1cc6b4647adb 100644 --- a/clang/test/3C/multidef_xfail1.c +++ b/clang/test/3C/multidef_xfail1.c @@ -1,4 +1,4 @@ -// RUN: 3c -base-dir=%S -output-postfix=checked %s %S/multidef_xfail2.c +// RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/multidef_xfail2.c -- // XFAIL: * diff --git a/clang/test/3C/multidef_xfail2.c b/clang/test/3C/multidef_xfail2.c index e2a8ce5022c7..0f5d1c046882 100644 --- a/clang/test/3C/multidef_xfail2.c +++ b/clang/test/3C/multidef_xfail2.c @@ -1,4 +1,4 @@ -// RUN: 3c -base-dir=%S -output-postfix=checked %s %S/multidef_xfail1.c +// RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/multidef_xfail1.c -- // XFAIL: * diff --git a/clang/test/3C/multipledecls.c b/clang/test/3C/multipledecls.c index a1debbe19626..9f9436056785 100644 --- a/clang/test/3C/multipledecls.c +++ b/clang/test/3C/multipledecls.c @@ -2,11 +2,10 @@ // // Checks handling of multiple declarations. // -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines %s -// RUN: 3c -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - -// RUN: 3c -addcr -output-postfix=checked %s -// RUN: 3c -addcr %S/multipledecls.checked.c -- | count 0 -// RUN: rm %S/multipledecls.checked.c +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -addcr %t.checked/multipledecls.c -- | diff %t.checked/multipledecls.c - // expected-no-diagnostics void gmtime(long *q); diff --git a/clang/test/3C/multistructdecls.c b/clang/test/3C/multistructdecls.c index 26ee51a5142a..a68a3a22d489 100644 --- a/clang/test/3C/multistructdecls.c +++ b/clang/test/3C/multistructdecls.c @@ -1,5 +1,5 @@ -// RUN: 3c %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - struct foo { diff --git a/clang/test/3C/multivardecls.c b/clang/test/3C/multivardecls.c index 8001bc94e782..0c37053f306b 100644 --- a/clang/test/3C/multivardecls.c +++ b/clang/test/3C/multivardecls.c @@ -1,9 +1,8 @@ -// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/multivardecls.checked.c -- | count 0 -// RUN: rm %S/multivardecls.checked.c +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/multivardecls.c -- | diff %t.checked/multivardecls.c - #include _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr) byte_count(size); diff --git a/clang/test/3C/no_casts.c b/clang/test/3C/no_casts.c index a858d451fcd8..c9402544ad80 100644 --- a/clang/test/3C/no_casts.c +++ b/clang/test/3C/no_casts.c @@ -1,5 +1,5 @@ -// RUN: 3c %s | count 0 -// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t.unused - +// RUN: 3c -base-dir=%S %s -- | diff %s - +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o %t.unused - void foo(char *a); void bar(int *a); diff --git a/clang/test/3C/noproto.c b/clang/test/3C/noproto.c index cece19c80b60..a21a79a64e1e 100644 --- a/clang/test/3C/noproto.c +++ b/clang/test/3C/noproto.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -addcr %s | %clang -c -fcheckedc-extension -x c -o %t.unused - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o %t.unused - int foo(int x) { //CHECK: int foo(int x) { diff --git a/clang/test/3C/order.c b/clang/test/3C/order.c index fbdcad553881..91bd0df48998 100644 --- a/clang/test/3C/order.c +++ b/clang/test/3C/order.c @@ -1,5 +1,5 @@ -// RUN: 3c %s | FileCheck -match-full-lines %s -// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t.unused - +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o %t.unused - int foo1(int x, int *y); //CHECK: int foo1(int x, _Ptr y); diff --git a/clang/test/3C/partial_checked.c b/clang/test/3C/partial_checked.c index b82ef13930ba..126341b4d728 100644 --- a/clang/test/3C/partial_checked.c +++ b/clang/test/3C/partial_checked.c @@ -1,9 +1,8 @@ -// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/partial_checked.checked.c -- | count 0 -// RUN: rm %S/partial_checked.checked.c +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/partial_checked.c -- | diff %t.checked/partial_checked.c - void test0(_Ptr a) { } // CHECK: void test0(_Ptr<_Ptr> a) _Checked { } diff --git a/clang/test/3C/partial_checked_arr.c b/clang/test/3C/partial_checked_arr.c index b14ebaea98d2..4fe71d8bc642 100644 --- a/clang/test/3C/partial_checked_arr.c +++ b/clang/test/3C/partial_checked_arr.c @@ -1,10 +1,9 @@ -// RUN: 3c -addcr -alltypes %s | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - -// RUN: 3c -addcr %s | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t2.unused - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/partial_checked_arr.checked.c -- | count 0 -// RUN: rm %S/partial_checked_arr.checked.c +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t2.unused - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/partial_checked_arr.c -- | diff %t.checked/partial_checked_arr.c - int strcmp(const char *src1 : itype(_Nt_array_ptr), const char *src2 : itype(_Nt_array_ptr)); diff --git a/clang/test/3C/patch_issue_272.c b/clang/test/3C/patch_issue_272.c index a96ad33e2a7a..67156ab64d50 100644 --- a/clang/test/3C/patch_issue_272.c +++ b/clang/test/3C/patch_issue_272.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - /********************************************************************/ /* Tests to keep pointer level from */ diff --git a/clang/test/3C/placements.c b/clang/test/3C/placements.c index b2c25dc924ab..a864233d39ad 100644 --- a/clang/test/3C/placements.c +++ b/clang/test/3C/placements.c @@ -2,12 +2,11 @@ // // Checks properties of functions. // -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK","CHECK_NOALL","CHECK-NEXT" %s -// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK","CHECK_ALL","CHECK-NEXT" %s -// RUN: 3c -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - -// RUN: 3c -addcr -alltypes -output-postfix=checked %s -// RUN: 3c -addcr -alltypes %S/placements.checked.c -- | count 0 -// RUN: rm %S/placements.checked.c +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK","CHECK_NOALL","CHECK-NEXT" %s +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK","CHECK_ALL","CHECK-NEXT" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -addcr -alltypes %t.checked/placements.c -- | diff %t.checked/placements.c - // expected-no-diagnostics void what(const char *s, int q); //CHECK_NOALL: void what(const char *s : itype(_Ptr), int q); diff --git a/clang/test/3C/pointerarithm.c b/clang/test/3C/pointerarithm.c index b49349e3503f..9f21c9fa2955 100644 --- a/clang/test/3C/pointerarithm.c +++ b/clang/test/3C/pointerarithm.c @@ -1,8 +1,7 @@ -// RUN: 3c -alltypes -addcr %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes -addcr %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - -// RUN: 3c -addcr -alltypes -output-postfix=checked %s -// RUN: 3c -addcr -alltypes %S/pointerarithm.checked.c | count 0 -// RUN: rm %S/pointerarithm.checked.c +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - +// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -addcr -alltypes %t.checked/pointerarithm.c -- | diff %t.checked/pointerarithm.c - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/prototype_success1.c b/clang/test/3C/prototype_success1.c index 8fc184660b3f..707fbf7768ad 100644 --- a/clang/test/3C/prototype_success1.c +++ b/clang/test/3C/prototype_success1.c @@ -1,7 +1,6 @@ -//RUN: 3c -base-dir=%S -output-postfix=checked %s %S/prototype_success2.c -//RUN: FileCheck -match-full-lines --input-file %S/prototype_success1.checked.c %s -//RUN: %clang -c %S/prototype_success1.checked.c %S/prototype_success2.checked.c -//RUN: rm %S/prototype_success1.checked.c %S/prototype_success2.checked.c +//RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/prototype_success2.c -- +//RUN: FileCheck -match-full-lines --input-file %t.checked/prototype_success1.c %s +//RUN: %clang -c %t.checked/prototype_success1.c %t.checked/prototype_success2.c /*Note: this file is part of a multi-file regression test in tandem with prototype_success2.c*/ diff --git a/clang/test/3C/prototype_success2.c b/clang/test/3C/prototype_success2.c index 95ea4cc83598..10d68a20fd71 100644 --- a/clang/test/3C/prototype_success2.c +++ b/clang/test/3C/prototype_success2.c @@ -1,7 +1,6 @@ -//RUN: 3c -base-dir=%S -output-postfix=checked2 %s %S/prototype_success1.c -//RUN: FileCheck -match-full-lines --input-file %S/prototype_success2.checked2.c %s -//RUN: %clang -c %S/prototype_success1.checked2.c %S/prototype_success2.checked2.c -//RUN: rm %S/prototype_success1.checked2.c %S/prototype_success2.checked2.c +//RUN: 3c -base-dir=%S -output-dir=%t.checked2 %s %S/prototype_success1.c -- +//RUN: FileCheck -match-full-lines --input-file %t.checked2/prototype_success2.c %s +//RUN: %clang -c %t.checked2/prototype_success1.c %t.checked2/prototype_success2.c /*Note: this file is part of a multi-file regression test in tandem with prototype_success1.c For comments about the different functions in this file, please refer to prototype_success1.c*/ diff --git a/clang/test/3C/ptrintBUG.c b/clang/test/3C/ptrintBUG.c index 4e666af11900..10e62b71fb52 100644 --- a/clang/test/3C/ptrintBUG.c +++ b/clang/test/3C/ptrintBUG.c @@ -1,8 +1,8 @@ // The following test is supposed to fail with the current tool. // XFAIL: * -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - // XFAIL: * void baz(int *x, int *y, int *z) { diff --git a/clang/test/3C/ptrptr.c b/clang/test/3C/ptrptr.c index 1431e66e5883..d0afa8232ad3 100644 --- a/clang/test/3C/ptrptr.c +++ b/clang/test/3C/ptrptr.c @@ -1,9 +1,8 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/ptrptr.checked.c -- | count 0 -// RUN: rm %S/ptrptr.checked.c +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrptr.c -- | diff -w %t.checked/ptrptr.c - #include #include diff --git a/clang/test/3C/ptrtoconstarr.c b/clang/test/3C/ptrtoconstarr.c index 0e8cd8876cff..8b1320779880 100644 --- a/clang/test/3C/ptrtoconstarr.c +++ b/clang/test/3C/ptrtoconstarr.c @@ -1,10 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c --addcr --alltypes %s -- | %clang_cc1 -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang_cc1 -fcheckedc-extension -x c - // -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrtoconstarr.checked.c -- | count 0 -// RUN: rm %S/ptrtoconstarr.checked.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrtoconstarr.c -- | diff %t.checked/ptrtoconstarr.c - extern _Unchecked unsigned long strlen(const char * restrict src : itype(restrict _Nt_array_ptr)); diff --git a/clang/test/3C/qualifiers.c b/clang/test/3C/qualifiers.c index d61103ba4eef..989e44059a59 100644 --- a/clang/test/3C/qualifiers.c +++ b/clang/test/3C/qualifiers.c @@ -1,9 +1,8 @@ -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checkedALL %s -// RUN: 3c -base-dir=%S -output-postfix=checkedNOALL %s -// RUN: %clang -c %S/qualifiers.checkedNOALL.c -// RUN: FileCheck -match-full-lines --input-file %S/qualifiers.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines --input-file %S/qualifiers.checkedALL.c %s -// RUN: rm %S/qualifiers.checkedALL.c %S/qualifiers.checkedNOALL.c +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checkedALL %s -- +// RUN: 3c -base-dir=%S -output-dir=%t.checkedNOALL %s -- +// RUN: %clang -c %t.checkedNOALL/qualifiers.c +// RUN: FileCheck -match-full-lines --input-file %t.checkedNOALL/qualifiers.c %s +// RUN: FileCheck -match-full-lines --input-file %t.checkedALL/qualifiers.c %s void consts() { const int a; diff --git a/clang/test/3C/regression_tests_xfail.c b/clang/test/3C/regression_tests_xfail.c index db0ad5149b26..92ed4ff6d806 100644 --- a/clang/test/3C/regression_tests_xfail.c +++ b/clang/test/3C/regression_tests_xfail.c @@ -2,8 +2,8 @@ // // Tests 3c tool for any regressions. // -// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t.unused - // // XFAIL: * diff --git a/clang/test/3C/rewrite_header.c b/clang/test/3C/rewrite_header.c index 93134556e224..9a9e77da31fb 100644 --- a/clang/test/3C/rewrite_header.c +++ b/clang/test/3C/rewrite_header.c @@ -1,13 +1,9 @@ -// RUN: 3c -base-dir=%S -alltypes -addcr -output-postfix=checked %S/rewrite_header.c %S/rewrite_header.h -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK" %S/rewrite_header.checked.c --input-file %S/rewrite_header.checked.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK" %S/rewrite_header.checked.h --input-file %S/rewrite_header.checked.h -// Avoid `sed -i` because GnuWin32's `sed -i` leaves its temporary file behind. -// RUN: sed -e "s!rewrite_header\.h!rewrite_header\.checked\.h!" %S/rewrite_header.checked.c >%S/rewrite_header.checked.c.new -// RUN: mv %S/rewrite_header.checked.c.new %S/rewrite_header.checked.c -// RUN: %clang -c -fcheckedc-extension -x c -o /dev/null %S/rewrite_header.checked.c -// RUN: 3c -base-dir=%S -alltypes -addcr --output-postfix=checked2 %S/rewrite_header.checked.c %S/rewrite_header.checked.h -// RUN: test ! -f %S/rewrite_header.checked2.h -a ! -f %S/rewrite_header.checked2.c -// RUN: rm %S/rewrite_header.checked.c %S/rewrite_header.checked.h +// RUN: 3c -base-dir=%S -alltypes -addcr -output-dir=%t.checked %S/rewrite_header.c %S/rewrite_header.h -- +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK" %t.checked/rewrite_header.c --input-file %t.checked/rewrite_header.c +// RUN: FileCheck -match-full-lines -check-prefixes="CHECK" %t.checked/rewrite_header.h --input-file %t.checked/rewrite_header.h +// RUN: %clang -c -fcheckedc-extension -x c -o /dev/null %t.checked/rewrite_header.c +// RUN: 3c -base-dir=%t.checked -alltypes -addcr -output-dir=%t.checked2 %t.checked/rewrite_header.c %t.checked/rewrite_header.h -- +// RUN: test ! -f %t.checked2/rewrite_header.h -a ! -f %t.checked2/rewrite_header.c #include "rewrite_header.h" int *foo(int *x) { diff --git a/clang/test/3C/root_cause.c b/clang/test/3C/root_cause.c index 5d0ee6c2e320..1d0db1a4db32 100644 --- a/clang/test/3C/root_cause.c +++ b/clang/test/3C/root_cause.c @@ -1,4 +1,4 @@ -// RUN: 3c -extra-arg="-Wno-everything" -verify -alltypes -warn-root-cause %s +// RUN: 3c -base-dir=%S -extra-arg="-Wno-everything" -verify -alltypes -warn-root-cause %s -- // This test is unusual in that it checks for the errors in the code diff --git a/clang/test/3C/simple_locals.c b/clang/test/3C/simple_locals.c index ff16932fdd17..2aefb9306b94 100644 --- a/clang/test/3C/simple_locals.c +++ b/clang/test/3C/simple_locals.c @@ -2,12 +2,11 @@ // // Checks very simple inference properties for local variables. // -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - -// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/simple_locals.checked.c -- | count 0 -// RUN: rm %S/simple_locals.checked.c +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/simple_locals.c -- | diff %t.checked/simple_locals.c - // expected-no-diagnostics void f1(void) { diff --git a/clang/test/3C/some_checked.c b/clang/test/3C/some_checked.c index e37e4555c742..d0653952ffa6 100644 --- a/clang/test/3C/some_checked.c +++ b/clang/test/3C/some_checked.c @@ -1,7 +1,7 @@ // Tests for the 3C. // -// RUN: 3c %s -- -fcheckedc-extension | FileCheck -match-full-lines %s -// RUN: 3c %s -- -fcheckedc-extension | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - // expected-no-diagnostics // diff --git a/clang/test/3C/stmtExprA.c b/clang/test/3C/stmtExprA.c index 1916b5850cf3..856a58510f3c 100644 --- a/clang/test/3C/stmtExprA.c +++ b/clang/test/3C/stmtExprA.c @@ -1,6 +1,6 @@ -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - #include extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr) byte_count(size); diff --git a/clang/test/3C/stmtExprBUG.c b/clang/test/3C/stmtExprBUG.c index 1559cb7b1377..26358c5b92eb 100644 --- a/clang/test/3C/stmtExprBUG.c +++ b/clang/test/3C/stmtExprBUG.c @@ -1,6 +1,6 @@ -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - // XFAIL: * #include diff --git a/clang/test/3C/stmtexpr.c b/clang/test/3C/stmtexpr.c index 5e4f4653fd9a..b94b6e04a146 100644 --- a/clang/test/3C/stmtexpr.c +++ b/clang/test/3C/stmtexpr.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -addcr %s | %clang -c -fcheckedc-extension -x c -o %t.unused - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o %t.unused - int foo(void) { //CHECK: int foo(void) { diff --git a/clang/test/3C/struct_init_list.c b/clang/test/3C/struct_init_list.c index 27682342064d..e134c54cd616 100644 --- a/clang/test/3C/struct_init_list.c +++ b/clang/test/3C/struct_init_list.c @@ -1,9 +1,8 @@ -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -alltypes %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/struct_init_list.checked.c -- | count 0 -// RUN: rm %S/struct_init_list.checked.c +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/struct_init_list.c -- | diff %t.checked/struct_init_list.c - // expected-no-diagnostics struct foo { diff --git a/clang/test/3C/supernested.c b/clang/test/3C/supernested.c index 093ab4747b64..91e0b84bc613 100644 --- a/clang/test/3C/supernested.c +++ b/clang/test/3C/supernested.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - #define VSFTP_COMMAND_FD 1 struct vsf_sysutil_statbuf { diff --git a/clang/test/3C/tree.c b/clang/test/3C/tree.c index 0d20e4b4e2b7..2a9597d11825 100644 --- a/clang/test/3C/tree.c +++ b/clang/test/3C/tree.c @@ -1,6 +1,6 @@ -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/type_params.c b/clang/test/3C/type_params.c index ae5b6ce13468..fca2ee923243 100644 --- a/clang/test/3C/type_params.c +++ b/clang/test/3C/type_params.c @@ -1,6 +1,6 @@ -// RUN: 3c -addcr -alltypes %s | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s | %clang -c -fcheckedc-extension -x c -o %t1.unused - +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - // General demonstration _Itype_for_any(T) void *test_single(void *a : itype(_Ptr), void *b : itype(_Ptr)) : itype(_Ptr); diff --git a/clang/test/3C/type_params_xfail1.c b/clang/test/3C/type_params_xfail1.c index b22b081ff365..4c69c1b8e885 100644 --- a/clang/test/3C/type_params_xfail1.c +++ b/clang/test/3C/type_params_xfail1.c @@ -1,4 +1,4 @@ -// RUN: 3c -addcr -alltypes %s | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines %s // XFAIL: * diff --git a/clang/test/3C/typedefbounds.c b/clang/test/3C/typedefbounds.c index f702abd4165c..b11c59a9dce7 100644 --- a/clang/test/3C/typedefbounds.c +++ b/clang/test/3C/typedefbounds.c @@ -1,9 +1,7 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c --addcr --alltypes %s -- | %clang_cc1 -fcheckedc-extension -x c - -// -// 3c -alltypes -output-postfix=checked %s -// 3c -alltypes %S/typedefs.checked.c -- | diff %S/typedefs.checked.c - -// rm %S/typedefs.checked.c +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang_cc1 -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/typedefbounds.c -- | diff %t.checked/typedefbounds.c - typedef char* string; //CHECK_ALL: typedef _Array_ptr string; diff --git a/clang/test/3C/typedefnoptr.c b/clang/test/3C/typedefnoptr.c index 785cb03d3214..018df9d1f943 100644 --- a/clang/test/3C/typedefnoptr.c +++ b/clang/test/3C/typedefnoptr.c @@ -1,5 +1,5 @@ -//RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK" %s -//RUN: 3c --addcr %s -- | %clang_cc1 -fcheckedc-extension -x c - +//RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK" %s +//RUN: 3c -base-dir=%S --addcr %s -- | %clang_cc1 -fcheckedc-extension -x c - typedef unsigned int uint_t; typedef uint_t *ptr_uint_t; diff --git a/clang/test/3C/typedefs.c b/clang/test/3C/typedefs.c index a671aef58359..06fd17120de0 100644 --- a/clang/test/3C/typedefs.c +++ b/clang/test/3C/typedefs.c @@ -1,11 +1,9 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c --addcr --alltypes %s -- | %clang_cc1 -fcheckedc-extension -x c - -// RUN: 3c --addcr %s -- | %clang_cc1 -fcheckedc-extension -x c - -// -// 3c -alltypes -output-postfix=checked %s -// 3c -alltypes %S/typedefs.checked.c -- | diff %S/typedefs.checked.c - -// rm %S/typedefs.checked.c +// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang_cc1 -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S --addcr %s -- | %clang_cc1 -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s +// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/typedefs.c -- | diff %t.checked/typedefs.c - typedef int* intptr; //CHECK: typedef _Ptr intptr; diff --git a/clang/test/3C/uncheckedredundant.c b/clang/test/3C/uncheckedredundant.c index 3a3501e75d78..a31055581bfe 100644 --- a/clang/test/3C/uncheckedredundant.c +++ b/clang/test/3C/uncheckedredundant.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - void foo(void) { //CHECK: void foo(void) { diff --git a/clang/test/3C/uncheckedvars.c b/clang/test/3C/uncheckedvars.c index 7a026fbab130..ec446fc4ce7e 100644 --- a/clang/test/3C/uncheckedvars.c +++ b/clang/test/3C/uncheckedvars.c @@ -1,5 +1,5 @@ -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - int *a = (int*) 1; //CHECK: int *a = (int*) 1; diff --git a/clang/test/3C/untypedprototypes.c b/clang/test/3C/untypedprototypes.c index 7fe7fb54774d..5add665ed988 100644 --- a/clang/test/3C/untypedprototypes.c +++ b/clang/test/3C/untypedprototypes.c @@ -1,5 +1,5 @@ -// RUN: 3c -alltypes %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s -// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s +// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - int *foo(); //CHECK: _Array_ptr foo(_Array_ptr q); diff --git a/clang/test/3C/user_malloc.c b/clang/test/3C/user_malloc.c index 8b98abb226a1..f325c598f3d5 100644 --- a/clang/test/3C/user_malloc.c +++ b/clang/test/3C/user_malloc.c @@ -1,6 +1,6 @@ -// RUN: 3c -alltypes -use-malloc=my_malloc,your_malloc %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -use-malloc=my_malloc,your_malloc %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -use-malloc=my_malloc,your_malloc %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: 3c -base-dir=%S -alltypes -use-malloc=my_malloc,your_malloc %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: 3c -base-dir=%S -use-malloc=my_malloc,your_malloc %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: 3c -base-dir=%S -use-malloc=my_malloc,your_malloc %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - #include extern _Itype_for_any(T) void *my_malloc(size_t size) : itype(_Array_ptr) byte_count(size); diff --git a/clang/test/3C/vargs.c b/clang/test/3C/vargs.c index 70b399f6ce4c..01cfe728596a 100644 --- a/clang/test/3C/vargs.c +++ b/clang/test/3C/vargs.c @@ -2,9 +2,9 @@ // // Checks very simple inference properties for local variables. // -// RUN: 3c %s -- | FileCheck -match-full-lines %s -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines %s -// RUN: 3c %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - +// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s +// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - // expected-no-diagnostics #include From 17fa09ad4a39e018ced3be932cf09343b2da2944 Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Tue, 9 Feb 2021 21:41:31 -0500 Subject: [PATCH 06/12] Add "rm -rf %t*" lines to unmanaged tests. --- clang/test/3C/allarrays.c | 1 + clang/test/3C/alloc_type_param.c | 1 + clang/test/3C/allocator.c | 1 + clang/test/3C/alreadychecked.c | 1 + clang/test/3C/arrboundsadvanced.c | 1 + clang/test/3C/arrboundsbasic.c | 1 + clang/test/3C/arrboundsbasicinfer.c | 1 + clang/test/3C/arrboundsbyte.c | 1 + clang/test/3C/arrboundsheuristics.c | 1 + clang/test/3C/arrboundsinfer2.c | 1 + clang/test/3C/arrtests_xfail.c | 1 + clang/test/3C/basic_inter.c | 1 + clang/test/3C/basic_inter_field_ntarr.c | 1 + clang/test/3C/basic_inter_ntarr.c | 1 + clang/test/3C/basic_local_ntarr.c | 1 + clang/test/3C/basic_return_itype.c | 1 + clang/test/3C/boundary_tests.c | 1 + clang/test/3C/bounds_interface.c | 1 + clang/test/3C/checkedregionvoid.c | 1 + clang/test/3C/complex_expression.c | 1 + clang/test/3C/const_tests.c | 1 + clang/test/3C/contextsensitivebounds.c | 1 + clang/test/3C/contextsensitivebounds1.c | 1 + clang/test/3C/definedType.c | 1 + clang/test/3C/defn_then_decl.c | 1 + clang/test/3C/difftypes_xfail1.c | 1 + clang/test/3C/difftypes_xfail2.c | 1 + clang/test/3C/dont_rewrite_header.c | 1 + clang/test/3C/extGVarbar1.c | 1 + clang/test/3C/extGVarbar2.c | 1 + clang/test/3C/extGVarm1.c | 1 + clang/test/3C/extGVarm2.c | 1 + clang/test/3C/extGVarm3.c | 1 + clang/test/3C/functionDeclEnd.c | 1 + clang/test/3C/global.c | 1 + clang/test/3C/hash.c | 1 + clang/test/3C/inline_anon_structs.c | 1 + clang/test/3C/itypecast.c | 1 + clang/test/3C/liberal_itypes_fp.c | 1 + clang/test/3C/liberal_itypes_ptr.c | 1 + clang/test/3C/liberal_itypes_ptrptr.c | 1 + clang/test/3C/lowerbound.c | 1 + clang/test/3C/macroConcat.c | 1 + clang/test/3C/manyprotos.c | 1 + clang/test/3C/multiconstant_bounds.c | 1 + clang/test/3C/multidef_xfail1.c | 1 + clang/test/3C/multidef_xfail2.c | 1 + clang/test/3C/multipledecls.c | 1 + clang/test/3C/multivardecls.c | 1 + clang/test/3C/no_casts.c | 1 + clang/test/3C/noproto.c | 1 + clang/test/3C/order.c | 1 + clang/test/3C/partial_checked.c | 1 + clang/test/3C/partial_checked_arr.c | 1 + clang/test/3C/patch_issue_272.c | 1 + clang/test/3C/placements.c | 1 + clang/test/3C/pointerarithm.c | 1 + clang/test/3C/prototype_success1.c | 1 + clang/test/3C/prototype_success2.c | 1 + clang/test/3C/ptrptr.c | 1 + clang/test/3C/ptrtoconstarr.c | 1 + clang/test/3C/qualifiers.c | 1 + clang/test/3C/regression_tests_xfail.c | 1 + clang/test/3C/rewrite_header.c | 1 + clang/test/3C/simple_locals.c | 1 + clang/test/3C/stmtexpr.c | 1 + clang/test/3C/struct_init_list.c | 1 + clang/test/3C/type_params.c | 1 + clang/test/3C/typedefbounds.c | 1 + clang/test/3C/typedefs.c | 1 + clang/test/3C/untypedprototypes.c | 1 + 71 files changed, 71 insertions(+) diff --git a/clang/test/3C/allarrays.c b/clang/test/3C/allarrays.c index 3f8874e1997f..3e8ca023927c 100644 --- a/clang/test/3C/allarrays.c +++ b/clang/test/3C/allarrays.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - diff --git a/clang/test/3C/alloc_type_param.c b/clang/test/3C/alloc_type_param.c index b2f3a5610e43..f957339dd04f 100644 --- a/clang/test/3C/alloc_type_param.c +++ b/clang/test/3C/alloc_type_param.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/allocator.c b/clang/test/3C/allocator.c index 87ce1d8e690c..23f640710ac0 100644 --- a/clang/test/3C/allocator.c +++ b/clang/test/3C/allocator.c @@ -2,6 +2,7 @@ // // Tests for malloc and friends. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c - // RUN: 3c -base-dir=%S -output-dir=%t.checked %s -- diff --git a/clang/test/3C/alreadychecked.c b/clang/test/3C/alreadychecked.c index 4882d0a15d4f..6fb4cef88991 100644 --- a/clang/test/3C/alreadychecked.c +++ b/clang/test/3C/alreadychecked.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - // RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- diff --git a/clang/test/3C/arrboundsadvanced.c b/clang/test/3C/arrboundsadvanced.c index 525d31706983..46fdee5a2b45 100644 --- a/clang/test/3C/arrboundsadvanced.c +++ b/clang/test/3C/arrboundsadvanced.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - diff --git a/clang/test/3C/arrboundsbasic.c b/clang/test/3C/arrboundsbasic.c index 047db3feaca9..dece87f957aa 100644 --- a/clang/test/3C/arrboundsbasic.c +++ b/clang/test/3C/arrboundsbasic.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - diff --git a/clang/test/3C/arrboundsbasicinfer.c b/clang/test/3C/arrboundsbasicinfer.c index b0ca154a4742..11b1bdb86e8a 100644 --- a/clang/test/3C/arrboundsbasicinfer.c +++ b/clang/test/3C/arrboundsbasicinfer.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - diff --git a/clang/test/3C/arrboundsbyte.c b/clang/test/3C/arrboundsbyte.c index a48e93c6f374..4ad29ca2eadd 100644 --- a/clang/test/3C/arrboundsbyte.c +++ b/clang/test/3C/arrboundsbyte.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - diff --git a/clang/test/3C/arrboundsheuristics.c b/clang/test/3C/arrboundsheuristics.c index ca217eda1429..c80e15f319cf 100644 --- a/clang/test/3C/arrboundsheuristics.c +++ b/clang/test/3C/arrboundsheuristics.c @@ -2,6 +2,7 @@ // // Checks wrong array heuristics. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s diff --git a/clang/test/3C/arrboundsinfer2.c b/clang/test/3C/arrboundsinfer2.c index fc140eaf40f3..4f9169f3eab0 100644 --- a/clang/test/3C/arrboundsinfer2.c +++ b/clang/test/3C/arrboundsinfer2.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - diff --git a/clang/test/3C/arrtests_xfail.c b/clang/test/3C/arrtests_xfail.c index 477c581d3d66..be4fda9b4057 100644 --- a/clang/test/3C/arrtests_xfail.c +++ b/clang/test/3C/arrtests_xfail.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - diff --git a/clang/test/3C/basic_inter.c b/clang/test/3C/basic_inter.c index 85b8108df6fe..eb4bded23f70 100644 --- a/clang/test/3C/basic_inter.c +++ b/clang/test/3C/basic_inter.c @@ -2,6 +2,7 @@ // // Tests properties about constraint propagation between functions. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - // diff --git a/clang/test/3C/basic_inter_field_ntarr.c b/clang/test/3C/basic_inter_field_ntarr.c index dd0cb906d391..6c47fb3b6804 100644 --- a/clang/test/3C/basic_inter_field_ntarr.c +++ b/clang/test/3C/basic_inter_field_ntarr.c @@ -2,6 +2,7 @@ // // Tests rewriting of Nt_array_ptrs within structure fields +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // diff --git a/clang/test/3C/basic_inter_ntarr.c b/clang/test/3C/basic_inter_ntarr.c index 8fbea3a67d46..7f17a986dbda 100644 --- a/clang/test/3C/basic_inter_ntarr.c +++ b/clang/test/3C/basic_inter_ntarr.c @@ -2,6 +2,7 @@ // // Tests rewriting and propagation of Nt_array_ptr constraints across functions. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // diff --git a/clang/test/3C/basic_local_ntarr.c b/clang/test/3C/basic_local_ntarr.c index ca0f3ead824e..b9d7089af9e3 100644 --- a/clang/test/3C/basic_local_ntarr.c +++ b/clang/test/3C/basic_local_ntarr.c @@ -2,6 +2,7 @@ // // Tests basic rewriting of Nt_array_ptrs +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // diff --git a/clang/test/3C/basic_return_itype.c b/clang/test/3C/basic_return_itype.c index b2ba1b34935b..d65c9cc336c0 100644 --- a/clang/test/3C/basic_return_itype.c +++ b/clang/test/3C/basic_return_itype.c @@ -2,6 +2,7 @@ // // Tests properties about rewriter for return type when it is an itype // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - // diff --git a/clang/test/3C/boundary_tests.c b/clang/test/3C/boundary_tests.c index 2e3ef90d6186..a16114cda02e 100644 --- a/clang/test/3C/boundary_tests.c +++ b/clang/test/3C/boundary_tests.c @@ -1,5 +1,6 @@ // Tests for 3C. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - // RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s -- diff --git a/clang/test/3C/bounds_interface.c b/clang/test/3C/bounds_interface.c index 1aa254340e16..f61aa248b09e 100644 --- a/clang/test/3C/bounds_interface.c +++ b/clang/test/3C/bounds_interface.c @@ -1,5 +1,6 @@ // Tests for the 3C. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - // RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s -- diff --git a/clang/test/3C/checkedregionvoid.c b/clang/test/3C/checkedregionvoid.c index eb53d71c2e1e..05a211caa90f 100644 --- a/clang/test/3C/checkedregionvoid.c +++ b/clang/test/3C/checkedregionvoid.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - diff --git a/clang/test/3C/complex_expression.c b/clang/test/3C/complex_expression.c index d5159fd1c9b3..91914b8b6ac2 100644 --- a/clang/test/3C/complex_expression.c +++ b/clang/test/3C/complex_expression.c @@ -1,6 +1,7 @@ // Tests for 3C. // // Tests 3c tool for complex expressions +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK","CHECK_NEXT" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK","CHECK_NEXT" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/const_tests.c b/clang/test/3C/const_tests.c index 8d4800c09d08..583373d05c25 100644 --- a/clang/test/3C/const_tests.c +++ b/clang/test/3C/const_tests.c @@ -2,6 +2,7 @@ // // Checks for conversions involving const-qualified types. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - // RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s -- diff --git a/clang/test/3C/contextsensitivebounds.c b/clang/test/3C/contextsensitivebounds.c index e70df9e1ffa4..2dcc0718a3e9 100644 --- a/clang/test/3C/contextsensitivebounds.c +++ b/clang/test/3C/contextsensitivebounds.c @@ -2,6 +2,7 @@ Test for context sensitive bounds. **/ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unusedl - // RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s diff --git a/clang/test/3C/contextsensitivebounds1.c b/clang/test/3C/contextsensitivebounds1.c index 0e9bb3ae4f58..3cef5e4850d3 100644 --- a/clang/test/3C/contextsensitivebounds1.c +++ b/clang/test/3C/contextsensitivebounds1.c @@ -2,6 +2,7 @@ Test for context sensitive bounds for internal functions. **/ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - // RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s diff --git a/clang/test/3C/definedType.c b/clang/test/3C/definedType.c index 8287d632b372..a434b7751276 100644 --- a/clang/test/3C/definedType.c +++ b/clang/test/3C/definedType.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/defn_then_decl.c b/clang/test/3C/defn_then_decl.c index 36d93cc0f884..281614cdf026 100644 --- a/clang/test/3C/defn_then_decl.c +++ b/clang/test/3C/defn_then_decl.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/difftypes_xfail1.c b/clang/test/3C/difftypes_xfail1.c index d5a2f601367e..f672510486af 100644 --- a/clang/test/3C/difftypes_xfail1.c +++ b/clang/test/3C/difftypes_xfail1.c @@ -1,3 +1,4 @@ +//RUN: rm -rf %t* //RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes_xfail2.c -- // XFAIL: * diff --git a/clang/test/3C/difftypes_xfail2.c b/clang/test/3C/difftypes_xfail2.c index be1641574f23..56f00b03a46a 100644 --- a/clang/test/3C/difftypes_xfail2.c +++ b/clang/test/3C/difftypes_xfail2.c @@ -1,3 +1,4 @@ +//RUN: rm -rf %t* //RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes_xfail1.c -- // XFAIL: * diff --git a/clang/test/3C/dont_rewrite_header.c b/clang/test/3C/dont_rewrite_header.c index 36bdc24a3b3d..c2f130103b74 100644 --- a/clang/test/3C/dont_rewrite_header.c +++ b/clang/test/3C/dont_rewrite_header.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr -output-dir=%t.checked %S/dont_rewrite_header.c %S/dont_rewrite_header.h -- // RUN: FileCheck -match-full-lines -check-prefixes="CHECK" %t.checked/dont_rewrite_header.c --input-file %t.checked/dont_rewrite_header.c // RUN: test ! -f %t.checked/dont_rewrite_header.h diff --git a/clang/test/3C/extGVarbar1.c b/clang/test/3C/extGVarbar1.c index 728f8ac5b18e..169938469a74 100644 --- a/clang/test/3C/extGVarbar1.c +++ b/clang/test/3C/extGVarbar1.c @@ -1,3 +1,4 @@ +//RUN: rm -rf %t* //RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/extGVarbar2.c -- //RUN: FileCheck -match-full-lines --input-file %t.checked/extGVarbar1.c %s //RUN: %clang -c %t.checked/extGVarbar1.c %t.checked/extGVarbar2.c diff --git a/clang/test/3C/extGVarbar2.c b/clang/test/3C/extGVarbar2.c index 7fd66af75d3e..d147265f5e7d 100644 --- a/clang/test/3C/extGVarbar2.c +++ b/clang/test/3C/extGVarbar2.c @@ -1,3 +1,4 @@ +//RUN: rm -rf %t* //RUN: 3c -base-dir=%S -output-dir=%t.checked2 %s %S/extGVarbar1.c -- //RUN: FileCheck -match-full-lines --input-file %t.checked2/extGVarbar2.c %s //RUN: %clang -c %t.checked2/extGVarbar2.c %t.checked2/extGVarbar1.c diff --git a/clang/test/3C/extGVarm1.c b/clang/test/3C/extGVarm1.c index 80c31e646844..572198349932 100644 --- a/clang/test/3C/extGVarm1.c +++ b/clang/test/3C/extGVarm1.c @@ -1,3 +1,4 @@ +//RUN: rm -rf %t* //RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/extGVarm2.c %S/extGVarm3.c -- //RUN: FileCheck -match-full-lines --input-file %t.checked/extGVarm1.c %s //RUN: %clang -c %t.checked/extGVarm1.c %t.checked/extGVarm2.c %t.checked/extGVarm3.c diff --git a/clang/test/3C/extGVarm2.c b/clang/test/3C/extGVarm2.c index 54d6afac1853..7f1733ce88e7 100644 --- a/clang/test/3C/extGVarm2.c +++ b/clang/test/3C/extGVarm2.c @@ -1,3 +1,4 @@ +//RUN: rm -rf %t* //RUN: 3c -base-dir=%S -output-dir=%t.checked2 %s %S/extGVarm1.c %S/extGVarm3.c -- //RUN: FileCheck -match-full-lines --input-file %t.checked2/extGVarm2.c %s //RUN: %clang -c %t.checked2/extGVarm2.c %t.checked2/extGVarm3.c %t.checked2/extGVarm1.c diff --git a/clang/test/3C/extGVarm3.c b/clang/test/3C/extGVarm3.c index e510e7da563b..47f590489136 100644 --- a/clang/test/3C/extGVarm3.c +++ b/clang/test/3C/extGVarm3.c @@ -1,3 +1,4 @@ +//RUN: rm -rf %t* //RUN: 3c -base-dir=%S -output-dir=%t.checked3 %s %S/extGVarm1.c %S/extGVarm2.c -- //RUN: FileCheck -match-full-lines --input-file %t.checked3/extGVarm3.c %s //RUN: %clang -c %t.checked3/extGVarm3.c %t.checked3/extGVarm2.c %t.checked3/extGVarm1.c diff --git a/clang/test/3C/functionDeclEnd.c b/clang/test/3C/functionDeclEnd.c index ee8b776e48c8..572671aea645 100644 --- a/clang/test/3C/functionDeclEnd.c +++ b/clang/test/3C/functionDeclEnd.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/global.c b/clang/test/3C/global.c index 87b38846b2ec..cb84d2c0ebd0 100644 --- a/clang/test/3C/global.c +++ b/clang/test/3C/global.c @@ -2,6 +2,7 @@ // // Tests for rewriting global declarations. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c - // RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s -- diff --git a/clang/test/3C/hash.c b/clang/test/3C/hash.c index 82b8977922ce..8d517bd441be 100644 --- a/clang/test/3C/hash.c +++ b/clang/test/3C/hash.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -f3c-tool -c -fcheckedc-extension -x c -o %t1.unused - diff --git a/clang/test/3C/inline_anon_structs.c b/clang/test/3C/inline_anon_structs.c index e83689cfd76a..0b97a697f3af 100644 --- a/clang/test/3C/inline_anon_structs.c +++ b/clang/test/3C/inline_anon_structs.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/itypecast.c b/clang/test/3C/itypecast.c index c3d18bfb3f17..ce26bc045099 100644 --- a/clang/test/3C/itypecast.c +++ b/clang/test/3C/itypecast.c @@ -2,6 +2,7 @@ // // Checks cast insertion while passing arguments to itype parameters. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/liberal_itypes_fp.c b/clang/test/3C/liberal_itypes_fp.c index 3e4dd2f0776c..15ae5faad2b6 100644 --- a/clang/test/3C/liberal_itypes_fp.c +++ b/clang/test/3C/liberal_itypes_fp.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/liberal_itypes_ptr.c b/clang/test/3C/liberal_itypes_ptr.c index 46acf988a703..f4be4923a105 100644 --- a/clang/test/3C/liberal_itypes_ptr.c +++ b/clang/test/3C/liberal_itypes_ptr.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/liberal_itypes_ptrptr.c b/clang/test/3C/liberal_itypes_ptrptr.c index 5dddd6eebddf..b06de584548b 100644 --- a/clang/test/3C/liberal_itypes_ptrptr.c +++ b/clang/test/3C/liberal_itypes_ptrptr.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/lowerbound.c b/clang/test/3C/lowerbound.c index 20459918d588..ce616a1138c3 100644 --- a/clang/test/3C/lowerbound.c +++ b/clang/test/3C/lowerbound.c @@ -1,6 +1,7 @@ // Generates graph q0 --> ARR --> q1, to confirm that bound bound // constraints are properly solved // The following test is supposed to fail with the current tool. +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - // diff --git a/clang/test/3C/macroConcat.c b/clang/test/3C/macroConcat.c index 333feded89a9..4fd79e901bb6 100644 --- a/clang/test/3C/macroConcat.c +++ b/clang/test/3C/macroConcat.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/manyprotos.c b/clang/test/3C/manyprotos.c index e709cbc9d444..8a583fd40653 100644 --- a/clang/test/3C/manyprotos.c +++ b/clang/test/3C/manyprotos.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - diff --git a/clang/test/3C/multiconstant_bounds.c b/clang/test/3C/multiconstant_bounds.c index c5f81c7a2565..a9f50257ae66 100644 --- a/clang/test/3C/multiconstant_bounds.c +++ b/clang/test/3C/multiconstant_bounds.c @@ -3,6 +3,7 @@ // When multiple constants are potential bounds, pick the lower constant. // Issue: https://github.com/correctcomputation/checkedc-clang/issues/390 // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -Xclang -verify -x c -o %t1.unused - // expected-no-diagnostics diff --git a/clang/test/3C/multidef_xfail1.c b/clang/test/3C/multidef_xfail1.c index 1cc6b4647adb..f3d33ee3f711 100644 --- a/clang/test/3C/multidef_xfail1.c +++ b/clang/test/3C/multidef_xfail1.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/multidef_xfail2.c -- // XFAIL: * diff --git a/clang/test/3C/multidef_xfail2.c b/clang/test/3C/multidef_xfail2.c index 0f5d1c046882..fd6ea0e97df1 100644 --- a/clang/test/3C/multidef_xfail2.c +++ b/clang/test/3C/multidef_xfail2.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/multidef_xfail1.c -- // XFAIL: * diff --git a/clang/test/3C/multipledecls.c b/clang/test/3C/multipledecls.c index 9f9436056785..5fac33d27230 100644 --- a/clang/test/3C/multipledecls.c +++ b/clang/test/3C/multipledecls.c @@ -2,6 +2,7 @@ // // Checks handling of multiple declarations. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - // RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s -- diff --git a/clang/test/3C/multivardecls.c b/clang/test/3C/multivardecls.c index 0c37053f306b..515b29a77682 100644 --- a/clang/test/3C/multivardecls.c +++ b/clang/test/3C/multivardecls.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/no_casts.c b/clang/test/3C/no_casts.c index c9402544ad80..a9b17e730a25 100644 --- a/clang/test/3C/no_casts.c +++ b/clang/test/3C/no_casts.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S %s -- | diff %s - // RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o %t.unused - diff --git a/clang/test/3C/noproto.c b/clang/test/3C/noproto.c index a21a79a64e1e..8383cab43c00 100644 --- a/clang/test/3C/noproto.c +++ b/clang/test/3C/noproto.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o %t.unused - diff --git a/clang/test/3C/order.c b/clang/test/3C/order.c index 91bd0df48998..2da74211da88 100644 --- a/clang/test/3C/order.c +++ b/clang/test/3C/order.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o %t.unused - diff --git a/clang/test/3C/partial_checked.c b/clang/test/3C/partial_checked.c index 126341b4d728..435f905f22b0 100644 --- a/clang/test/3C/partial_checked.c +++ b/clang/test/3C/partial_checked.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/partial_checked_arr.c b/clang/test/3C/partial_checked_arr.c index 4fe71d8bc642..b5cb89ab56f8 100644 --- a/clang/test/3C/partial_checked_arr.c +++ b/clang/test/3C/partial_checked_arr.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s diff --git a/clang/test/3C/patch_issue_272.c b/clang/test/3C/patch_issue_272.c index 67156ab64d50..d8fa2f9123ac 100644 --- a/clang/test/3C/patch_issue_272.c +++ b/clang/test/3C/patch_issue_272.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - diff --git a/clang/test/3C/placements.c b/clang/test/3C/placements.c index a864233d39ad..c5295d544553 100644 --- a/clang/test/3C/placements.c +++ b/clang/test/3C/placements.c @@ -2,6 +2,7 @@ // // Checks properties of functions. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK","CHECK_NOALL","CHECK-NEXT" %s // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK","CHECK_ALL","CHECK-NEXT" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - diff --git a/clang/test/3C/pointerarithm.c b/clang/test/3C/pointerarithm.c index 9f21c9fa2955..4794025f20db 100644 --- a/clang/test/3C/pointerarithm.c +++ b/clang/test/3C/pointerarithm.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - // RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checked %s -- diff --git a/clang/test/3C/prototype_success1.c b/clang/test/3C/prototype_success1.c index 707fbf7768ad..801b4ccff74e 100644 --- a/clang/test/3C/prototype_success1.c +++ b/clang/test/3C/prototype_success1.c @@ -1,3 +1,4 @@ +//RUN: rm -rf %t* //RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/prototype_success2.c -- //RUN: FileCheck -match-full-lines --input-file %t.checked/prototype_success1.c %s //RUN: %clang -c %t.checked/prototype_success1.c %t.checked/prototype_success2.c diff --git a/clang/test/3C/prototype_success2.c b/clang/test/3C/prototype_success2.c index 10d68a20fd71..55ed00fcde4c 100644 --- a/clang/test/3C/prototype_success2.c +++ b/clang/test/3C/prototype_success2.c @@ -1,3 +1,4 @@ +//RUN: rm -rf %t* //RUN: 3c -base-dir=%S -output-dir=%t.checked2 %s %S/prototype_success1.c -- //RUN: FileCheck -match-full-lines --input-file %t.checked2/prototype_success2.c %s //RUN: %clang -c %t.checked2/prototype_success1.c %t.checked2/prototype_success2.c diff --git a/clang/test/3C/ptrptr.c b/clang/test/3C/ptrptr.c index d0afa8232ad3..aa9ebbdf3764 100644 --- a/clang/test/3C/ptrptr.c +++ b/clang/test/3C/ptrptr.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - diff --git a/clang/test/3C/ptrtoconstarr.c b/clang/test/3C/ptrtoconstarr.c index 8b1320779880..9789f7ed7761 100644 --- a/clang/test/3C/ptrtoconstarr.c +++ b/clang/test/3C/ptrtoconstarr.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang_cc1 -fcheckedc-extension -x c - diff --git a/clang/test/3C/qualifiers.c b/clang/test/3C/qualifiers.c index 989e44059a59..fd5fe50e2479 100644 --- a/clang/test/3C/qualifiers.c +++ b/clang/test/3C/qualifiers.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checkedALL %s -- // RUN: 3c -base-dir=%S -output-dir=%t.checkedNOALL %s -- // RUN: %clang -c %t.checkedNOALL/qualifiers.c diff --git a/clang/test/3C/regression_tests_xfail.c b/clang/test/3C/regression_tests_xfail.c index 92ed4ff6d806..e239815cba13 100644 --- a/clang/test/3C/regression_tests_xfail.c +++ b/clang/test/3C/regression_tests_xfail.c @@ -2,6 +2,7 @@ // // Tests 3c tool for any regressions. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t.unused - // diff --git a/clang/test/3C/rewrite_header.c b/clang/test/3C/rewrite_header.c index 9a9e77da31fb..860aae68142a 100644 --- a/clang/test/3C/rewrite_header.c +++ b/clang/test/3C/rewrite_header.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr -output-dir=%t.checked %S/rewrite_header.c %S/rewrite_header.h -- // RUN: FileCheck -match-full-lines -check-prefixes="CHECK" %t.checked/rewrite_header.c --input-file %t.checked/rewrite_header.c // RUN: FileCheck -match-full-lines -check-prefixes="CHECK" %t.checked/rewrite_header.h --input-file %t.checked/rewrite_header.h diff --git a/clang/test/3C/simple_locals.c b/clang/test/3C/simple_locals.c index 2aefb9306b94..b1880b992898 100644 --- a/clang/test/3C/simple_locals.c +++ b/clang/test/3C/simple_locals.c @@ -2,6 +2,7 @@ // // Checks very simple inference properties for local variables. // +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c - // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s diff --git a/clang/test/3C/stmtexpr.c b/clang/test/3C/stmtexpr.c index b94b6e04a146..ee924cb114e7 100644 --- a/clang/test/3C/stmtexpr.c +++ b/clang/test/3C/stmtexpr.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o %t.unused - diff --git a/clang/test/3C/struct_init_list.c b/clang/test/3C/struct_init_list.c index e134c54cd616..340144978c6b 100644 --- a/clang/test/3C/struct_init_list.c +++ b/clang/test/3C/struct_init_list.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - // RUN: 3c -base-dir=%S -alltypes %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c - diff --git a/clang/test/3C/type_params.c b/clang/test/3C/type_params.c index fca2ee923243..15e2dc7d1053 100644 --- a/clang/test/3C/type_params.c +++ b/clang/test/3C/type_params.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused - diff --git a/clang/test/3C/typedefbounds.c b/clang/test/3C/typedefbounds.c index b11c59a9dce7..49dc7f792127 100644 --- a/clang/test/3C/typedefbounds.c +++ b/clang/test/3C/typedefbounds.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang_cc1 -fcheckedc-extension -x c - // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s diff --git a/clang/test/3C/typedefs.c b/clang/test/3C/typedefs.c index 06fd17120de0..5b114da81237 100644 --- a/clang/test/3C/typedefs.c +++ b/clang/test/3C/typedefs.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang_cc1 -fcheckedc-extension -x c - diff --git a/clang/test/3C/untypedprototypes.c b/clang/test/3C/untypedprototypes.c index 5add665ed988..2f4aae468f8c 100644 --- a/clang/test/3C/untypedprototypes.c +++ b/clang/test/3C/untypedprototypes.c @@ -1,3 +1,4 @@ +// RUN: rm -rf %t* // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused - From e01236d3c6ac6b0b3ccb7a9c197818f9d963467c Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Wed, 10 Feb 2021 11:38:46 -0500 Subject: [PATCH 07/12] Have _3CInterface::create return a std::unique_ptr. Suggested by John and it seems to work and yield a slight cleanup. --- clang/include/clang/3C/3C.h | 7 ++++--- clang/lib/3C/3C.cpp | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clang/include/clang/3C/3C.h b/clang/include/clang/3C/3C.h index bb706196669f..9a5d561291d4 100644 --- a/clang/include/clang/3C/3C.h +++ b/clang/include/clang/3C/3C.h @@ -97,9 +97,10 @@ class _3CInterface { // datatype that is accepted in our codebase // (https://llvm.org/docs/ProgrammersManual.html#fallible-constructors) seems // too unwieldy to use right now. - static _3CInterface *create(const struct _3COptions &CCopt, - const std::vector &SourceFileList, - clang::tooling::CompilationDatabase *CompDB); + static std::unique_ptr<_3CInterface> create( + const struct _3COptions &CCopt, + const std::vector &SourceFileList, + clang::tooling::CompilationDatabase *CompDB); // Constraint Building. diff --git a/clang/lib/3C/3C.cpp b/clang/lib/3C/3C.cpp index e3fec7fd7330..e15f2c7bbb7a 100644 --- a/clang/lib/3C/3C.cpp +++ b/clang/lib/3C/3C.cpp @@ -195,15 +195,14 @@ void runSolver(ProgramInfo &Info, std::set &SourceFiles) { } } -_3CInterface * +std::unique_ptr<_3CInterface> _3CInterface::create(const struct _3COptions &CCopt, const std::vector &SourceFileList, CompilationDatabase *CompDB) { bool Failed = false; - _3CInterface *_3CInter = - new _3CInterface(CCopt, SourceFileList, CompDB, Failed); + std::unique_ptr<_3CInterface> _3CInter( + new _3CInterface(CCopt, SourceFileList, CompDB, Failed)); if (Failed) { - delete _3CInter; return nullptr; } return _3CInter; From 20a0c3e583175eee3ef23d946230376c08e4292e Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Wed, 10 Feb 2021 12:52:09 -0500 Subject: [PATCH 08/12] Add comment about OutputPostfix and OutputDir from John. Co-authored-by: John Kastner --- clang/lib/3C/RewriteUtils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang/lib/3C/RewriteUtils.cpp b/clang/lib/3C/RewriteUtils.cpp index 7d860e0202f5..a0aa2828bfa4 100644 --- a/clang/lib/3C/RewriteUtils.cpp +++ b/clang/lib/3C/RewriteUtils.cpp @@ -198,7 +198,10 @@ static void emit(Rewriter &R, ASTContext &C) { // Produce a path/file name for the rewritten source file. std::string NFile; std::error_code EC; - + // We now know that we are using either OutputPostfix or OutputDir mode + // because stdout mode is handled above. OutputPostfix defaults to "-" + // when it's not provided, so any other value means that we should use + // OutputPostfix. Otherwise, we must be in OutputDir mode. if (OutputPostfix != "-") { // That path should be the same as the old one, with a // suffix added between the file name and the extension. From 63e6dc7f1bddde2e338156b8e5f02734d23cfdd7 Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Thu, 11 Feb 2021 17:28:12 -0500 Subject: [PATCH 09/12] "3c -help": Explain the handling of unchanged files. --- clang/tools/3c/3CStandalone.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/clang/tools/3c/3CStandalone.cpp b/clang/tools/3c/3CStandalone.cpp index 4e1be4a1ce51..36eb1683a6de 100644 --- a/clang/tools/3c/3CStandalone.cpp +++ b/clang/tools/3c/3CStandalone.cpp @@ -61,11 +61,13 @@ you want to use for all source files (this is equivalent to specifying those options via -extra-arg before the "--"). You can use either -output-dir or -output-postfix to control the paths at which -3c writes the new versions of your files. If you use neither, then you can only +3c writes the new versions of your files. With either of these options, if 3c +does not write a new version of a given file, that means the file needs no +changes. If you use neither -output-dir nor -output-postfix, then you can only pass one source file on the command line and the new version of that file is -written to stdout ("stdout mode"), but 3c still solves for changes to all files -under the -base-dir that are "#include"-d by that file and it is an error if any -other file changes. +written to stdout regardless of whether it differs from the original ("stdout +mode"), but 3c still solves for changes to all files under the -base-dir that +are "#include"-d by that file and it is an error if any other file changes. )"; From 1bd471287910126131379ae9a8c911a988a05ca8 Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Thu, 11 Feb 2021 18:23:39 -0500 Subject: [PATCH 10/12] Add a regression test for -base-dir with a trailing slash. I decided I was worried enough that LLVM might break this at some point on either Linux or Windows to merit a dedicated test. Also fix line wrapping in canwrite_constraints_unimplemented.c. --- clang/test/3C/base_dir_trailing_slash.c | 29 +++++++++++++++++++ .../canwrite_constraints_unimplemented.c | 3 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 clang/test/3C/base_dir_trailing_slash.c diff --git a/clang/test/3C/base_dir_trailing_slash.c b/clang/test/3C/base_dir_trailing_slash.c new file mode 100644 index 000000000000..60d74ef758db --- /dev/null +++ b/clang/test/3C/base_dir_trailing_slash.c @@ -0,0 +1,29 @@ +// When -output-dir is in use, 3C calls essentially +// llvm::sys::path::replace_path_prefix(InputFilePath, BaseDir, OutputDir) to +// calculate the output file path. In at least some cases, replace_path_prefix +// just does a string replacement of BaseDir with OutputDir at the beginning of +// InputFilePath, so if BaseDir ends in a directory separator and OutputDir +// doesn't, the separator will get lost and a bogus output path will be +// generated. (In Checked C's LLVM 9 baseline (llvmorg-10-init^ = +// c89a3d78f43d81b9cff7b9248772ddf14d21b749), this happens only when BaseDir and +// OutputDir are exactly the same length. On the LLVM main branch as of this +// writing (9e62c9146d2c125a1abda594add70ed66008e372), code inspection suggests +// that it happens all the time.) +// +// 3C canonicalizes all paths with llvm::sys::fs::real_path (mainly for other +// reasons), and we hope that canonicalization will defend us against the above +// problem too by removing any trailing separator from BaseDir and/or OutputDir. +// But we have a dedicated test for this just in case the LLVM behavior changes. +// We choose the output dir %t/outxx to be exactly the same length as the base +// dir %t/base/ (including the separator). If the bug occurs, we'd get the bogus +// output path %t/outxxbase_dir_trailing_slash.c. + +// RUN: rm -rf %t* +// RUN: mkdir -p %t/base +// RUN: cp %s %t/base +// RUN: 3c -base-dir=%t/base/ -output-dir=%t/outxx %t/base/base_dir_trailing_slash.c -- +// RUN: FileCheck -match-full-lines --input-file %t/outxx/base_dir_trailing_slash.c %s +// RUN: test ! -f %t/outxxbase_dir_trailing_slash.c + +// CHECK: _Ptr p = ((void *)0); +int *p; diff --git a/clang/test/3C/base_subdir/canwrite_constraints_unimplemented.c b/clang/test/3C/base_subdir/canwrite_constraints_unimplemented.c index 9776cf953940..cf6cdeca5a2f 100644 --- a/clang/test/3C/base_subdir/canwrite_constraints_unimplemented.c +++ b/clang/test/3C/base_subdir/canwrite_constraints_unimplemented.c @@ -10,7 +10,8 @@ // expected-error@../base_subdir_partial_defn.h:1 {{3C internal error: 3C generated changes to this file even though it is not allowed to write to the file}} // expected-note@../base_subdir_partial_defn.h:1 {{-dump-unwritable-changes}} -// The "../base_subdir_partial_defn.h" path is testing two former base dir matching bugs from +// The "../base_subdir_partial_defn.h" path is testing two former base dir +// matching bugs from // https://github.com/correctcomputation/checkedc-clang/issues/327: // // 1. 3C canonicalizes ".." path elements. Otherwise, it would think ".." is a From 3c34cf83b0e694a1bd68bc77241322587b2c1af0 Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Fri, 12 Feb 2021 12:11:48 -0500 Subject: [PATCH 11/12] Delete clang/test/3C/llvm-lit-wrapper.py because it is now obsolete. The only extra thing it did was delete temporary files from the clang/test/3C directory, and our tests no longer create such files. --- clang/test/3C/llvm-lit-wrapper.py | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 clang/test/3C/llvm-lit-wrapper.py diff --git a/clang/test/3C/llvm-lit-wrapper.py b/clang/test/3C/llvm-lit-wrapper.py deleted file mode 100755 index d14d3b3006ba..000000000000 --- a/clang/test/3C/llvm-lit-wrapper.py +++ /dev/null @@ -1,5 +0,0 @@ -import os - -os.system("rm *.checked*") -os.system("llvm-lit *.c") -os.system("rm *.checked*") From ce1a3ccb2037fb24d8d4dd00f0f8081c1d72a77a Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Fri, 12 Feb 2021 17:12:45 -0500 Subject: [PATCH 12/12] Remove trailing space from the OutputPostfix/OutputDir comment. Co-authored-by: John Kastner --- clang/lib/3C/RewriteUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/3C/RewriteUtils.cpp b/clang/lib/3C/RewriteUtils.cpp index a0aa2828bfa4..b0a1a8b64c90 100644 --- a/clang/lib/3C/RewriteUtils.cpp +++ b/clang/lib/3C/RewriteUtils.cpp @@ -201,7 +201,7 @@ static void emit(Rewriter &R, ASTContext &C) { // We now know that we are using either OutputPostfix or OutputDir mode // because stdout mode is handled above. OutputPostfix defaults to "-" // when it's not provided, so any other value means that we should use - // OutputPostfix. Otherwise, we must be in OutputDir mode. + // OutputPostfix. Otherwise, we must be in OutputDir mode. if (OutputPostfix != "-") { // That path should be the same as the old one, with a // suffix added between the file name and the extension.