aboutsummaryrefslogblamecommitdiffstats
path: root/mutator_aux.h
blob: 303d01f01b0e3596d0e7ce015ca7b4f5ee8edda0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10






                                        
                              

                      
                         


                                                                                               







                                                                                                       


                                                                                                        






                           


     
#ifndef MUTATOR_AUX_H
#define MUTATOR_AUX_H

#include <string>
#include "clang/AST/AST.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "tinyxml2/tinyxml2.h"

using namespace clang;
using namespace tinyxml2;

namespace Devi {
SourceLocation SourceLocationHasMacro (SourceLocation SL, Rewriter &Rewrite, std::string Kind);

class XMLReport
{
public:
  XMLReport();

  void XMLCreateReport(void);
  void XMLAddNode(ASTContext* ASTC, SourceLocation SL, std::string MisraRule, std::string Description);
  /*overloaded for rule checks that announce the result on onendoftranslation instead of run
  since they dont have access to matchresult or astcontext.*/
  void XMLAddNode(FullSourceLoc FSL, SourceLocation SL, std::string MisraRule, std::string Description);
  void SaveReport(void);

private:
  XMLDocument XMLReportDoc;
  XMLNode* RootPointer;
};

}

#endif