Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / sizeofpack.cpp
blob8c0ca02b0710ac4c8b025966a90daa41d4489115
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection \
2 // RUN: -std=c++14 -verify %s
4 typedef __typeof(sizeof(int)) size_t;
6 void clang_analyzer_eval(bool);
8 template <int... N> size_t foo() {
9 return sizeof...(N);
12 void bar() {
13 clang_analyzer_eval(foo<>() == 0); // expected-warning{{TRUE}}
14 clang_analyzer_eval(foo<1, 2, 3>() == 3); // expected-warning{{TRUE}}