зеркало из https://github.com/microsoft/clang-1.git
Pass the diagnostic in for better error messages.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
08aba1bc55
Коммит
d835d9496c
|
@ -129,10 +129,9 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple,
|
||||||
diag::err_asm_invalid_lvalue_in_output)
|
diag::err_asm_invalid_lvalue_in_output)
|
||||||
<< OutputExpr->getSourceRange());
|
<< OutputExpr->getSourceRange());
|
||||||
|
|
||||||
if (RequireCompleteType(OutputExpr->getLocStart(), Exprs[i]->getType(), 0))
|
if (RequireCompleteType(OutputExpr->getLocStart(), Exprs[i]->getType(),
|
||||||
return StmtError(Diag(OutputExpr->getLocStart(),
|
diag::err_dereference_incomplete_type))
|
||||||
diag::err_dereference_incomplete_type)
|
return StmtError();
|
||||||
<< Exprs[i]->getType());
|
|
||||||
|
|
||||||
OutputConstraintInfos.push_back(Info);
|
OutputConstraintInfos.push_back(Info);
|
||||||
}
|
}
|
||||||
|
@ -189,10 +188,9 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!Ty->isVoidType() || !Info.allowsMemory())
|
if (!Ty->isVoidType() || !Info.allowsMemory())
|
||||||
if (RequireCompleteType(InputExpr->getLocStart(), Exprs[i]->getType(), 0))
|
if (RequireCompleteType(InputExpr->getLocStart(), Exprs[i]->getType(),
|
||||||
return StmtError(Diag(InputExpr->getLocStart(),
|
diag::err_dereference_incomplete_type))
|
||||||
diag::err_dereference_incomplete_type)
|
return StmtError();
|
||||||
<< Exprs[i]->getType());
|
|
||||||
|
|
||||||
unsigned Size = Context.getTypeSize(Ty);
|
unsigned Size = Context.getTypeSize(Ty);
|
||||||
if (!Context.getTargetInfo().validateInputSize(Literal->getString(),
|
if (!Context.getTargetInfo().validateInputSize(Literal->getString(),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче