Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
5183ca9b
Commit
5183ca9b
authored
May 09, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't track arrays and c-structs/unions
parent
f368d4f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
Cython/Compiler/FlowControl.py
Cython/Compiler/FlowControl.py
+2
-3
No files found.
Cython/Compiler/FlowControl.py
View file @
5183ca9b
...
...
@@ -130,6 +130,8 @@ class ControlFlow(object):
def
is_tracked
(
self
,
entry
):
if
entry
.
is_anonymous
:
return
False
if
entry
.
type
.
is_array
or
entry
.
type
.
is_struct_or_union
:
return
False
return
entry
.
is_local
or
entry
.
is_pyclass_attr
or
entry
.
is_arg
def
mark_position
(
self
,
node
):
...
...
@@ -394,9 +396,6 @@ def check_definitions(flow, compiler_directives):
pass
elif
stat
.
entry
.
type
.
is_pyobject
or
stat
.
entry
.
type
.
is_unspecified
:
messages
.
error
(
stat
.
pos
,
"local variable '%s' referenced before assignment"
%
stat
.
entry
.
name
)
elif
not
stat
.
entry
.
type
.
is_array
and
not
stat
.
entry
.
type
.
is_struct_or_union
:
# TODO: not sure here
messages
.
warning
(
stat
.
pos
,
"local variable '%s' referenced before assignment"
%
stat
.
entry
.
name
)
else
:
if
compiler_directives
[
'warn.maybe_uninitialized'
]:
messages
.
warning
(
stat
.
pos
,
"local variable '%s' might be referenced before assignment"
%
stat
.
entry
.
name
)
...
...
Write
Preview
Markdown
is supported
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