]> granicus.if.org Git - clang/commitdiff
Make a small crash preventing change.
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 3 Jul 2014 21:06:20 +0000 (21:06 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 3 Jul 2014 21:06:20 +0000 (21:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212291 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplateInstantiate.cpp

index 40727660937a9282a6af1608551c63d0ca8bb791..14c64050168a6093e215a5c39161b6e799739adb 100644 (file)
@@ -2036,8 +2036,8 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation,
       Expr *Init = NewInit.get();
       assert((!Init || !isa<ParenListExpr>(Init)) &&
              "call-style init in class");
-      ActOnFinishCXXInClassMemberInitializer(NewField, Init->getLocStart(),
-                                             Init);
+      ActOnFinishCXXInClassMemberInitializer(NewField,
+        Init ? Init->getLocStart() : SourceLocation(), Init);
     }
   }
   // Instantiate late parsed attributes, and attach them to their decls.