Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d857f52

Browse files
authored
Merge pull request #991 from jbj/error-function-returns
Approved by geoffw0
2 parents dcaf0f8 + 07bd85e commit d857f52

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

cpp/ql/src/DefaultOptions.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Options extends string
5656
* Holds if a call to this function will never return.
5757
*
5858
* By default, this holds for `exit`, `_exit`, `abort`, `__assert_fail`,
59-
* `longjmp`, `error`, `__builtin_unreachable` and any function with a
59+
* `longjmp`, `__builtin_unreachable` and any function with a
6060
* `noreturn` attribute.
6161
*/
6262
predicate exits(Function f) {
@@ -67,7 +67,6 @@ class Options extends string
6767
name = "abort" or
6868
name = "__assert_fail" or
6969
name = "longjmp" or
70-
name = "error" or
7170
name = "__builtin_unreachable"
7271
) or
7372
CustomOptions::exits(f) // old Options.qll

cpp/ql/test/library-tests/controlflow/exits/exits.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
| test.cpp:1:6:1:9 | exit | exit | exits |
44
| test.cpp:2:6:2:10 | _exit | _exit | exits |
55
| test.cpp:3:6:3:10 | abort | abort | exits |
6-
| test.cpp:4:6:4:10 | error | error | exits |
6+
| test.cpp:4:6:4:10 | error | error | returns |
77
| test.cpp:5:6:5:18 | __assert_fail | __assert_fail | exits |
88
| test.cpp:7:6:7:12 | longjmp | longjmp | exits |
99
| test.cpp:8:6:8:15 | DoesReturn | DoesReturn | returns |

0 commit comments

Comments
 (0)