Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / html_diagnostics / relevant_lines / synthesized_body.cpp
blob2ed8355f6e6055127593791770c38178251a3191
1 // Faking std::call_once implementation.
2 namespace std {
3 typedef struct once_flag_s {
4 int _M_once = 0;
5 } once_flag;
7 template <class Callable, class... Args>
8 void call_once(once_flag &o, Callable&& func, Args&&... args);
9 } // namespace std
11 int deref(int *x) {
12 return *x;
15 void call_deref_once() {
16 static std::once_flag once;
17 int *p = nullptr;
18 std::call_once(once, &deref, p);
22 // RUN: rm -rf %t.output
23 // RUN: %clang_analyze_cc1 -std=c++11 -analyze -analyzer-checker=core -analyzer-output html -o %t.output %s
24 // RUN: cat %t.output/* | FileCheck %s --match-full-lines
25 // CHECK: var relevant_lines = {"1": {"3": 1, "8": 1, "11": 1, "12": 1, "15": 1, "16": 1, "17": 1, "18": 1}};