1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | #ifndef LLVM_CLANG_SEMA_LOCINFOTYPE_H |
14 | #define LLVM_CLANG_SEMA_LOCINFOTYPE_H |
15 | |
16 | #include "clang/AST/Type.h" |
17 | |
18 | namespace clang { |
19 | |
20 | class TypeSourceInfo; |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | |
28 | class LocInfoType : public Type { |
29 | enum { |
30 | |
31 | |
32 | LocInfo = Type::TypeLast + 1 |
33 | }; |
34 | |
35 | TypeSourceInfo *DeclInfo; |
36 | |
37 | LocInfoType(QualType ty, TypeSourceInfo *TInfo) |
38 | : Type((TypeClass)LocInfo, ty, ty->isDependentType(), |
39 | ty->isInstantiationDependentType(), ty->isVariablyModifiedType(), |
40 | ty->containsUnexpandedParameterPack()), |
41 | DeclInfo(TInfo) { |
42 | (0) . __assert_fail ("getTypeClass() == (TypeClass)LocInfo && \"LocInfo didn't fit in TC?\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/LocInfoType.h", 42, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(getTypeClass() == (TypeClass)LocInfo && "LocInfo didn't fit in TC?"); |
43 | } |
44 | friend class Sema; |
45 | |
46 | public: |
47 | QualType getType() const { return getCanonicalTypeInternal(); } |
48 | TypeSourceInfo *getTypeSourceInfo() const { return DeclInfo; } |
49 | |
50 | void getAsStringInternal(std::string &Str, |
51 | const PrintingPolicy &Policy) const; |
52 | |
53 | static bool classof(const Type *T) { |
54 | return T->getTypeClass() == (TypeClass)LocInfo; |
55 | } |
56 | }; |
57 | |
58 | } |
59 | |
60 | #endif |
61 | |