virtualx-engine/modules
Tan Wang Leng 48a2fd7a3d gdscript_parser: Fix "unreachable code" false positive for loops
Depending on the conditional statements of the 'for' and 'while' loops,
their body may not even execute once. For example:

    func a():
        var arr = []
        for i in arr:
            return i
        # can be reached, but analysis says cannot
        return -1

    func b():
        var should_loop = false
        while should_loop:
           return 1
        # can be reached, but analysis says cannot
        return 0

The parser will complain that the statements after the comment cannot
be reached, but it is clearly possible for our scenario. This is
because the parser falsely assumes that the loop body will always
execute at least once.

Fix the code to remove this assumption for both of those loops.

(cherry picked from commit 7b1423a61e)
2020-05-25 16:31:07 +02:00
..
arkit Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
assimp Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
bmp Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
bullet Make softbody completelly stiff to attachment point 2020-05-01 10:56:57 +02:00
camera Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
csg Fix 'physicsw' may be used uninitialized warning in csg_shape.cpp 2020-05-11 13:33:20 +01:00
cvtt Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
dds Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
enet Merge pull request #35091 from Faless/dtls/enet 2020-05-05 13:40:59 +02:00
etc Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
freetype Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
gdnative Fix GDNative Variant type size on 32-bit platforms, add size checking static asserts. [3.2] 2020-05-17 16:11:49 +03:00
gdscript gdscript_parser: Fix "unreachable code" false positive for loops 2020-05-25 16:31:07 +02:00
gridmap Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
hdr Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
jpg Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
jsonrpc Improve jsonrpc error reporting 2020-05-15 16:42:24 -04:00
mbedtls Changed default for p_validate_certs to true. 2020-05-05 13:41:40 +02:00
mobile_vr Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
mono Mono/C#: Fix values not updated in remote inspector 2020-05-25 11:46:03 +02:00
ogg Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
opensimplex NoiseTexture: prevent race condition because of Ref::unref() 2020-04-16 12:47:18 +02:00
opus Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
pvr Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
recast Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
regex Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
squish Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
stb_vorbis Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
svg Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
tga Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
theora Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
tinyexr tinyexr: Enable C++11 threaded loading 2020-05-01 11:10:16 +02:00
upnp Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
vhacd Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
visual_script Change round return type to float 2020-04-16 12:57:21 +02:00
vorbis Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
webm Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
webp Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
webrtc Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
websocket Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
xatlas_unwrap Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
register_module_types.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
SCsub SCons: Add 'split_libmodules' option to workaround linker issue 2019-12-11 15:40:28 +01:00