aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bruiser/bruiser.cpp62
-rwxr-xr-xextra-tools/precommitTests.sh8
-rw-r--r--makefile3
3 files changed, 50 insertions, 23 deletions
diff --git a/bruiser/bruiser.cpp b/bruiser/bruiser.cpp
index 4bd4f87..4e2fae4 100644
--- a/bruiser/bruiser.cpp
+++ b/bruiser/bruiser.cpp
@@ -123,7 +123,6 @@ bruiser::BruiserReport::~BruiserReport()
BruiserLog.close();
}
-template <typename T>
/**
* @brief Will print the argument in the log file. Expects to receive valid types usable for a stream.
*
@@ -131,6 +130,7 @@ template <typename T>
*
* @return Returns true if the write was successful, false otherwise.
*/
+template <typename T>
bool bruiser::BruiserReport::PrintToLog(T __arg)
{
BruiserLog << __arg << "\n";
@@ -609,7 +609,10 @@ class BruiserFrontendAction : public ASTFrontendAction
{
public:
BruiserFrontendAction() {}
- virtual ~BruiserFrontendAction() {}
+ virtual ~BruiserFrontendAction()
+ {
+ delete BDCProto;
+ }
void EndSourceFileAction() override
{
@@ -619,21 +622,21 @@ public:
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, StringRef file) override
{
DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics();
- BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
- DE.setClient(BDCProto);
+ DE.setClient(BDCProto, false);
TheRewriter.setSourceMgr(CI.getSourceManager(), CI.getLangOpts());
return llvm::make_unique<BruiserASTConsumer>(TheRewriter);
}
private:
Rewriter TheRewriter;
+ BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
};
/**********************************************************************************************************************/
class LiveActionListVars : public ASTFrontendAction
{
public:
- LiveActionListVars() {}
- virtual ~LiveActionListVars()
+ LiveActionListVars() = default;
+ virtual ~LiveActionListVars()
{
delete BDCProto;
}
@@ -643,7 +646,7 @@ class LiveActionListVars : public ASTFrontendAction
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, StringRef file) override
{
DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics();
- DE.setClient(BDCProto);
+ DE.setClient(BDCProto, false);
TheRewriter.setSourceMgr(CI.getSourceManager(), CI.getLangOpts());
return llvm::make_unique<LiveListVarsConsumer>(TheRewriter);
}
@@ -657,105 +660,120 @@ class LiveActionListFuncs : public ASTFrontendAction
{
public:
LiveActionListFuncs() {}
- ~LiveActionListFuncs() {}
+ ~LiveActionListFuncs()
+ {
+ delete BDCProto;
+ }
void EndSourceFileAction() override {}
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, StringRef file) override
{
DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics();
- BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
- DE.setClient(BDCProto);
+ DE.setClient(BDCProto, false);
TheRewriter.setSourceMgr(CI.getSourceManager(), CI.getLangOpts());
return llvm::make_unique<LiveListFuncsConsumer>(TheRewriter);
}
private:
Rewriter TheRewriter;
+ BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
};
/**********************************************************************************************************************/
class LiveActionListStructs : public ASTFrontendAction
{
public:
LiveActionListStructs() {}
- ~LiveActionListStructs() {}
+ ~LiveActionListStructs()
+ {
+ delete BDCProto;
+ }
void EndSourceFileAction() override {}
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, StringRef file) override
{
DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics();
- BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
- DE.setClient(BDCProto);
+ DE.setClient(BDCProto, false);
TheRewriter.setSourceMgr(CI.getSourceManager(), CI.getLangOpts());
return llvm::make_unique<LiveListStructConsumer>(TheRewriter);
}
private:
Rewriter TheRewriter;
+ BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
};
/**********************************************************************************************************************/
class LiveActionListClasses : public ASTFrontendAction
{
public:
LiveActionListClasses() {}
- ~LiveActionListClasses() {}
+ ~LiveActionListClasses()
+ {
+ delete BDCProto;
+ }
void EndSourceFileAction() override {}
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, StringRef file) override
{
DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics();
- BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
- DE.setClient(BDCProto);
+ DE.setClient(BDCProto, false);
TheRewriter.setSourceMgr(CI.getSourceManager(), CI.getLangOpts());
return llvm::make_unique<LiveListClassConsumer>(TheRewriter);
}
private:
Rewriter TheRewriter;
+ BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
};
/**********************************************************************************************************************/
class LiveActionListUnions : public ASTFrontendAction
{
public:
LiveActionListUnions() {}
- ~LiveActionListUnions() {}
+ ~LiveActionListUnions()
+ {
+ delete BDCProto;
+ }
void EndSourceFileAction() override {}
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, StringRef file) override
{
DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics();
- BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
- DE.setClient(BDCProto);
+ DE.setClient(BDCProto, false);
TheRewriter.setSourceMgr(CI.getSourceManager(), CI.getLangOpts());
return llvm::make_unique<LiveListUnionConsumer>(TheRewriter);
}
private:
Rewriter TheRewriter;
+ BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
};
/**********************************************************************************************************************/
class LiveActionListArrays : public ASTFrontendAction
{
public:
LiveActionListArrays() {}
- ~LiveActionListArrays() {}
+ ~LiveActionListArrays()
+ {
+ delete BDCProto;
+ }
void EndSourceFileAction() override {}
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, StringRef file) override
{
DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics();
- BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
- DE.setClient(BDCProto);
+ DE.setClient(BDCProto, false);
TheRewriter.setSourceMgr(CI.getSourceManager(), CI.getLangOpts());
return llvm::make_unique<LiveListArrayConsumer>(TheRewriter);
}
private:
Rewriter TheRewriter;
+ BlankDiagConsumer* BDCProto = new BlankDiagConsumer;
};
/**********************************************************************************************************************/
/**********************************************************************************************************************/
diff --git a/extra-tools/precommitTests.sh b/extra-tools/precommitTests.sh
index b8ce27f..45af595 100755
--- a/extra-tools/precommitTests.sh
+++ b/extra-tools/precommitTests.sh
@@ -7,6 +7,8 @@ Orange="\033[0;33m"
NC="\033[0m"
REP_FILE="test/precommit.rep"
+TIME=$(date +%Y-%m-%d:%H:%M:%S)
+RELIC_COUNT=10
printf "${Lblue}switching to mutator root...\n${NC}" | tee ../test/precommit.rep
cd ..
@@ -63,6 +65,10 @@ echo ""
if [[ $? == 0 ]]; then
printf "${Green}mutator c++1z test build passed.\n${NC}" | tee -a ./test/precommit.rep
+ printf "${Orange}date and time of relic:.\n${NC}" | tee -a ./test/precommit.rep
+ echo $TIME | tee -a ./test/precommit.rep
+ cp ./mutator-lvl0 ./reliquary/m0/m0-$TIME
+ cp ./bruiser/bruiser ./reliquary/bruiser/bruiser-$TIME
else
printf "${Red}mutator c++1z test build failed.\n${NC}" | tee -a ./test/precommit.rep
fi
@@ -183,5 +189,5 @@ printf "${Lblue}cleaning the objects and exexutables...\n${NC}" | tee -a ../test
printf "${Lblue}finished running all tests...\n${NC}" | tee -a ../test/precommit.rep
#tell me when youre done
-echo -ne '\007' && echo "" && echo -ne '\007' && echo -ne '\007'
+echo -ne '\007' && echo "" && echo -ne '\007' && echo "" && echo -ne '\007'
printf "${Green}beep...\n${NC}"
diff --git a/makefile b/makefile
index 1c10d0e..575d7de 100644
--- a/makefile
+++ b/makefile
@@ -67,6 +67,9 @@ install:
chmod +x ./extra-tools/ReportPrintPretty.sh
chmod +x ./extra-tools/precommitTests.sh
if [[ ! -d "./temp" ]]; then mkdir temp; fi
+ if [[ ! -d "./reliquary" ]]; then mkdir reliquary; fi
+ if [[ ! -d "./reliquary/m0" ]]; then mkdir ./reliquary/m0; fi
+ if [[ ! -d "./reliquary/bruiser" ]]; then mkdir ./reliquary/bruiser; fi
$(shell echo MUTATOR_HOME=$$(pwd) > ./daemon/mutator.config)
help: