diff --git a/include/mull/MutationPoint.h b/include/mull/MutationPoint.h index 0f9e693be..88202c42a 100644 --- a/include/mull/MutationPoint.h +++ b/include/mull/MutationPoint.h @@ -72,6 +72,7 @@ class MutationPoint { ~MutationPoint() = default; void setEndLocation(int line, int column); + void updateIdentifier(); Mutator *getMutator(); Mutator *getMutator() const; diff --git a/include/mull/MutationResult.h b/include/mull/MutationResult.h index f23588a1c..108697280 100644 --- a/include/mull/MutationResult.h +++ b/include/mull/MutationResult.h @@ -1,6 +1,7 @@ #pragma once #include "mull/ExecutionResult.h" +#include "mull/Mutant.h" #include namespace mull { @@ -23,5 +24,15 @@ class MutationResult { ExecutionResult result; Mutant *mutant; }; +struct MutationResultComparator { + bool operator()(std::unique_ptr &lhs, std::unique_ptr &rhs) { + return operator()(*lhs, *rhs); + } + + bool operator()(MutationResult &lhs, MutationResult &rhs) { + MutantComparator cmp; + return cmp(*lhs.getMutant(), *rhs.getMutant()); + } +}; } // namespace mull diff --git a/include/mull/Reporters/SQLiteReporter.h b/include/mull/Reporters/SQLiteReporter.h index 9d4b74469..5ee037a2f 100644 --- a/include/mull/Reporters/SQLiteReporter.h +++ b/include/mull/Reporters/SQLiteReporter.h @@ -1,5 +1,7 @@ #include "Reporter.h" +#include "mull/ExecutionResult.h" + #include #include #include @@ -10,6 +12,11 @@ namespace mull { class Result; class Diagnostics; +struct RawReport { + std::unordered_map info; + std::unordered_map> executionResults; +}; + class SQLiteReporter : public Reporter { public: explicit SQLiteReporter(Diagnostics &diagnostics, const std::string &reportDir = "", @@ -19,6 +26,7 @@ class SQLiteReporter : public Reporter { void reportResults(const Result &result) override; std::string getDatabasePath(); + static RawReport loadRawReport(const std::string &databasePath); private: Diagnostics &diagnostics; diff --git a/lib/MutantRunner.cpp b/lib/MutantRunner.cpp index f02d2439a..c703db38d 100644 --- a/lib/MutantRunner.cpp +++ b/lib/MutantRunner.cpp @@ -39,5 +39,7 @@ MutantRunner::runMutants(const std::string &executable, const std::vectorgetFunction()), mutatedFunction(nullptr), sourceLocation(SourceLocation::locationFromInstruction(instruction)), irMutator(irMutator), endLocation(SourceLocation::nullSourceLocation()) { - userIdentifier = mutator->getUniqueIdentifier() + ':' + sourceLocation.filePath + ':' + - std::to_string(sourceLocation.line) + ':' + - std::to_string(sourceLocation.column); + updateIdentifier(); } Mutator *MutationPoint::getMutator() { @@ -117,13 +115,20 @@ void MutationPoint::setEndLocation(int line, int column) { sourceLocation.filePath, line, column); + updateIdentifier(); +} + +void MutationPoint::updateIdentifier() { + userIdentifier = mutator->getUniqueIdentifier() + ':' + sourceLocation.filePath + ':' + + std::to_string(sourceLocation.line) + ':' + + std::to_string(sourceLocation.column) + ':' + std::to_string(endLocation.line) + + ':' + std::to_string(endLocation.column); } void MutationPoint::recordMutation() { assert(originalFunction != nullptr); llvm::Module *module = originalFunction->getParent(); - std::string encoding = getUserIdentifier() + ':' + std::to_string(endLocation.line) + ':' + - std::to_string(endLocation.column); + std::string encoding = getUserIdentifier(); llvm::Constant *constant = llvm::ConstantDataArray::getString(module->getContext(), llvm::StringRef(encoding)); auto *global = new llvm::GlobalVariable(*module, @@ -131,7 +136,7 @@ void MutationPoint::recordMutation() { true, llvm::GlobalVariable::InternalLinkage, constant, - this->getUserIdentifier()); + encoding); #if defined __APPLE__ global->setSection("__mull,.mull_mutants"); #else diff --git a/lib/Reporters/SQLiteReporter.cpp b/lib/Reporters/SQLiteReporter.cpp index 6cada15f3..0bb905dda 100644 --- a/lib/Reporters/SQLiteReporter.cpp +++ b/lib/Reporters/SQLiteReporter.cpp @@ -2,7 +2,6 @@ #include "mull/Bitcode.h" #include "mull/Diagnostics/Diagnostics.h" -#include "mull/ExecutionResult.h" #include "mull/Result.h" #include @@ -82,13 +81,15 @@ void mull::SQLiteReporter::reportResults(const Result &result) { sqlite3_reset(insertInformationStmt); } - const char *query = "INSERT INTO mutant VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10)"; + const char *query = + "INSERT INTO mutant VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12)"; sqlite3_stmt *stmt; sqlite3_prepare(database, query, -1, &stmt, nullptr); for (auto &mutationResult : result.getMutationResults()) { auto mutant = mutationResult->getMutant(); - auto &location = mutant->getSourceLocation(); + auto location = mutant->getSourceLocation(); + auto endLocation = mutant->getEndLocation(); ExecutionResult execution = mutationResult->getExecutionResult(); @@ -100,11 +101,12 @@ void mull::SQLiteReporter::reportResults(const Result &result) { sqlite3_bind_text(stmt, index++, location.directory.c_str(), -1, SQLITE_TRANSIENT); sqlite3_bind_int(stmt, index++, location.line); sqlite3_bind_int(stmt, index++, location.column); + sqlite3_bind_int(stmt, index++, endLocation.line); + sqlite3_bind_int(stmt, index++, endLocation.column); sqlite3_bind_int(stmt, index++, execution.status); sqlite3_bind_int64(stmt, index++, execution.runningTime); sqlite3_bind_text(stmt, index++, execution.stdoutOutput.c_str(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, index++, execution.stderrOutput.c_str(), -1, SQLITE_TRANSIENT); - sqlite3_step(stmt); sqlite3_clear_bindings(stmt); sqlite3_reset(stmt); @@ -118,20 +120,22 @@ void mull::SQLiteReporter::reportResults(const Result &result) { } static const char *CreateTables = R"CreateTables( -CREATE TABLE mutant ( +CREATE TABLE IF NOT EXISTS mutant ( mutant_id TEXT, mutator TEXT, filename TEXT, directory TEXT, line_number INT, column_number INT, + end_line_number INT, + end_column_number INT, status INT, duration INT, stdout TEXT, stderr TEXT ); -CREATE TABLE information ( +CREATE TABLE IF NOT EXISTS information ( key TEXT, value TEXT ); @@ -140,3 +144,60 @@ CREATE TABLE information ( static void createTables(mull::Diagnostics &diagnostics, sqlite3 *database) { sqlite_exec(diagnostics, database, CreateTables); } + +RawReport mull::SQLiteReporter::loadRawReport(const std::string &databasePath) { + sqlite3 *database; + sqlite3_open(databasePath.c_str(), &database); + + std::unordered_map information; + sqlite3_stmt *selectInfoStmt; + sqlite3_prepare(database, "select * from information", -1, &selectInfoStmt, nullptr); + while (sqlite3_step(selectInfoStmt) == SQLITE_ROW) { + auto key = sqlite3_column_text(selectInfoStmt, 0); + auto value = sqlite3_column_text(selectInfoStmt, 1); + information[reinterpret_cast(key)] = reinterpret_cast(value); + } + sqlite3_finalize(selectInfoStmt); + + std::unordered_map> mapping; + + sqlite3_stmt *selectMutantsStmt; + sqlite3_prepare(database, "select * from mutant", -1, &selectMutantsStmt, nullptr); + while (sqlite3_step(selectMutantsStmt) == SQLITE_ROW) { + int index = 0; + std::string mutant_id = + reinterpret_cast(sqlite3_column_text(selectInfoStmt, index++)); + std::string mutator = + reinterpret_cast(sqlite3_column_text(selectInfoStmt, index++)); + std::string filename = + reinterpret_cast(sqlite3_column_text(selectInfoStmt, index++)); + std::string directory = + reinterpret_cast(sqlite3_column_text(selectInfoStmt, index++)); + auto line_number = sqlite3_column_int(selectInfoStmt, index++); + auto column_number = sqlite3_column_int(selectInfoStmt, index++); + auto end_line_number = sqlite3_column_int(selectInfoStmt, index++); + auto end_column_number = sqlite3_column_int(selectInfoStmt, index++); + auto status = sqlite3_column_int(selectInfoStmt, index++); + auto duration = sqlite3_column_int64(selectInfoStmt, index++); + std::string stdout_string = + reinterpret_cast(sqlite3_column_text(selectInfoStmt, index++)); + std::string stderr_string = + reinterpret_cast(sqlite3_column_text(selectInfoStmt, index++)); + + ExecutionResult executionResult; + executionResult.runningTime = duration; + executionResult.stdoutOutput = stdout_string; + executionResult.stderrOutput = stderr_string; + executionResult.status = static_cast(status); + + SourceLocation location(directory, filename, directory, filename, line_number, column_number); + SourceLocation endLocation( + directory, filename, directory, filename, end_line_number, end_column_number); + mapping[mutant_id].push_back(executionResult); + } + sqlite3_finalize(selectMutantsStmt); + + sqlite3_close(database); + + return { .info = std::move(information), .executionResults = std::move(mapping) }; +} diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index 7d3889715..25a370a6d 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -17,8 +17,9 @@ set(TEST_CXX_FLAGS ) set(LIT_COMMAND - PATH_TO_LLVM=${PATH_TO_LLVM} LLVM_VERSION_MAJOR=${LLVM_VERSION_MAJOR} + LLVM_VERSION_MAJOR=${LLVM_VERSION_MAJOR} CURRENT_DIR=${CMAKE_CURRENT_SOURCE_DIR} + mull_reporter=$ mull_runner=$ mull_frontend_cxx=$ mull_ir_frontend=$ diff --git a/tests/integration/cxx-frontend/00-sandbox/sample.cpp b/tests/integration/cxx-frontend/00-sandbox/sample.cpp index 761f2b92e..b99339fd3 100644 --- a/tests/integration/cxx-frontend/00-sandbox/sample.cpp +++ b/tests/integration/cxx-frontend/00-sandbox/sample.cpp @@ -24,9 +24,9 @@ RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s-ast.exe RUN: %clang_cxx %sysroot -g %pass_mull_ir_frontend %s -o %s-ir.exe RUN: %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:12"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:12:6:13"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION RUN: %s-ir.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:12"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:12:6:13"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/binary_operator/01-return-expr/sample.cpp b/tests/integration/cxx-frontend/binary_operator/01-return-expr/sample.cpp index 6443ec5e6..32489d90a 100644 --- a/tests/integration/cxx-frontend/binary_operator/01-return-expr/sample.cpp +++ b/tests/integration/cxx-frontend/binary_operator/01-return-expr/sample.cpp @@ -23,10 +23,10 @@ RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s-ast.exe RUN: %clang_cxx -g %sysroot %pass_mull_ir_frontend %s -o %s-ir.exe RUN: %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:12"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:12:6:13"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION RUN: %s-ir.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:12"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:12:6:13"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/binary_operator/02-paren-expr/sample.cpp b/tests/integration/cxx-frontend/binary_operator/02-paren-expr/sample.cpp index 3068e1ac9..d1a276691 100644 --- a/tests/integration/cxx-frontend/binary_operator/02-paren-expr/sample.cpp +++ b/tests/integration/cxx-frontend/binary_operator/02-paren-expr/sample.cpp @@ -23,9 +23,9 @@ RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s-ast.exe RUN: %clang_cxx %sysroot -g %pass_mull_ir_frontend %s -o %s-ir.exe RUN: %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:13"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:13:6:14"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION RUN: %s-ir.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:13"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:13:6:14"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/binary_operator/03-implicit-cast-expr/sample.cpp b/tests/integration/cxx-frontend/binary_operator/03-implicit-cast-expr/sample.cpp index 1e0a6c217..e4f8a6b5c 100644 --- a/tests/integration/cxx-frontend/binary_operator/03-implicit-cast-expr/sample.cpp +++ b/tests/integration/cxx-frontend/binary_operator/03-implicit-cast-expr/sample.cpp @@ -27,10 +27,10 @@ RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s-ast.exe RUN: %clang_cxx %sysroot -g %pass_mull_ir_frontend %s -o %s-ir.exe RUN: %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:9"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:9:6:10"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION RUN: %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:9"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:9:6:10"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/binary_operator/05-var-decl/sample.cpp b/tests/integration/cxx-frontend/binary_operator/05-var-decl/sample.cpp index b33584c2c..f34ec501a 100644 --- a/tests/integration/cxx-frontend/binary_operator/05-var-decl/sample.cpp +++ b/tests/integration/cxx-frontend/binary_operator/05-var-decl/sample.cpp @@ -24,10 +24,10 @@ RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s-ast.exe RUN: %clang_cxx %sysroot -g %pass_mull_ir_frontend %s -o %s-ir.exe RUN: %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:13"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:13:6:14"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION RUN: %s-ir.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:13"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:13:6:14"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/binary_operator/20-parent-is-binary-operator-lhs/sample.cpp b/tests/integration/cxx-frontend/binary_operator/20-parent-is-binary-operator-lhs/sample.cpp index 08f0c1f2f..91e82a05e 100644 --- a/tests/integration/cxx-frontend/binary_operator/20-parent-is-binary-operator-lhs/sample.cpp +++ b/tests/integration/cxx-frontend/binary_operator/20-parent-is-binary-operator-lhs/sample.cpp @@ -28,10 +28,10 @@ RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s-ast.exe RUN: %clang_cxx %sysroot -g %pass_mull_ir_frontend %s -o %s-ir.exe RUN: %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:33"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:33:6:34"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION RUN: %s-ir.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:33"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:33:6:34"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/binary_operator/21-parent-is-binary-operator-rhs/sample.cpp b/tests/integration/cxx-frontend/binary_operator/21-parent-is-binary-operator-rhs/sample.cpp index 47b24260d..58ced749b 100644 --- a/tests/integration/cxx-frontend/binary_operator/21-parent-is-binary-operator-rhs/sample.cpp +++ b/tests/integration/cxx-frontend/binary_operator/21-parent-is-binary-operator-rhs/sample.cpp @@ -23,10 +23,10 @@ RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s-ast.exe RUN: %clang_cxx %sysroot -g %pass_mull_ir_frontend %s -o %s-ir.exe RUN: %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:18"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:18:6:19"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION RUN: %s-ir.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:18"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:18:6:19"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/binary_operator/30-parent-is-conditional-operator-cond/sample.cpp b/tests/integration/cxx-frontend/binary_operator/30-parent-is-conditional-operator-cond/sample.cpp index 7899ec294..df1675baa 100644 --- a/tests/integration/cxx-frontend/binary_operator/30-parent-is-conditional-operator-cond/sample.cpp +++ b/tests/integration/cxx-frontend/binary_operator/30-parent-is-conditional-operator-cond/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_logical_or_to_and:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_logical_or_to_and:%s:6:12:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/binary_operator/31-parent-is-conditional-operator-rhs/sample.cpp b/tests/integration/cxx-frontend/binary_operator/31-parent-is-conditional-operator-rhs/sample.cpp index 1afc227f7..19d3322a0 100644 --- a/tests/integration/cxx-frontend/binary_operator/31-parent-is-conditional-operator-rhs/sample.cpp +++ b/tests/integration/cxx-frontend/binary_operator/31-parent-is-conditional-operator-rhs/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_logical_or_to_and:%s:6:28"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_logical_or_to_and:%s:6:28:6:30"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/binary_operator/32-parent-is-conditional-operator-lhs/sample.cpp b/tests/integration/cxx-frontend/binary_operator/32-parent-is-conditional-operator-lhs/sample.cpp index 806af205f..1887b4433 100644 --- a/tests/integration/cxx-frontend/binary_operator/32-parent-is-conditional-operator-lhs/sample.cpp +++ b/tests/integration/cxx-frontend/binary_operator/32-parent-is-conditional-operator-lhs/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_logical_or_to_and:%s:6:20"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_logical_or_to_and:%s:6:20:6:22"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/debug_information/cxx_add_to_sub/sample.cpp b/tests/integration/cxx-frontend/debug_information/cxx_add_to_sub/sample.cpp index 161770141..88cea0e6f 100644 --- a/tests/integration/cxx-frontend/debug_information/cxx_add_to_sub/sample.cpp +++ b/tests/integration/cxx-frontend/debug_information/cxx_add_to_sub/sample.cpp @@ -20,15 +20,15 @@ int main() { /** RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=FRONTEND -FRONTEND:Recording mutation point: cxx_add_to_sub:{{.*}}/sample.cpp:6:12 (end: 6:13) +FRONTEND:Recording mutation point: cxx_add_to_sub:{{.*}}/sample.cpp:6:12:6:13 (end: 6:13) RUN: %clang_cxx %sysroot -g %pass_mull_ir_frontend %s -o %s-ir.exe RUN: %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:12"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:12:6:13"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION RUN: %s-ir.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:12"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:12:6:13"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/debug_information/cxx_init_const/sample.cpp b/tests/integration/cxx-frontend/debug_information/cxx_init_const/sample.cpp index 6ee62a993..c7b101e58 100644 --- a/tests/integration/cxx-frontend/debug_information/cxx_init_const/sample.cpp +++ b/tests/integration/cxx-frontend/debug_information/cxx_init_const/sample.cpp @@ -21,10 +21,10 @@ int main() { /** RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=FRONTEND -FRONTEND:Recording mutation point: cxx_init_const:{{.*}}/sample.cpp:6:14 (end: 6:16) +FRONTEND:Recording mutation point: cxx_init_const:{{.*}}/sample.cpp:6:14:6:16 (end: 6:16) RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_init_const:%s:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_init_const:%s:6:14:6:16"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/debug_information/cxx_remove_negation/sample.cpp b/tests/integration/cxx-frontend/debug_information/cxx_remove_negation/sample.cpp index ea24f7c08..92a0f7097 100644 --- a/tests/integration/cxx-frontend/debug_information/cxx_remove_negation/sample.cpp +++ b/tests/integration/cxx-frontend/debug_information/cxx_remove_negation/sample.cpp @@ -21,13 +21,13 @@ int main() { /** RUN: %clang_cxx %sysroot -g %pass_mull_ir_frontend %s -o %s-ir.exe RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=FRONTEND -FRONTEND:Recording mutation point: cxx_remove_negation:{{.*}}/sample.cpp:6:10 (end: 6:11) +FRONTEND:Recording mutation point: cxx_remove_negation:{{.*}}/sample.cpp:6:10:6:11 (end: 6:11) RUN: %s-ast.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_remove_negation:%s:6:10"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_remove_negation:%s:6:10:6:11"=1 %s-ast.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION RUN: %s-ir.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_remove_negation:%s:6:10"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_remove_negation:%s:6:10:6:11"=1 %s-ir.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/mutations_in_macros/01_macro_add_to_sub/sample.cpp b/tests/integration/cxx-frontend/mutations_in_macros/01_macro_add_to_sub/sample.cpp index caaa741ad..999f0874f 100644 --- a/tests/integration/cxx-frontend/mutations_in_macros/01_macro_add_to_sub/sample.cpp +++ b/tests/integration/cxx-frontend/mutations_in_macros/01_macro_add_to_sub/sample.cpp @@ -21,10 +21,10 @@ int main() { /** RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=FRONTEND -FRONTEND:Recording mutation point: cxx_add_to_sub:{{.*}}/sample.cpp:5:21 (end: 5:22) +FRONTEND:Recording mutation point: cxx_add_to_sub:{{.*}}/sample.cpp:5:21:5:22 (end: 5:22) RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:5:21"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:5:21:5:22"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/mutations_in_macros/02_macro_remove_void_function/sample.cpp b/tests/integration/cxx-frontend/mutations_in_macros/02_macro_remove_void_function/sample.cpp index 9d3cba2dd..107386f05 100644 --- a/tests/integration/cxx-frontend/mutations_in_macros/02_macro_remove_void_function/sample.cpp +++ b/tests/integration/cxx-frontend/mutations_in_macros/02_macro_remove_void_function/sample.cpp @@ -28,10 +28,10 @@ int main() { /** RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=FRONTEND -FRONTEND:Recording mutation point: cxx_remove_void_call:{{.*}}/sample.cpp:9:32 (end: 9:53) +FRONTEND:Recording mutation point: cxx_remove_void_call:{{.*}}/sample.cpp:9:32:9:53 (end: 9:53) RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_remove_void_call:%s:9:32"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_remove_void_call:%s:9:32:9:53"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/mutations_in_macros/03_macro_add_to_sub_in_assert/sample.cpp b/tests/integration/cxx-frontend/mutations_in_macros/03_macro_add_to_sub_in_assert/sample.cpp index 86cf2a569..4877de72b 100644 --- a/tests/integration/cxx-frontend/mutations_in_macros/03_macro_add_to_sub_in_assert/sample.cpp +++ b/tests/integration/cxx-frontend/mutations_in_macros/03_macro_add_to_sub_in_assert/sample.cpp @@ -23,10 +23,10 @@ int main() { /** RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=FRONTEND -FRONTEND:Recording mutation point: cxx_add_to_sub:{{.*}}/sample.cpp:9:13 (end: 9:14) +FRONTEND:Recording mutation point: cxx_add_to_sub:{{.*}}/sample.cpp:9:13:9:14 (end: 9:14) RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:9:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:9:13:9:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/mutations_in_macros/04_macro_add_to_sub_in_header/sample.cpp b/tests/integration/cxx-frontend/mutations_in_macros/04_macro_add_to_sub_in_header/sample.cpp index df6a97cd8..ac2ccae72 100644 --- a/tests/integration/cxx-frontend/mutations_in_macros/04_macro_add_to_sub_in_header/sample.cpp +++ b/tests/integration/cxx-frontend/mutations_in_macros/04_macro_add_to_sub_in_header/sample.cpp @@ -22,10 +22,10 @@ int main() { /** RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=FRONTEND -FRONTEND:Recording mutation point: cxx_add_to_sub:{{.*}}/sum.h:1:21 (end: 1:22) +FRONTEND:Recording mutation point: cxx_add_to_sub:{{.*}}/sum.h:1:21:1:22 (end: 1:22) RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%S/sum.h:1:21"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%S/sum.h:1:21:1:22"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_add_assign_to_sub_assign/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_add_assign_to_sub_assign/sample.cpp index 4817d5868..45f8d83c1 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_add_assign_to_sub_assign/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_add_assign_to_sub_assign/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_assign_to_sub_assign:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_assign_to_sub_assign:%s:7:7:7:9"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_add_to_sub/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_add_to_sub/sample.cpp index 1da24b88a..4cc9f379a 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_add_to_sub/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_add_to_sub/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_add_to_sub:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_add_to_sub:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_and_assign_to_or_assign/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_and_assign_to_or_assign/sample.cpp index 819f80cfe..3c563c49b 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_and_assign_to_or_assign/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_and_assign_to_or_assign/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_and_assign_to_or_assign:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_and_assign_to_or_assign:%s:7:7:7:9"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_and_to_or/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_and_to_or/sample.cpp index 7a431d0c5..ece250717 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_and_to_or/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_and_to_or/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_and_to_or:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_and_to_or:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const/sample.cpp index 6798cdd2e..ff82041db 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_assign_const:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_assign_const:%s:7:7:7:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const_double/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const_double/sample.cpp index b1414d9d0..f6d24f4fa 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const_double/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const_double/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_assign_const:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_assign_const:%s:7:7:7:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const_float/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const_float/sample.cpp index debf32a90..d4d0c33ef 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const_float/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_assign_const_float/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_assign_const:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_assign_const:%s:7:7:7:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_bitwise_not_to_noop/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_bitwise_not_to_noop/sample.cpp index e144769ea..45e3b1eb6 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_bitwise_not_to_noop/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_bitwise_not_to_noop/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_bitwise_not_to_noop:%s:6:10"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_bitwise_not_to_noop:%s:6:10:6:11"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_div_assign_to_mul_assign/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_div_assign_to_mul_assign/sample.cpp index 4703efb29..60dabc8ef 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_div_assign_to_mul_assign/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_div_assign_to_mul_assign/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_div_assign_to_mul_assign:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_div_assign_to_mul_assign:%s:7:7:7:9"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_div_to_mul/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_div_to_mul/sample.cpp index fa6d0ca63..9091ded9d 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_div_to_mul/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_div_to_mul/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_div_to_mul:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_div_to_mul:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_eq_to_ne/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_eq_to_ne/sample.cpp index 15853fba4..54befc79d 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_eq_to_ne/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_eq_to_ne/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_ne_to_eq:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_ne_to_eq:%s:6:12:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_ge_to_gt/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_ge_to_gt/sample.cpp index 3f4aacf4e..0e6592870 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_ge_to_gt/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_ge_to_gt/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_ge_to_gt:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_ge_to_gt:%s:6:12:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_ge_to_lt/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_ge_to_lt/sample.cpp index 7831f31e7..e707cf5c6 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_ge_to_lt/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_ge_to_lt/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_ge_to_lt:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_ge_to_lt:%s:6:12:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_gt_to_ge/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_gt_to_ge/sample.cpp index 4c89189a2..4e668a840 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_gt_to_ge/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_gt_to_ge/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_gt_to_ge:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_gt_to_ge:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_gt_to_le/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_gt_to_le/sample.cpp index 076315796..47e136d27 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_gt_to_le/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_gt_to_le/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_gt_to_le:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_gt_to_le:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_init_const/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_init_const/sample.cpp index 1e934ffe0..9222a6a68 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_init_const/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_init_const/sample.cpp @@ -23,7 +23,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_init_const:%s:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_init_const:%s:6:14:6:16"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_init_const_double/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_init_const_double/sample.cpp index f3d146fe5..f7efca62b 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_init_const_double/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_init_const_double/sample.cpp @@ -23,7 +23,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_init_const:%s:6:17"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_init_const:%s:6:17:6:21"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_init_const_float/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_init_const_float/sample.cpp index af6de90be..d901138a4 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_init_const_float/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_init_const_float/sample.cpp @@ -23,7 +23,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_init_const:%s:6:16"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_init_const:%s:6:16:6:18"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_le_to_gt/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_le_to_gt/sample.cpp index 66d6bfa49..10e466d9a 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_le_to_gt/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_le_to_gt/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_le_to_gt:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_le_to_gt:%s:6:12:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_le_to_lt/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_le_to_lt/sample.cpp index a021524b7..417a5be20 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_le_to_lt/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_le_to_lt/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_le_to_lt:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_le_to_lt:%s:6:12:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_logical_and_to_or/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_logical_and_to_or/sample.cpp index 2ceeeb7b3..dbe55b8da 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_logical_and_to_or/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_logical_and_to_or/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_logical_and_to_or:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_logical_and_to_or:%s:6:12:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_logical_or_to_and/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_logical_or_to_and/sample.cpp index d8c0719f0..99efd4dc0 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_logical_or_to_and/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_logical_or_to_and/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_logical_or_to_and:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_logical_or_to_and:%s:6:12:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_lshift_assign_to_rshift_assign/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_lshift_assign_to_rshift_assign/sample.cpp index eefa4b5a0..bb1d9a02f 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_lshift_assign_to_rshift_assign/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_lshift_assign_to_rshift_assign/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_lshift_assign_to_rshift_assign:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_lshift_assign_to_rshift_assign:%s:7:7:7:10"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_lshift_to_rshift/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_lshift_to_rshift/sample.cpp index 09dcb8112..ce44b651a 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_lshift_to_rshift/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_lshift_to_rshift/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_lshift_to_rshift:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_lshift_to_rshift:%s:6:12:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_lt_to_ge/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_lt_to_ge/sample.cpp index 0eb224441..1859b3575 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_lt_to_ge/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_lt_to_ge/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_lt_to_ge:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_lt_to_ge:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_lt_to_le/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_lt_to_le/sample.cpp index 18c5dc833..24b4d7d26 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_lt_to_le/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_lt_to_le/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_lt_to_le:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_lt_to_le:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_minus_to_noop/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_minus_to_noop/sample.cpp index be08fde21..2cfb9ea39 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_minus_to_noop/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_minus_to_noop/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_minus_to_noop:%s:6:10"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_minus_to_noop:%s:6:10:6:11"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_mul_assign_to_div_assign/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_mul_assign_to_div_assign/sample.cpp index 5d0a4094a..97785fb49 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_mul_assign_to_div_assign/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_mul_assign_to_div_assign/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_mul_assign_to_div_assign:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_mul_assign_to_div_assign:%s:7:7:7:9"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_mul_to_div/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_mul_to_div/sample.cpp index 1b85a38dc..365f83deb 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_mul_to_div/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_mul_to_div/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_mul_to_div:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_mul_to_div:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_ne_to_eq/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_ne_to_eq/sample.cpp index 7cc6136d9..adc75b31b 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_ne_to_eq/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_ne_to_eq/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_eq_to_ne:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_eq_to_ne:%s:6:12:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_or_assign_to_and_assign/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_or_assign_to_and_assign/sample.cpp index 5eac1b595..6679d3362 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_or_assign_to_and_assign/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_or_assign_to_and_assign/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_or_assign_to_and_assign:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_or_assign_to_and_assign:%s:7:7:7:9"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_or_to_and/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_or_to_and/sample.cpp index d9a42477f..4d91d5a5c 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_or_to_and/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_or_to_and/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_or_to_and:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_or_to_and:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_post_dec_to_post_inc/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_post_dec_to_post_inc/sample.cpp index 95080a70e..7cb67ae26 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_post_dec_to_post_inc/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_post_dec_to_post_inc/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_post_dec_to_post_inc:%s:7:6"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_post_dec_to_post_inc:%s:7:6:7:8"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_post_inc_to_post_dec/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_post_inc_to_post_dec/sample.cpp index 729efd62a..ed1c44213 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_post_inc_to_post_dec/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_post_inc_to_post_dec/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_post_inc_to_post_dec:%s:7:6"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_post_inc_to_post_dec:%s:7:6:7:8"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_pre_dec_to_pre_inc/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_pre_dec_to_pre_inc/sample.cpp index ef3dbc36b..2a9631c8a 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_pre_dec_to_pre_inc/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_pre_dec_to_pre_inc/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_pre_dec_to_pre_inc:%s:7:3"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_pre_dec_to_pre_inc:%s:7:3:7:5"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_pre_inc_to_pre_dec/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_pre_inc_to_pre_dec/sample.cpp index 3978d02e1..d62d81279 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_pre_inc_to_pre_dec/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_pre_inc_to_pre_dec/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_pre_inc_to_pre_dec:%s:7:3"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_pre_inc_to_pre_dec:%s:7:3:7:5"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_rem_assign_to_div_assign/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_rem_assign_to_div_assign/sample.cpp index 420ab0876..260fed48c 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_rem_assign_to_div_assign/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_rem_assign_to_div_assign/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_rem_assign_to_div_assign:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_rem_assign_to_div_assign:%s:7:7:7:9"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_rem_to_div/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_rem_to_div/sample.cpp index 812dcea76..1d891dd01 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_rem_to_div/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_rem_to_div/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_rem_to_div:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_rem_to_div:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_remove_negation/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_remove_negation/sample.cpp index 71a22985d..193e7a0d6 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_remove_negation/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_remove_negation/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_remove_negation:%s:6:10"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_remove_negation:%s:6:10:6:11"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_remove_void_call/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_remove_void_call/sample.cpp index 0b31cfae6..85063e0e0 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_remove_void_call/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_remove_void_call/sample.cpp @@ -28,7 +28,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_remove_void_call:%s:11:3"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_remove_void_call:%s:11:3:11:25"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_replace_scalar_call/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_replace_scalar_call/sample.cpp index 35be39a02..ea9de3d0e 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_replace_scalar_call/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_replace_scalar_call/sample.cpp @@ -28,7 +28,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_replace_scalar_call:%s:11:9"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_replace_scalar_call:%s:11:9:11:27"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_rshift_assign_to_lshift_assign/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_rshift_assign_to_lshift_assign/sample.cpp index 32ee9cbdd..3194eab98 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_rshift_assign_to_lshift_assign/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_rshift_assign_to_lshift_assign/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_rshift_assign_to_lshift_assign:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_rshift_assign_to_lshift_assign:%s:7:7:7:10"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_rshift_to_lshift/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_rshift_to_lshift/sample.cpp index dd6c4c8e0..07351d388 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_rshift_to_lshift/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_rshift_to_lshift/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_rshift_to_lshift:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_rshift_to_lshift:%s:6:12:6:14"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_sub_assign_to_add_assign/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_sub_assign_to_add_assign/sample.cpp index 196286d0c..8da60d4b1 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_sub_assign_to_add_assign/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_sub_assign_to_add_assign/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_sub_assign_to_add_assign:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_sub_assign_to_add_assign:%s:7:7:7:9"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_sub_to_add/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_sub_to_add/sample.cpp index f55b58199..35a63a543 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_sub_to_add/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_sub_to_add/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_sub_to_add:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_sub_to_add:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_xor_assign_to_or_assign/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_xor_assign_to_or_assign/sample.cpp index 827a1b5c7..113758932 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_xor_assign_to_or_assign/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_xor_assign_to_or_assign/sample.cpp @@ -24,7 +24,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_xor_assign_to_or_assign:%s:7:7"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_xor_assign_to_or_assign:%s:7:7:7:9"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/cxx-frontend/supported-mutations/cxx_xor_to_or/sample.cpp b/tests/integration/cxx-frontend/supported-mutations/cxx_xor_to_or/sample.cpp index 827187089..dc2f9f71c 100644 --- a/tests/integration/cxx-frontend/supported-mutations/cxx_xor_to_or/sample.cpp +++ b/tests/integration/cxx-frontend/supported-mutations/cxx_xor_to_or/sample.cpp @@ -22,7 +22,7 @@ int main() { RUN: %clang_cxx %sysroot -fplugin=%mull_frontend_cxx %s -o %s.exe RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITHOUT_MUTATION -RUN: (env "cxx_xor_to_or:%s:6:12"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION +RUN: (env "cxx_xor_to_or:%s:6:12:6:13"=1 %s.exe || true) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=STANDALONE_WITH_MUTATION STANDALONE_WITHOUT_MUTATION:NORMAL STANDALONE_WITH_MUTATION:MUTATED diff --git a/tests/integration/debug/traceMutants/main.c b/tests/integration/debug/traceMutants/main.c index 1a7afa3de..1271f4460 100644 --- a/tests/integration/debug/traceMutants/main.c +++ b/tests/integration/debug/traceMutants/main.c @@ -10,14 +10,14 @@ int main() { // RUN: %clang_cc %sysroot %pass_mull_ir_frontend -g %s -o %s.exe // RUN: %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=CHECK -// RUN: env "cxx_add_to_sub:%s:4:12=1" %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=CHECK-MUTANT +// RUN: env "cxx_add_to_sub:%s:4:12:4:13=1" %s.exe | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=CHECK-MUTANT // CHECK:mull-trace: entering sum -// CHECK:mull-trace: checking for cxx_add_to_sub:{{.*}}/main.c:4:12 +// CHECK:mull-trace: checking for cxx_add_to_sub:{{.*}}/main.c:4:12:4:13 // CHECK:mull-trace: jumping over to original sum // CHECK:mull-trace: trampoline call sum // CHECK-MUTANT:mull-trace: entering sum -// CHECK-MUTANT:mull-trace: checking for cxx_add_to_sub:{{.*}}/main.c:4:12 -// CHECK-MUTANT:mull-trace: jumping over to cxx_add_to_sub:{{.*}}/main.c:4:12 +// CHECK-MUTANT:mull-trace: checking for cxx_add_to_sub:{{.*}}/main.c:4:12:4:13 +// CHECK-MUTANT:mull-trace: jumping over to cxx_add_to_sub:{{.*}}/main.c:4:12:4:13 // CHECK-MUTANT:mull-trace: trampoline call sum diff --git a/tests/integration/lit.cfg b/tests/integration/lit.cfg index f411c2c98..c80f2d0fe 100644 --- a/tests/integration/lit.cfg +++ b/tests/integration/lit.cfg @@ -28,6 +28,7 @@ clang_cc = os.environ.get('clang_cc', '') clang_cxx = os.environ.get('clang_cxx', '') llvm_profdata = os.environ.get('llvm_profdata', '') mull_runner = os.environ.get('mull_runner', '') +mull_reporter = os.environ.get('mull_reporter', '') mull_frontend_cxx = os.environ.get('mull_frontend_cxx', '') mull_ir_frontend = os.environ.get('mull_ir_frontend', '') filecheck = os.environ.get('filecheck', '') @@ -46,6 +47,7 @@ config.substitutions.append(('%clang_cxx', clang_cxx)) config.substitutions.append(('%sysroot', os.environ.get('sysroot', ''))) config.substitutions.append(('%llvm_profdata', llvm_profdata)) config.substitutions.append(('%mull_runner', mull_runner)) +config.substitutions.append(('%mull_reporter', mull_reporter)) config.substitutions.append(('%mull_frontend_cxx', mull_frontend_cxx)) config.substitutions.append(('%mull_ir_frontend', mull_ir_frontend)) config.substitutions.append(('%filecheck', filecheck)) diff --git a/tests/integration/reporters/invalid-paths/main.c b/tests/integration/reporters/invalid-paths/main.c index 347f4710c..17485985e 100644 --- a/tests/integration/reporters/invalid-paths/main.c +++ b/tests/integration/reporters/invalid-paths/main.c @@ -13,7 +13,7 @@ RUN: cp %s Output/main.c RUN: %clang_cc %sysroot -g -O0 %pass_mull_ir_frontend Output/main.c -o Output/main.exe RUN: rm Output/main.c RUN: %mull_runner --allow-surviving Output/main.exe -reporters IDE -reporters Patches -reporters Elements | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines -CHECK:[warning] IDEReporter: Cannot report 'cxx_add_to_sub:{{.*}}/Output/main.c:2:12': cannot read {{.*}}Output/main.c -CHECK:[warning] PatchesReporter: Cannot report 'cxx_add_to_sub:{{.*}}/Output/main.c:2:12': cannot read {{.*}}Output/main.c -CHECK:[warning] ElementsReporter: Cannot report 'cxx_add_to_sub:{{.*}}/Output/main.c:2:12': cannot read {{.*}}Output/main.c +CHECK:[warning] IDEReporter: Cannot report 'cxx_add_to_sub:{{.*}}/Output/main.c:2:12:2:13': cannot read {{.*}}Output/main.c +CHECK:[warning] PatchesReporter: Cannot report 'cxx_add_to_sub:{{.*}}/Output/main.c:2:12:2:13': cannot read {{.*}}Output/main.c +CHECK:[warning] ElementsReporter: Cannot report 'cxx_add_to_sub:{{.*}}/Output/main.c:2:12:2:13': cannot read {{.*}}Output/main.c */ diff --git a/tests/integration/reporters/sqlite-reporter/equality/main.cpp b/tests/integration/reporters/sqlite-reporter/equality/main.cpp index 940f1a478..e428ac7e0 100644 --- a/tests/integration/reporters/sqlite-reporter/equality/main.cpp +++ b/tests/integration/reporters/sqlite-reporter/equality/main.cpp @@ -23,14 +23,16 @@ CHECK-INFO: key = LLVM Version CHECK-INFO: key = Mull Version RUN: sqlite3 ./test.sqlite -line "select * from mutant" | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=CHECK-MUTANT -CHECK-MUTANT: mutant_id = cxx_eq_to_ne:{{.*}} -CHECK-MUTANT: mutator = cxx_eq_to_ne -CHECK-MUTANT: filename = {{.*}}main.cpp -CHECK-MUTANT: directory ={{.*}} -CHECK-MUTANT: line_number = 4 -CHECK-MUTANT:column_number = 12 -CHECK-MUTANT: status = 2 -CHECK-MUTANT: duration = {{.*}} -CHECK-MUTANT: stdout = stdout -CHECK-MUTANT: stderr = stderr +CHECK-MUTANT: mutant_id = cxx_eq_to_ne:{{.*}} +CHECK-MUTANT: mutator = cxx_eq_to_ne +CHECK-MUTANT: filename = {{.*}}main.cpp +CHECK-MUTANT: directory ={{.*}} +CHECK-MUTANT: line_number = 4 +CHECK-MUTANT: column_number = 12 +CHECK-MUTANT: end_line_number = 4 +CHECK-MUTANT:end_column_number = 14 +CHECK-MUTANT: status = 2 +CHECK-MUTANT: duration = {{.*}} +CHECK-MUTANT: stdout = stdout +CHECK-MUTANT: stderr = stderr */ diff --git a/tests/integration/reporters/sqlite-reporter/multiple-test-targets/add.c b/tests/integration/reporters/sqlite-reporter/multiple-test-targets/add.c new file mode 100644 index 000000000..69d7077e3 --- /dev/null +++ b/tests/integration/reporters/sqlite-reporter/multiple-test-targets/add.c @@ -0,0 +1,7 @@ +// RUN: true +#include "math.h" + +int main(int argc, char **argv) { + sub(0, 0); // making sure it's mutated + return !(add(10, 12) == 22); +} diff --git a/tests/integration/reporters/sqlite-reporter/multiple-test-targets/math.h b/tests/integration/reporters/sqlite-reporter/multiple-test-targets/math.h new file mode 100644 index 000000000..6ed2966ff --- /dev/null +++ b/tests/integration/reporters/sqlite-reporter/multiple-test-targets/math.h @@ -0,0 +1,7 @@ +static int add(int a, int b) { + return a + b; +} + +static int sub(int a, int b) { + return a - b; +} diff --git a/tests/integration/reporters/sqlite-reporter/multiple-test-targets/mull.yml b/tests/integration/reporters/sqlite-reporter/multiple-test-targets/mull.yml new file mode 100644 index 000000000..d0142d85c --- /dev/null +++ b/tests/integration/reporters/sqlite-reporter/multiple-test-targets/mull.yml @@ -0,0 +1,4 @@ +mutators: + - cxx_add_to_sub + - cxx_sub_to_add +quiet: false diff --git a/tests/integration/reporters/sqlite-reporter/multiple-test-targets/sub.c b/tests/integration/reporters/sqlite-reporter/multiple-test-targets/sub.c new file mode 100644 index 000000000..c68f73048 --- /dev/null +++ b/tests/integration/reporters/sqlite-reporter/multiple-test-targets/sub.c @@ -0,0 +1,7 @@ +// RUN: true +#include "math.h" + +int main(int argc, char **argv) { + add(0, 0); // making sure it's mutated + return !(sub(12, 10) == 2); +} diff --git a/tests/integration/reporters/sqlite-reporter/multiple-test-targets/test-case.itest b/tests/integration/reporters/sqlite-reporter/multiple-test-targets/test-case.itest new file mode 100644 index 000000000..47afda143 --- /dev/null +++ b/tests/integration/reporters/sqlite-reporter/multiple-test-targets/test-case.itest @@ -0,0 +1,16 @@ +RUN: %clang_cc -grecord-command-line -g -O0 %pass_mull_ir_frontend %S/add.c -o %t.add.exe +RUN: %mull_runner -ide-reporter-show-killed -allow-surviving -reporters=IDE %t.add.exe | %filecheck %s --dump-input=fail --check-prefix=CHECK_ADD +CHECK_ADD:{{.*}}/math.h:2:12: warning: Killed: Replaced + with - [cxx_add_to_sub] +CHECK_ADD:{{.*}}/math.h:6:12: warning: Survived: Replaced - with + [cxx_sub_to_add] + +RUN: %clang_cc -grecord-command-line -g -O0 %pass_mull_ir_frontend %S/sub.c -o %t.sub.exe +RUN: %mull_runner -ide-reporter-show-killed -allow-surviving -reporters=IDE %t.sub.exe | %filecheck %s --dump-input=fail --check-prefix=CHECK_SUB +CHECK_SUB:{{.*}}/math.h:6:12: warning: Killed: Replaced - with + [cxx_sub_to_add] +CHECK_SUB:{{.*}}/math.h:2:12: warning: Survived: Replaced + with - [cxx_add_to_sub] + +RUN: rm -f %T/report.sqlite +RUN: %mull_runner -allow-surviving -reporters=SQLite -report-dir %T -report-name report %t.sub.exe +RUN: %mull_runner -allow-surviving -reporters=SQLite -report-dir %T -report-name report %t.add.exe +RUN: %mull_reporter -ide-reporter-show-killed -allow-surviving -reporters=IDE %T/report.sqlite | %filecheck %s --dump-input=fail --check-prefix=CHECK_COMBINED +CHECK_COMBINED:{{.*}}/math.h:2:12: warning: Killed: Replaced + with - [cxx_add_to_sub] +CHECK_COMBINED:{{.*}}/math.h:6:12: warning: Killed: Replaced - with + [cxx_sub_to_add] diff --git a/tools/CLIOptions/CLIOptions.h b/tools/CLIOptions/CLIOptions.h index a48344d79..b1ca5b853 100644 --- a/tools/CLIOptions/CLIOptions.h +++ b/tools/CLIOptions/CLIOptions.h @@ -30,6 +30,16 @@ opt TestProgram( \ value_desc("path"), \ cat(MullCategory)) +#define SQLiteReport_() \ +opt SQLiteReport( \ + Positional, \ + "", \ + desc("Path to the sqlite report"), \ + Required, \ + init(""), \ + value_desc("path"), \ + cat(MullCategory)) + #define InputFile_() \ opt InputFile( \ Positional, \ diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index b3914ba72..f3d1b6de5 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -2,3 +2,4 @@ add_subdirectory(mull-cxx-frontend) add_subdirectory(mull-ir-frontend) add_subdirectory(mull-runner) +add_subdirectory(mull-reporter) diff --git a/tools/mull-cxx-frontend/src/ASTMutationPoint.cpp b/tools/mull-cxx-frontend/src/ASTMutationPoint.cpp index e9d2aaaac..d5fff6db0 100644 --- a/tools/mull-cxx-frontend/src/ASTMutationPoint.cpp +++ b/tools/mull-cxx-frontend/src/ASTMutationPoint.cpp @@ -14,7 +14,8 @@ ASTMutationPoint::ASTMutationPoint(std::unique_ptr mutation, endLine(endLine), endColumn(endColumn) { std::ostringstream mis; /// mutator:file:line:col:1 - mis << mutationIdentifier << ":" << sourceFilePath << ":" << beginLine << ":" << beginColumn; + mis << mutationIdentifier << ":" << sourceFilePath << ":" << beginLine << ":" << beginColumn + << ":" << endLine << ":" << endColumn; this->mutationIdentifier = mis.str(); std::ostringstream mbis; diff --git a/tools/mull-reporter/CMakeLists.txt b/tools/mull-reporter/CMakeLists.txt new file mode 100644 index 000000000..f1dd291af --- /dev/null +++ b/tools/mull-reporter/CMakeLists.txt @@ -0,0 +1,14 @@ +set(SOURCES ${CMAKE_CURRENT_LIST_DIR}/mull-reporter.cpp + ${CMAKE_CURRENT_LIST_DIR}/../CLIOptions/CLIOptions.cpp) + +add_mull_executable( + NAME + mull-reporter-${LLVM_VERSION_MAJOR} + SOURCES + ${SOURCES} + LINK_WITH + mull + json11 + LLVM) +target_include_directories(mull-reporter-${LLVM_VERSION_MAJOR} + PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../CLIOptions) diff --git a/tools/mull-reporter/mull-reporter-cli.h b/tools/mull-reporter/mull-reporter-cli.h new file mode 100644 index 000000000..c628079c7 --- /dev/null +++ b/tools/mull-reporter/mull-reporter-cli.h @@ -0,0 +1,48 @@ +#pragma once + +#include "CLIOptions.h" + +namespace tool { +using namespace mull; +using namespace llvm::cl; + +OptionCategory MullCategory("mull-reporter"); +SQLiteReport_(); +DumpCLIInterface_(); +ReportersOption_(); +DebugEnabled_(); +StrictModeEnabled_(); +AllowSurvivingEnabled_(); +MutationScoreThreshold_(); +NoOutput_(); +NoTestOutput_(); +NoMutantOutput_(); +ReportName_(); +ReportDirectory_(); +ReportPatchBaseDirectory_(); +IDEReporterShowKilled_(); + +void dumpCLIInterface(mull::Diagnostics &diagnostics) { + // Enumerating CLI options explicitly to control the order and what to show + Option *reporters = &(Option &)ReportersOption; + std::vector