Files
clang-p2996/clang/test/CodeGenCXX/mangle-98.cpp
Richard Smith f8379a0fc3 constexpr: converted constant expression handling for enumerator values, case
values and non-type template arguments of integral and enumeration types.

This change causes some legal C++98 code to no longer compile in C++11 mode, by
enforcing the C++11 rule that narrowing integral conversions are not permitted
in the final implicit conversion sequence for the above cases.

llvm-svn: 148439
2012-01-18 23:55:52 +00:00

13 lines
302 B
C++

// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -std=c++98 | FileCheck %s
template <bool B> struct S3 {};
// CHECK: define void @_Z1f2S3ILb1EE
void f(S3<true>) {}
// CHECK: define void @_Z1f2S3ILb0EE
void f(S3<false>) {}
// CHECK: define void @_Z2f22S3ILb1EE
void f2(S3<100>) {}