diff options
author | Anders Carlsson <andersca@mac.com> | 2009-05-27 16:28:34 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-05-27 16:28:34 +0000 |
commit | 7c520cf417e7a4eceeefef0a8b2a2b33811f0481 (patch) | |
tree | 140fc3c318a98911a0b130da08aad51d19342fd9 /lib/Sema/SemaInit.cpp | |
parent | 355bf958ad2d988d046e16b9bb66647ad01c91fe (diff) |
Relax an assert to an if check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r-- | lib/Sema/SemaInit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 3fae86d19d..951aaa3bc0 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -165,9 +165,9 @@ bool Sema::CheckInitializerTypes(Expr *&Init, QualType &DeclType, return true; // FIXME: What do do if VD is null here? - assert(VD && "Must have a var decl to construct into!"); - Init = CXXConstructExpr::Create(Context, VD, DeclType, Constructor, - false, &Init, 1); + if (VD) + Init = CXXConstructExpr::Create(Context, VD, DeclType, Constructor, + false, &Init, 1); return false; } |