[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Analysis / assume-controlled-environment.c
blobfce1a1e7bae330472779c9eff752dba94fb8f631
1 // RUN: %clang_analyze_cc1 -verify=untrusted-env %s \
2 // RUN: -analyzer-checker=core \
3 // RUN: -analyzer-checker=alpha.security.taint \
4 // RUN: -analyzer-checker=debug.TaintTest
6 // RUN: %clang_analyze_cc1 -verify %s -DEXPECT_NO_WARNINGS \
7 // RUN: -analyzer-config assume-controlled-environment=true \
8 // RUN: -analyzer-checker=core \
9 // RUN: -analyzer-checker=alpha.security.taint \
10 // RUN: -analyzer-checker=debug.TaintTest
13 #ifdef EXPECT_NO_WARNINGS
14 // expected-no-diagnostics
15 #endif
17 char *getenv(const char *name);
19 void foo(void) {
20 char *p = getenv("FOO"); // untrusted-env-warning {{tainted}}
21 (void)p; // untrusted-env-warning {{tainted}}