Files
clang-p2996/clang/test/CodeGenCXX/internal-linkage.cpp
Douglas Gregor 589973b097 In C++98/03, an uninitialized variable that has POD class type will be
uninitialized. This seems not to be the case in C++0x, where we still
call the (trivial) default constructor for a POD class
(!). Previously, we had implemented only the C++0x rules; now we
implement both. Fixes PR6536.

llvm-svn: 97928
2010-03-08 02:45:10 +00:00

20 lines
339 B
C++

// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
struct Global { Global(); };
template<typename T> struct X { X(); };
namespace {
struct Anon { Anon(); };
// CHECK: @_ZN12_GLOBAL__N_15anon0E = internal global
Global anon0;
}
// CHECK: @anon1 = internal global
Anon anon1;
// CHECK: @anon2 = internal global
X<Anon> anon2;