Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stefan Gränitz
Frama Clang
Commits
03b66079
Commit
03b66079
authored
Apr 04, 2022
by
Virgile Prevosto
Browse files
[clang2ir] Fix translation of negative integral constants
and remove useless declaration
parent
9797b5ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
ClangVisitor.cpp
View file @
03b66079
...
...
@@ -9169,8 +9169,7 @@ bool FramacVisitor::VisitVarDecl(clang::VarDecl* Decl) {
clang
::
APValue
*
resultingValue
=
Decl
->
evaluateValue
();
if
(
resultingValue
)
{
constantType
=
Decl
->
hasExternalStorage
()
?
ICEXTERNCONST
:
ICSTATICCONST
;
clang
::
APValue
*
resultingValue
=
Decl
->
evaluateValue
();
value
=
(
int64_t
)
resultingValue
->
getInt
().
getLimitedValue
(
UINT64_MAX
);
value
=
resultingValue
->
getInt
().
getExtValue
();
}
};
};
...
...
tests/basic/oracle/init.res.oracle
View file @
03b66079
...
...
@@ -46,8 +46,8 @@ struct _frama_c_rtti_name_info_node _frama_c_rtti_name_info =
.number_of_base_classes = 0,
.pvmt = (struct _frama_c_vmt *)0};
myStruct s = {.a = {(char)0}};
static int const I =
(int)4294967295
;
static long const L = (long)
4294967295
;
static int const I =
-1
;
static long const L = (long)
(-1)
;
static long long const LL = (long long)(-1);
int main(void)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment