]> granicus.if.org Git - clang/commitdiff
fix a bug in paste avoidance which would cause us to accidentally
authorChris Lattner <sabre@nondot.org>
Fri, 26 Mar 2010 17:10:02 +0000 (17:10 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 26 Mar 2010 17:10:02 +0000 (17:10 +0000)
form a >>=.  Patch by Abramo Bagnara, testcase by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99624 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/TokenConcatenation.cpp
test/Preprocessor/output_paste_avoid.c

index 07951646ffe1a801c37283527cc2328f79c0153c..51d2e2326fcaadf45fbce37678b945030804c237 100644 (file)
@@ -85,7 +85,7 @@ TokenConcatenation::TokenConcatenation(Preprocessor &pp) : PP(pp) {
   TokenInfo[tok::star        ] |= aci_avoid_equal;           // *=
   TokenInfo[tok::exclaim     ] |= aci_avoid_equal;           // !=
   TokenInfo[tok::lessless    ] |= aci_avoid_equal;           // <<=
-  TokenInfo[tok::greaterequal] |= aci_avoid_equal;           // >>=
+  TokenInfo[tok::greatergreater] |= aci_avoid_equal;         // >>=
   TokenInfo[tok::caret       ] |= aci_avoid_equal;           // ^=
   TokenInfo[tok::equal       ] |= aci_avoid_equal;           // ==
 }
index 835a921fb7d627f882688b2d1b7724113c81229c..8c6173a78d1d0fbc5832c2446d16769be3b24c32 100644 (file)
@@ -24,3 +24,7 @@ E: test(str)
 // Should expand to L "str" not L"str"
 // CHECK: E: L "str"
 
+// Should avoid producing >>=.
+#define equal =
+F: >>equal
+// CHECK: F: >> =