We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c725ed7 commit eb1b47cCopy full SHA for eb1b47c
clang/test/Analysis/void-call-exit-modelling.c
@@ -15,3 +15,12 @@ void inf_loop_break_callee() {
15
void inf_loop_break_caller() {
16
inf_loop_break_callee(); // expected-note{{Calling 'inf_loop_break_callee'}}
17
}
18
+
19
+void inf_loop_break_top() {
20
+ void* data = malloc(10); // expected-note{{Memory is allocated}}
21
+ while (1) { // expected-note{{Loop condition is true}}
22
+ (void)data;
23
+ break; // No note that we jump to the line above from this break
24
+ } // expected-note@-1{{Execution jumps to the end of the function}}
25
+} // expected-warning{{Potential leak of memory pointed to by 'data'}}
26
+// expected-note@-1 {{Potential leak of memory pointed to by 'data'}}
0 commit comments