#include "clang/AST/Randstruct.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTDiagnostic.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/Basic/Diagnostic.h"
#include "llvm/ADT/SmallVector.h"
#include <algorithm>
#include <random>
#include <set>
#include <sstream>
#include <string>
ASTContext;
FieldDecl;
SmallVector;
namespace {
enum { … };
class Bucket { … };
void Bucket::addField(FieldDecl *Field, int FieldSize) { … }
struct BitfieldRunBucket : public Bucket { … };
void randomizeStructureLayoutImpl(const ASTContext &Context,
llvm::SmallVectorImpl<FieldDecl *> &FieldsOut,
std::mt19937 &RNG) { … }
}
namespace clang {
namespace randstruct {
bool randomizeStructureLayout(const ASTContext &Context, RecordDecl *RD,
SmallVectorImpl<Decl *> &FinalOrdering) { … }
}
}