Fix PR2090, a typo in digraph processing.

llvm-svn: 47540
This commit is contained in:
Chris Lattner 2008-02-24 19:05:57 +00:00
parent 89a62c8fff
commit 5329e7e5ed
2 changed files with 16 additions and 1 deletions

View File

@ -1529,7 +1529,7 @@ LexNextToken:
} else if (Features.Digraphs && Char == ':') {
Result.setKind(tok::l_square); // '<:' -> '['
CurPtr = ConsumeChar(CurPtr, SizeTmp, Result);
} else if (Features.Digraphs && Char == '>') {
} else if (Features.Digraphs && Char == '%') {
Result.setKind(tok::l_brace); // '<%' -> '{'
CurPtr = ConsumeChar(CurPtr, SizeTmp, Result);
} else {

View File

@ -0,0 +1,15 @@
// RUN: clang -fsyntax-only %s
%:include <stdio.h>
%:ifndef BUFSIZE
%:define BUFSIZE 512
%:endif
void copy(char d<::>, const char s<::>, int len)
<%
while (len-- >= 0)
<%
d<:len:> = s<:len:>;
%>
%>