dyn_cast<NonTypeTemplateParmDecl>(ParamND)) {
Expr *FromExpr, *ToExpr;
llvm::APSInt FromInt, ToInt;
- unsigned ParamWidth = 0;
+ unsigned ParamWidth = 128; // Safe default
if (DefaultNTTPD->getType()->isIntegralOrEnumerationType())
ParamWidth = Context.getIntWidth(DefaultNTTPD->getType());
bool HasFromInt = !FromIter.isEnd() &&
// CHECK-ELIDE-NOTREE: non-const lvalue reference to type 'VariableList<>' cannot bind to a temporary of type 'VariableList<>'
}
+namespace rdar12456626 {
+ struct IntWrapper {
+ typedef int type;
+ };
+
+ template<typename T, typename T::type V>
+ struct X { };
+
+ struct A {
+ virtual X<IntWrapper, 1> foo();
+ };
+
+ struct B : A {
+ // CHECK-ELIDE-NOTREE: virtual function 'foo' has a different return type
+ virtual X<IntWrapper, 2> foo();
+ };
+}
+
// CHECK-ELIDE-NOTREE: {{[0-9]*}} errors generated.
// CHECK-NOELIDE-NOTREE: {{[0-9]*}} errors generated.
// CHECK-ELIDE-TREE: {{[0-9]*}} errors generated.