Skip to content

Commit

Permalink
Introduce mull-reporter for offline report analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDenisov committed Dec 15, 2024
1 parent 0a8f775 commit 9a7b031
Show file tree
Hide file tree
Showing 87 changed files with 530 additions and 116 deletions.
1 change: 1 addition & 0 deletions include/mull/MutationPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class MutationPoint {
~MutationPoint() = default;

void setEndLocation(int line, int column);
void updateIdentifier();

Mutator *getMutator();
Mutator *getMutator() const;
Expand Down
11 changes: 11 additions & 0 deletions include/mull/MutationResult.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include "mull/ExecutionResult.h"
#include "mull/Mutant.h"
#include <utility>

namespace mull {
Expand All @@ -23,5 +24,15 @@ class MutationResult {
ExecutionResult result;
Mutant *mutant;
};
struct MutationResultComparator {
bool operator()(std::unique_ptr<MutationResult> &lhs, std::unique_ptr<MutationResult> &rhs) {
return operator()(*lhs, *rhs);
}

bool operator()(MutationResult &lhs, MutationResult &rhs) {
MutantComparator cmp;
return cmp(*lhs.getMutant(), *rhs.getMutant());
}
};

} // namespace mull
8 changes: 8 additions & 0 deletions include/mull/Reporters/SQLiteReporter.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "Reporter.h"

#include "mull/ExecutionResult.h"

#include <memory>
#include <string>
#include <unordered_map>
Expand All @@ -10,6 +12,11 @@ namespace mull {
class Result;
class Diagnostics;

struct RawReport {
std::unordered_map<std::string, std::string> info;
std::unordered_map<std::string, std::vector<mull::ExecutionResult>> executionResults;
};

class SQLiteReporter : public Reporter {
public:
explicit SQLiteReporter(Diagnostics &diagnostics, const std::string &reportDir = "",
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions lib/MutantRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ MutantRunner::runMutants(const std::string &executable, const std::vector<std::s
diagnostics, "Running mutants", mutants, mutationResults, std::move(tasks));
mutantRunner.execute();

diagnostics.debug("Done running mutants");

return mutationResults;
}
17 changes: 11 additions & 6 deletions lib/MutationPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ MutationPoint::MutationPoint(Mutator *mutator, irm::IRMutation *irMutator,
bitcode(m), originalFunction(instruction->getFunction()), 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() {
Expand Down Expand Up @@ -117,21 +115,28 @@ 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,
constant->getType(),
true,
llvm::GlobalVariable::InternalLinkage,
constant,
this->getUserIdentifier());
encoding);
#if defined __APPLE__
global->setSection("__mull,.mull_mutants");
#else
Expand Down
73 changes: 67 additions & 6 deletions lib/Reporters/SQLiteReporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "mull/Bitcode.h"
#include "mull/Diagnostics/Diagnostics.h"
#include "mull/ExecutionResult.h"
#include "mull/Result.h"

#include <llvm/IR/DebugInfoMetadata.h>
Expand Down Expand Up @@ -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();

Expand All @@ -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);
Expand All @@ -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
);
Expand All @@ -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<std::string, std::string> 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<char const *>(key)] = reinterpret_cast<char const *>(value);
}
sqlite3_finalize(selectInfoStmt);

std::unordered_map<std::string, std::vector<ExecutionResult>> 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<char const *>(sqlite3_column_text(selectInfoStmt, index++));
std::string mutator =
reinterpret_cast<char const *>(sqlite3_column_text(selectInfoStmt, index++));
std::string filename =
reinterpret_cast<char const *>(sqlite3_column_text(selectInfoStmt, index++));
std::string directory =
reinterpret_cast<char const *>(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<char const *>(sqlite3_column_text(selectInfoStmt, index++));
std::string stderr_string =
reinterpret_cast<char const *>(sqlite3_column_text(selectInfoStmt, index++));

ExecutionResult executionResult;
executionResult.runningTime = duration;
executionResult.stdoutOutput = stdout_string;
executionResult.stderrOutput = stderr_string;
executionResult.status = static_cast<ExecutionStatus>(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) };
}
3 changes: 2 additions & 1 deletion tests/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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=$<TARGET_FILE:mull-reporter-${LLVM_VERSION_MAJOR}>
mull_runner=$<TARGET_FILE:mull-runner-${LLVM_VERSION_MAJOR}>
mull_frontend_cxx=$<TARGET_FILE:mull-cxx-frontend-${LLVM_VERSION_MAJOR}>
mull_ir_frontend=$<TARGET_FILE:mull-cxx-ir-frontend-${LLVM_VERSION_MAJOR}>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/cxx-frontend/00-sandbox/sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 9a7b031

Please sign in to comment.