PR11851 (and duplicates): Whenever a constexpr function is referenced,
instantiate it if it can be instantiated and implicitly define it if it can be
implicitly defined. This matches g++'s approach. Remove some cases from
SemaOverload which were marking functions as referenced when just planning how
overload resolution would proceed; such cases are not actually references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167514 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/constant-expression-cxx11.cpp b/test/SemaCXX/constant-expression-cxx11.cpp
index 0dd7ffe..f504eb6 100644
--- a/test/SemaCXX/constant-expression-cxx11.cpp
+++ b/test/SemaCXX/constant-expression-cxx11.cpp
@@ -1451,6 +1451,7 @@
}
// FIXME: It's unclear whether this is valid. On the one hand, we're not
// allowed to generate a move constructor. On the other hand, if we did,
- // this would be a constant expression.
- int n = sizeof(short{duration(duration())}); // expected-error {{non-constant-expression cannot be narrowed}} expected-note {{override}}
+ // this would be a constant expression. For now, we generate a move
+ // constructor here.
+ int n = sizeof(short{duration(duration())});
}