summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/cxx11-exception-spec.cpp
blob: 461af78eae45567fdac4a57f52db8bd190837fbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// RUN: %clang_cc1 -std=c++11 -verify -emit-llvm %s -o - | FileCheck %s

template<typename T> void f() noexcept(sizeof(T) == 4);

void g() {
  // CHECK: declare void @_Z1fIiEvv() nounwind
  f<int>();
  // CHECK: declare void @_Z1fIA2_iEvv()
  f<int[2]>();
  // CHECK: declare void @_Z1fIfEvv() nounwind
  void (*f1)() = &f<float>;
  // CHECK: declare void @_Z1fIdEvv()
  void (*f2)() = &f<double>;
  // CHECK: declare void @_Z1fIA4_cEvv() nounwind
  (void)&f<char[4]>;
  // CHECK: declare void @_Z1fIcEvv()
  (void)&f<char>;
}