-
Notifications
You must be signed in to change notification settings - Fork 30
bit-fields support added #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
#define print_sizeof(S) printf("size of %*s : %zu bytes\n", ALIGN, #S, sizeof((S){})) | ||
|
||
//int main() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete unused code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -0,0 +1,118 @@ | |||
#include "bitfields.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move file to structures dir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
server/src/Tests.cpp
Outdated
for (size_t curPos = 0; curPos < arraySize; curPos += len) { | ||
switch (typesHandler.getTypeKind(type)) { | ||
for (size_t curPos = 0; curPos < arraySizeInBits; curPos += elementLenInBits) { | ||
switch (typesHandler.getTypeKind(type)) { // tdm_todo copypaste |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
server/src/Tests.cpp
Outdated
const MapAddressName &fromAddressToName, | ||
std::vector<InitReference> &initReferences, | ||
const std::optional<const Tests::MethodDescription> &testingMethod) { | ||
EnumInfo enumInfo; // tdm_todo refactor so don't create useless variable. create it in switch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete todo, or use same as other // TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
} else { | ||
ABORT_F("type is not an integerType: %s", type.baseType().c_str()); | ||
} | ||
bool isUnsigned = isUnsignedType(type); | ||
if (size == 1) { | ||
if (size == 8) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create enum for this sizes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed, left as is
if (Paths::getSourceLanguage(sourceFilePath) == utbot::Language::CXX) { | ||
const clang::CXXRecordDecl *cppD = dynamic_cast<const clang::CXXRecordDecl *>(D); | ||
const auto *cppD = llvm::dyn_cast<const clang::CXXRecordDecl>(D); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use auto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed, left as is
@@ -66,7 +66,7 @@ std::string TypesResolver::getFullname(const clang::TagDecl *TD, const clang::Qu | |||
fullname.insert(std::make_pair(id, currentStructName)); | |||
|
|||
if (Paths::getSourceLanguage(sourceFilePath) == utbot::Language::C) { | |||
if (const clang::RecordDecl *parentNode = llvm::dyn_cast<const clang::RecordDecl>(TD->getLexicalParent())) { | |||
if (const auto *parentNode = llvm::dyn_cast<const clang::RecordDecl>(TD->getLexicalParent())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use auto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed, left as is
.github/workflows/publish-utbot.yml
Outdated
@@ -6,6 +6,7 @@ on: | |||
- '[1-9][0-9][0-9][0-9].[1]?[0-9].[0-9]+' | |||
branches: | |||
- main | |||
- belous-dp/bitfields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this before merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
# Conflicts: # server/src/Tests.cpp # server/src/Tests.h # server/src/printers/KleeConstraintsPrinter.cpp # server/src/types/Types.cpp # server/src/types/Types.h # server/src/types/TypesResolver.cpp # server/src/visitors/AbstractValueViewVisitor.cpp
No description provided.