[cfe-commits] r148915 - /cfe/trunk/lib/Sema/TreeTransform.h
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Jan 24 19:53:05 PST 2012
Author: akirtzidis
Date: Tue Jan 24 21:53:04 2012
New Revision: 148915
URL: http://llvm.org/viewvc/llvm-project?rev=148915&view=rev
Log:
In TreeTransform<Derived>::TransformBlockExpr, call ActOnBlockError for errors,
patch by Dmitri Gribenko.
Modified:
cfe/trunk/lib/Sema/TreeTransform.h
Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=148915&r1=148914&r2=148915&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Tue Jan 24 21:53:04 2012
@@ -8125,8 +8125,10 @@
if (getDerived().TransformFunctionTypeParams(E->getCaretLocation(),
oldBlock->param_begin(),
oldBlock->param_size(),
- 0, paramTypes, ¶ms))
+ 0, paramTypes, ¶ms)) {
+ getSema().ActOnBlockError(E->getCaretLocation(), /*Scope=*/0);
return ExprError();
+ }
const FunctionType *exprFunctionType = E->getFunctionType();
QualType exprResultType = exprFunctionType->getResultType();
@@ -8147,6 +8149,7 @@
getSema().Diag(E->getCaretLocation(),
diag::err_object_cannot_be_passed_returned_by_value)
<< 0 << blockScope->ReturnType;
+ getSema().ActOnBlockError(E->getCaretLocation(), /*Scope=*/0);
return ExprError();
}
@@ -8171,8 +8174,10 @@
// Transform the body
StmtResult body = getDerived().TransformStmt(E->getBody());
- if (body.isInvalid())
+ if (body.isInvalid()) {
+ getSema().ActOnBlockError(E->getCaretLocation(), /*Scope=*/0);
return ExprError();
+ }
#ifndef NDEBUG
// In builds with assertions, make sure that we captured everything we
More information about the cfe-commits
mailing list