Merge pull request #991 from jbj/error-function-returns

Approved by geoffw0
This commit is contained in:
semmle-qlci
2019-02-27 08:01:39 +00:00
committed by GitHub
2 changed files with 2 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ class Options extends string
* Holds if a call to this function will never return.
*
* By default, this holds for `exit`, `_exit`, `abort`, `__assert_fail`,
* `longjmp`, `error`, `__builtin_unreachable` and any function with a
* `longjmp`, `__builtin_unreachable` and any function with a
* `noreturn` attribute.
*/
predicate exits(Function f) {
@@ -67,7 +67,6 @@ class Options extends string
name = "abort" or
name = "__assert_fail" or
name = "longjmp" or
name = "error" or
name = "__builtin_unreachable"
) or
CustomOptions::exits(f) // old Options.qll

View File

@@ -3,7 +3,7 @@
| test.cpp:1:6:1:9 | exit | exit | exits |
| test.cpp:2:6:2:10 | _exit | _exit | exits |
| test.cpp:3:6:3:10 | abort | abort | exits |
| test.cpp:4:6:4:10 | error | error | exits |
| test.cpp:4:6:4:10 | error | error | returns |
| test.cpp:5:6:5:18 | __assert_fail | __assert_fail | exits |
| test.cpp:7:6:7:12 | longjmp | longjmp | exits |
| test.cpp:8:6:8:15 | DoesReturn | DoesReturn | returns |