[cfe-commits] r47540 - in /cfe/trunk: Lex/Lexer.cpp test/Lexer/digraph.cpp
Chris Lattner
sabre at nondot.org
Sun Feb 24 11:05:57 PST 2008
Author: lattner
Date: Sun Feb 24 13:05:57 2008
New Revision: 47540
URL: http://llvm.org/viewvc/llvm-project?rev=47540&view=rev
Log:
Fix PR2090, a typo in digraph processing.
Added:
cfe/trunk/test/Lexer/digraph.cpp
Modified:
cfe/trunk/Lex/Lexer.cpp
Modified: cfe/trunk/Lex/Lexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Lex/Lexer.cpp?rev=47540&r1=47539&r2=47540&view=diff
==============================================================================
--- cfe/trunk/Lex/Lexer.cpp (original)
+++ cfe/trunk/Lex/Lexer.cpp Sun Feb 24 13:05:57 2008
@@ -1529,7 +1529,7 @@
} 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 {
Added: cfe/trunk/test/Lexer/digraph.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/digraph.cpp?rev=47540&view=auto
==============================================================================
--- cfe/trunk/test/Lexer/digraph.cpp (added)
+++ cfe/trunk/test/Lexer/digraph.cpp Sun Feb 24 13:05:57 2008
@@ -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:>;
+ %>
+ %>
More information about the cfe-commits
mailing list