[llvm-branch-commits] [cfe-branch] r108282 - in /cfe/branches/Apple/whitney-IB/src/tools/clang: lib/Parse/Parser.cpp test/Parser/bracket-crash.cpp

Daniel Dunbar daniel at zuster.org
Tue Jul 13 15:00:52 PDT 2010


Author: ddunbar
Date: Tue Jul 13 17:00:52 2010
New Revision: 108282

URL: http://llvm.org/viewvc/llvm-project?rev=108282&view=rev
Log:
Merge r108119:
--
Author: Chris Lattner <clattner at apple.com>
Date:   Mon Jul 12 01:48:28 2010 +0000

    revert a hunk of code that Argiris added in r106213, which is the
    root cause of PR7481 and probably more, and has no apparent
    testcases.  I don't understand the logic here so I can't repair it.
--

Added:
    cfe/branches/Apple/whitney-IB/src/tools/clang/test/Parser/bracket-crash.cpp
Modified:
    cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Parse/Parser.cpp

Modified: cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Parse/Parser.cpp?rev=108282&r1=108281&r2=108282&view=diff
==============================================================================
--- cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Parse/Parser.cpp (original)
+++ cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Parse/Parser.cpp Tue Jul 13 17:00:52 2010
@@ -127,16 +127,7 @@
   }
   Diag(Tok, DID);
   Diag(LHSLoc, diag::note_matching) << LHSName;
-  if (!SkipUntil(RHSTok)) {
-    // We stopped before finding a RHS token, e.g. we encountered a ';'.
-    // Balance Paren/Brace/Bracket counting. 
-    switch (RHSTok) {
-    default: break;
-    case tok::r_paren : assert(ParenCount > 0); --ParenCount; break;
-    case tok::r_brace : assert(BraceCount > 0); --BraceCount; break;
-    case tok::r_square: assert(BracketCount > 0); --BracketCount; break;
-    }
-  }
+  SkipUntil(RHSTok);
   return R;
 }
 

Added: cfe/branches/Apple/whitney-IB/src/tools/clang/test/Parser/bracket-crash.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney-IB/src/tools/clang/test/Parser/bracket-crash.cpp?rev=108282&view=auto
==============================================================================
--- cfe/branches/Apple/whitney-IB/src/tools/clang/test/Parser/bracket-crash.cpp (added)
+++ cfe/branches/Apple/whitney-IB/src/tools/clang/test/Parser/bracket-crash.cpp Tue Jul 13 17:00:52 2010
@@ -0,0 +1,6 @@
+// RUN: not %clang_cc1 -fsyntax-only %s
+// PR7481
+struct{
+  a
+}
+





More information about the llvm-branch-commits mailing list