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
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index 6fa4033..8062884 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -288,7 +288,7 @@
continue;
}
- DiagOffs = CurPtr-StrStart;
+ DiagOffs = CurPtr-StrStart-1;
return diag::err_asm_invalid_escape;
}
}