This fixes PR10223.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134183
91177308-0d34-0410-b5e6-
96231b3b80d8
// If the byte is in this token, return the location of the byte.
if (ByteNo < TokNumBytes ||
- (ByteNo == TokNumBytes && TokNo == getNumConcatenated())) {
+ (ByteNo == TokNumBytes && TokNo == getNumConcatenated() - 1)) {
unsigned Offset = SLP.getOffsetOfStringByte(TheTok, ByteNo);
// Now that we know the offset of the token in the spelling, use the
void test12(void) {
register int cc __asm ("cc"); // expected-error{{unknown register name 'cc' in asm}}
}
+
+// PR10223
+void test13(void) {
+ void *esp;
+ __asm__ volatile ("mov %%esp, %o" : "=r"(esp) : : ); // expected-error {{invalid % escape in inline assembly string}}
+}