summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp2
-rw-r--r--clang/lib/Sema/SemaStmt.cpp9
2 files changed, 1 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index f883bec4ff5..58d56ef0df9 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -77,7 +77,7 @@ const llvm::Type *CodeGenFunction::ConvertType(QualType T) {
bool CodeGenFunction::hasAggregateLLVMType(QualType T) {
return T->isRecordType() || T->isArrayType() || T->isAnyComplexType() ||
- T->isMemberFunctionPointerType();
+ T->isMemberFunctionPointerType() || T->isObjCObjectType();
}
void CodeGenFunction::EmitReturnBlock() {
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index c3adb6c8017..3690eeef53e 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -30,15 +30,6 @@ using namespace clang;
Sema::OwningStmtResult Sema::ActOnExprStmt(FullExprArg expr) {
Expr *E = expr->takeAs<Expr>();
assert(E && "ActOnExprStmt(): missing expression");
- if (E->getType()->isObjCObjectType()) {
- if (LangOpts.ObjCNonFragileABI)
- Diag(E->getLocEnd(), diag::err_indirection_requires_nonfragile_object)
- << E->getType();
- else
- Diag(E->getLocEnd(), diag::err_direct_interface_unsupported)
- << E->getType();
- return StmtError();
- }
// C99 6.8.3p2: The expression in an expression statement is evaluated as a
// void expression for its side effects. Conversion to void allows any
// operand, even incomplete types.
OpenPOWER on IntegriCloud