diff options
author | Hans Wennborg <hans@hanshq.net> | 2015-01-23 17:17:04 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2015-01-23 17:17:04 +0000 |
commit | d3622636ab34f719daad7700992f7d0b6ae50ec7 (patch) | |
tree | 88fe958039165c579cf63d3785e0dc48a92d9d4e /lib/Sema/SemaStmtAsm.cpp | |
parent | 1826742724a2b09bd2fb9c1645d536f9d89195b1 (diff) |
Merging r226863:
------------------------------------------------------------------------
r226863 | joerg | 2015-01-22 13:01:00 -0800 (Thu, 22 Jan 2015) | 3 lines
When reporting constraints that should be constant, the type doesn't
really help. Improve diagnostics.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_36@226916 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmtAsm.cpp')
-rw-r--r-- | lib/Sema/SemaStmtAsm.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaStmtAsm.cpp b/lib/Sema/SemaStmtAsm.cpp index 286c7619ed..0d32581e8d 100644 --- a/lib/Sema/SemaStmtAsm.cpp +++ b/lib/Sema/SemaStmtAsm.cpp @@ -230,9 +230,8 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, llvm::APSInt Result; if (!InputExpr->EvaluateAsInt(Result, Context)) return StmtError( - Diag(InputExpr->getLocStart(), diag::err_asm_invalid_type_in_input) - << InputExpr->getType() << Info.getConstraintStr() - << InputExpr->getSourceRange()); + Diag(InputExpr->getLocStart(), diag::err_asm_immediate_expected) + << Info.getConstraintStr() << InputExpr->getSourceRange()); if (Result.slt(Info.getImmConstantMin()) || Result.sgt(Info.getImmConstantMax())) return StmtError(Diag(InputExpr->getLocStart(), |