diff --git a/cpp/ql/lib/DefaultOptions.qll b/cpp/ql/lib/DefaultOptions.qll index 0b5aada9179..e4aa8d1f2d7 100644 --- a/cpp/ql/lib/DefaultOptions.qll +++ b/cpp/ql/lib/DefaultOptions.qll @@ -54,11 +54,11 @@ class Options extends string { * * By default, this holds for `exit`, `_exit`, `_Exit`, `abort`, * `__assert_fail`, `longjmp`, `__builtin_unreachable` and any - * function with a `noreturn`, `__noreturn__`, `_Noreturn`, or - * `_noreturn` attribute or `noreturn` specifier. + * function with a `noreturn`, `__noreturn__`, or `_Noreturn` + * attribute or `noreturn` specifier. */ predicate exits(Function f) { - f.getAnAttribute().hasName(["noreturn", "__noreturn__", "_Noreturn", "_noreturn"]) + f.getAnAttribute().hasName(["noreturn", "__noreturn__", "_Noreturn"]) or f.getASpecifier().hasName("noreturn") or diff --git a/cpp/ql/test/query-tests/jsf/4.13 Functions/AV Rule 114/test.c b/cpp/ql/test/query-tests/jsf/4.13 Functions/AV Rule 114/test.c index 841166253bf..f0b2dff1330 100644 --- a/cpp/ql/test/query-tests/jsf/4.13 Functions/AV Rule 114/test.c +++ b/cpp/ql/test/query-tests/jsf/4.13 Functions/AV Rule 114/test.c @@ -129,7 +129,7 @@ int f23() { f22(); // GOOD } -[[___noreturn__]] void f24(); +[[__noreturn__]] void f24(); int f25() { f24(); // GOOD