[RISCV][FMV] Support target_clones (#85786)
[llvm-project.git] / clang / test / Analysis / no-store-suppression.cpp
blob0ef4e0cf5d1faf7b0f709614d240181492d26099
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
3 // expected-no-diagnostics
5 #include "Inputs/no-store-suppression.h"
7 using namespace std;
9 namespace value_uninitialized_after_stream_shift {
10 void use(char c);
12 // Technically, it is absolutely necessary to check the status of cin after
13 // read before using the value that just read from it. Practically, we don't
14 // really care unless we eventually come up with a special security check
15 // for just that purpose. Static Analyzer shouldn't be yelling at every person's
16 // third program in their C++ 101.
17 void foo() {
18 char c;
19 std::cin >> c;
20 use(c); // no-warning
22 } // namespace value_uninitialized_after_stream_shift