diff options
author | Anders Carlsson <andersca@mac.com> | 2009-03-23 19:10:31 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-03-23 19:10:31 +0000 |
commit | 11f21a08cd40caec93e088c404bbf3136917a035 (patch) | |
tree | d5d7e6d2687b2b9fffcf8ed526b98f9d98cdff4b /lib/Sema/SemaExprCXX.cpp | |
parent | a880db0b0fc028abf754c290d921d809eec0518a (diff) |
More improvements to abstract type checking. Handle arrays correctly, and make sure to check parameter types before they decay.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index ac36a1f22d..271f1da3ad 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -197,6 +197,10 @@ Sema::ActOnCXXTypeConstructExpr(SourceRange TypeRange, TypeTy *TypeRep, diag::err_invalid_incomplete_type_use, FullRange)) return ExprError(); + if (RequireNonAbstractType(TyBeginLoc, Ty, + diag::err_allocation_of_abstract_type, 0)) + return ExprError(); + exprs.release(); return Owned(new (Context) CXXZeroInitValueExpr(Ty, TyBeginLoc, RParenLoc)); } |