diff options
author | John McCall <rjmccall@apple.com> | 2013-04-16 07:28:30 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2013-04-16 07:28:30 +0000 |
commit | 5e77d76c953d915bfbbdc8c719e91e6fbc32e1f1 (patch) | |
tree | 1d9c716039e60789f7e65368080918995eafa605 /clang/lib/Sema/SemaInit.cpp | |
parent | 53756c4a897d268b6af9eb129ce2017a3d79ff8f (diff) | |
download | bcm5719-llvm-5e77d76c953d915bfbbdc8c719e91e6fbc32e1f1.tar.gz bcm5719-llvm-5e77d76c953d915bfbbdc8c719e91e6fbc32e1f1.zip |
Basic support for Microsoft property declarations and
references thereto.
Patch by Tong Shen!
llvm-svn: 179585
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index cd59a328f01..5a5fd268357 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -4136,6 +4136,21 @@ InitializationSequence::InitializationSequence(Sema &S, : FailedCandidateSet(Kind.getLocation()) { ASTContext &Context = S.Context; + // Eliminate non-overload placeholder types in the arguments. We + // need to do this before checking whether types are dependent + // because lowering a pseudo-object expression might well give us + // something of dependent type. + for (unsigned I = 0; I != NumArgs; ++I) + if (Args[I]->getType()->isNonOverloadPlaceholderType()) { + // FIXME: should we be doing this here? + ExprResult result = S.CheckPlaceholderExpr(Args[I]); + if (result.isInvalid()) { + SetFailed(FK_PlaceholderType); + return; + } + Args[I] = result.take(); + } + // C++0x [dcl.init]p16: // The semantics of initializers are as follows. The destination type is // the type of the object or reference being initialized and the source @@ -4153,18 +4168,6 @@ InitializationSequence::InitializationSequence(Sema &S, // Almost everything is a normal sequence. setSequenceKind(NormalSequence); - for (unsigned I = 0; I != NumArgs; ++I) - if (Args[I]->getType()->isNonOverloadPlaceholderType()) { - // FIXME: should we be doing this here? - ExprResult result = S.CheckPlaceholderExpr(Args[I]); - if (result.isInvalid()) { - SetFailed(FK_PlaceholderType); - return; - } - Args[I] = result.take(); - } - - QualType SourceType; Expr *Initializer = 0; if (NumArgs == 1) { |