issues and also add a test.
We should now handle defaulted members of templates properly. No
comment as to whether or not this also holds for templated functions,
but defaulting those is kind of insane.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131938
91177308-0d34-0410-b5e6-
96231b3b80d8
ActOnFinishFunctionBody(Function, 0, /*IsInstantiation=*/true);
SetDeclDefaulted(Function, PatternDecl->getLocation());
-
- return;
} else {
// If this is a constructor, instantiate the member initializers.
if (const CXXConstructorDecl *Ctor =
--- /dev/null
+// RUN: %clang_cc1 -std=c++0x -emit-llvm -o - %s | FileCheck %s
+
+template <typename T>
+struct X {
+ X();
+};
+
+// CHECK: define void @_ZN1XIbEC1Ev
+// CHECK: define void @_ZN1XIbEC2Ev
+template <> X<bool>::X() = default;
+
+// CHECK: define weak_odr void @_ZN1XIiEC1Ev
+// CHECK: define weak_odr void @_ZN1XIiEC2Ev
+template <typename T> X<T>::X() = default;
+template X<int>::X();
+
+// CHECK: define linkonce_odr void @_ZN1XIcEC1Ev
+// CHECK: define linkonce_odr void @_ZN1XIcEC2Ev
+X<char> x;