| 82 | } |
| 83 | |
| 84 | ssize_t getDeclSize(const clang::Decl* decl) |
| 85 | { |
| 86 | const clang::CXXRecordDecl *cxx = llvm::dyn_cast<clang::CXXRecordDecl>(decl); |
| 87 | if (cxx && (cxx = cxx->getDefinition())) { |
| 88 | if (!cxxDeclIndependent(decl)) { |
| 89 | return -1; |
| 90 | } |
| 91 | return getTypeSize(cxx); |
| 92 | } |
| 93 | |
| 94 | const clang::RecordDecl *c = llvm::dyn_cast<clang::RecordDecl>(decl); |
| 95 | if (c && (c = c->getDefinition())) { |
| 96 | return getTypeSize(c); |
| 97 | } |
| 98 | |
| 99 | return -1; |
| 100 | } |
| 101 | |
| 102 | ssize_t getFieldOffset(const clang::Decl* decl) |
| 103 | { |
no test coverage detected