forked from OSchip/llvm-project
Add a "positive" matching test case for attribute 'noreturn' that involves a nested infinite loop.
llvm-svn: 82842
This commit is contained in:
parent
9fa2eefa4c
commit
7226af69cb
|
@ -11,6 +11,12 @@ void test2() {
|
|||
if (j) while (1) { }
|
||||
}
|
||||
|
||||
__attribute__((__noreturn__))
|
||||
void test2_positive() {
|
||||
if (j) while (1) { }
|
||||
} // expected-warning{{function declared 'noreturn' should not return}}
|
||||
|
||||
|
||||
// This test case illustrates that we don't warn about the missing return
|
||||
// because the function is marked noreturn and there is an infinite loop.
|
||||
extern int foo_test_3();
|
||||
|
|
Loading…
Reference in New Issue