godot/modules
Tan Wang Leng 7b1423a61e 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.
2020-05-16 20:02:55 +08:00
..
arkit Rename InputFilter back to Input 2020-04-28 15:19:49 +02:00
assimp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
basis_universal Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
bmp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
bullet Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
camera SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
csg Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
cvtt Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
dds Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
denoise Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
enet Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
etc Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
freetype SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
gdnative Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
gdnavigation Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
gdscript gdscript_parser: Fix "unreachable code" false positive for loops 2020-05-16 20:02:55 +08:00
glslang Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
gridmap Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
hdr Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
jpg Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
jsonrpc Improve jsonrpc error reporting 2020-05-15 23:55:41 +02:00
lightmapper_rd Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
mbedtls Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
mobile_vr Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
mono Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
ogg SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
opensimplex Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
opus SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
pvr Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
regex Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
squish Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
stb_vorbis Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
svg Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
tga Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
theora Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
tinyexr Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
upnp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
vhacd Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
visual_script Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
vorbis SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
webm Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
webp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
webrtc Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
websocket websocket: Fix crash at exit when not running the editor 2020-05-16 04:30:12 +02:00
xatlas_unwrap Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
modules_builders.py SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
register_module_types.h Moved the shader source compilation code outside RenderingDevice and Vulkan 2020-02-11 11:53:29 +01:00
SCsub fixed modules not beeing added to vsproj 2020-04-09 15:15:52 +02:00