brintos

brintos / llvm-project-archived public Read only

0
0
Text · 430 B · 0e4d50e Raw
17 lines · cpp
1// RUN: %clang_analyze_cc1 -verify %s \2// RUN:   -analyzer-checker=security3 4void bzero(void *, unsigned long);5 6template <typename T> void foo(T l) {7  // The warning comes from multiple instances and with8  // different declarations that have same source location.9  // One instance should be shown.10  bzero(l, 1); // expected-warning{{The bzero() function is obsoleted}}11}12 13void p(int *p, unsigned *q) {14  foo(p);15  foo(q);16}17