-
Notifications
You must be signed in to change notification settings - Fork 27
/
TypesResolver.h
41 lines (27 loc) · 1.05 KB
/
TypesResolver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef UNITTESTBOT_TYPESRESOLVER_H
#define UNITTESTBOT_TYPESRESOLVER_H
#include "types/Types.h"
#include <clang/AST/Decl.h>
#include <cstddef>
#include <string>
#include <utility>
class Fetcher;
class TypesResolver {
private:
const Fetcher *const parent;
std::map <uint64_t, std::string> fullname;
public:
explicit TypesResolver(Fetcher const *parent);
void resolveStruct(const clang::RecordDecl *D, const std::string &name);
void resolveEnum(const clang::EnumDecl *EN, const std::string &name);
void resolveUnion(const clang::RecordDecl *D, const std::string &name);
void resolveStructEx(const clang::RecordDecl *D,
const std::string &name,
types::SubType subType);
void resolve(const clang::QualType &type);
private:
std::string getFullname(const clang::TagDecl *TD, const clang::QualType &canonicalType,
uint64_t id, const fs::path &sourceFilePath);
void updateMaximumAlignment(size_t alignment) const;
};
#endif // UNITTESTBOT_TYPESRESOLVER_H