Skip to content

Commit c8c9bd3

Browse files
More precise explanation for test_vfscanf
1 parent 14af3ab commit c8c9bd3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/test/Analysis/stream-invalidate.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ int test_vfscanf_inner(const char *fmt, ...) {
179179

180180
void test_vfscanf() {
181181
int i = 42;
182+
int j = 43;
182183
int r = test_vfscanf_inner("%d", &i);
183184
if (r != EOF) {
185+
// i gets invalidated by the call to test_vfscanf_inner, not by vfscanf.
184186
clang_analyzer_dump(i); // expected-warning {{conj_$}}
185-
// FIXME va_list "hides" the pointer to i
187+
clang_analyzer_dump(j); // expected-warning {{43 S32b}}
186188
}
187189
}

0 commit comments

Comments
 (0)