[PATCH] Handle use of default member initializers before end of outermost class
Richard Smith
richard at metafoo.co.uk
Thu Nov 13 19:26:05 PST 2014
LGTM with some minor changes.
================
Comment at: lib/Sema/SemaTemplateInstantiate.cpp:2230
@@ +2229,3 @@
+
+ LocalInstantiationScope Scope(*this, /*MergeWithParentScope*/true);
+
----------------
`MergeWithParentScope` should be `false` here; there's not necessarily any connection between whatever we were instantiating before and this scope.
================
Comment at: lib/Sema/SemaTemplateInstantiate.cpp:2246
@@ +2245,3 @@
+
+ return Init == nullptr;
+}
----------------
You currently return `false` even when `ActOnFinishCXXInClassMemberInitializer` fails; you should probably either return `true` in that case or remove your return value and check for whether there actually is an in-class initialzer in the caller afterwards.
http://reviews.llvm.org/D5690
More information about the cfe-commits
mailing list