summaryrefslogtreecommitdiffstats
path: root/test/PCH/cxx1z-init-statement.cpp
blob: d08fb7c56b712383cd707f55f2b5c94006355272 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Test this without pch.
// RUN: %clang_cc1 -std=c++1z -include %S/cxx1z-init-statement.h -fsyntax-only -emit-llvm -o - %s

// Test with pch.
// RUN: %clang_cc1 -x c++ -std=c++1z -emit-pch -o %t %S/cxx1z-init-statement.h
// RUN: %clang_cc1 -std=c++1z -include-pch %t -fsyntax-only -emit-llvm -o - %s 

void g0(void) {
  static_assert(test_if(-1) == -1, "");
  static_assert(test_if(0) == 0, "");
}

void g1(void) {
  static_assert(test_switch(-1) == -1, "");
  static_assert(test_switch(0) == 0, "");
  static_assert(test_switch(1) == 1, "");
}