diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-05-20 22:12:02 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-05-20 22:12:02 +0000 |
| commit | 3f4f03a23553bc90c92c9e20bbff711623504767 (patch) | |
| tree | dfeab89711b07a7e38f409e050a67d44c80e389e /clang/lib/Sema/SemaDeclCXX.cpp | |
| parent | 6232d347bc1d9b1e04bb06be15abe5e686d296ba (diff) | |
| download | bcm5719-llvm-3f4f03a23553bc90c92c9e20bbff711623504767.tar.gz bcm5719-llvm-3f4f03a23553bc90c92c9e20bbff711623504767.zip | |
Add a new failure kind, FK_Incomplete, to InitializationSequence, to
capture failures when we try to initialize an incomplete
type. Previously, we would (ab)use FK_ConversionFailed, then
occasionally dereference a null pointer when trying to diagnose the
failure. Fixes <rdar://problem/7959007>.
llvm-svn: 104286
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index b32055a8a44..bd205267960 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -1562,6 +1562,9 @@ BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor, ImplicitInitializerKind ImplicitInitKind, FieldDecl *Field, CXXBaseOrMemberInitializer *&CXXMemberInit) { + if (Field->isInvalidDecl()) + return true; + if (ImplicitInitKind == IIK_Copy) { SourceLocation Loc = Constructor->getLocation(); ParmVarDecl *Param = Constructor->getParamDecl(0); |

