aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Stmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-10 23:57:07 +0000
committerChris Lattner <sabre@nondot.org>2009-03-10 23:57:07 +0000
commit2ff0f42a962fec5a6300b5986297b417db173e6a (patch)
treeafe7adc7154f6b22b6358b36771f15d4f47a0a1f /lib/AST/Stmt.cpp
parent3182db1c8e456c4cd2180fac9d77d331b2c0621f (diff)
position the caret properly on asm string diagnostics, e.g.:
Sema/asm.c:64:9: error: invalid % escape in inline assembly string asm("%!" : ); // expected-error {{invalid % escape in inline assembly string}} ~~^~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Stmt.cpp')
-rw-r--r--lib/AST/Stmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index 6fa4033088..8062884d7e 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -288,7 +288,7 @@ unsigned AsmStmt::AnalyzeAsmString(llvm::SmallVectorImpl<AsmStringPiece>&Pieces,
continue;
}
- DiagOffs = CurPtr-StrStart;
+ DiagOffs = CurPtr-StrStart-1;
return diag::err_asm_invalid_escape;
}
}