================
Comment at: lib/Sema/SemaExprCXX.cpp:2494
@@ +2493,3 @@
+    TemplateSpecializationKind TSK = ParentRD->getTemplateSpecializationKind();
+    if (isTemplateInstantiation(TSK)) {
+      CXXRecordDecl *ClassPattern = 
ParentRD->getTemplateInstantiationPattern();
----------------
You'll still crash if this check fails. You could assert this condition 
instead, but `InitExpr` could still be null even then, in principle (if we're 
somehow getting called while still parsing the definition of the class).

The in-class initializer is not relevant if no constructor actually uses it. 
Instead of this change, you could just return `EndOfTU ? NoMismatch : 
AnalyzeLater` if `InitExpr` is null.

http://reviews.llvm.org/D9898

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to