[cfe-commits] r58203 - /cfe/trunk/lib/Parse/ParseInit.cpp
Chris Lattner
sabre at nondot.org
Sun Oct 26 14:46:14 PDT 2008
Author: lattner
Date: Sun Oct 26 16:46:13 2008
New Revision: 58203
URL: http://llvm.org/viewvc/llvm-project?rev=58203&view=rev
Log:
minor cleanups
Modified:
cfe/trunk/lib/Parse/ParseInit.cpp
Modified: cfe/trunk/lib/Parse/ParseInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseInit.cpp?rev=58203&r1=58202&r2=58203&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseInit.cpp (original)
+++ cfe/trunk/lib/Parse/ParseInit.cpp Sun Oct 26 16:46:13 2008
@@ -18,7 +18,8 @@
/// MayBeDesignationStart - Return true if this token might be the start of a
-/// designator.
+/// designator. If we can tell it is impossible that it is a designator, return
+/// false.
static bool MayBeDesignationStart(tok::TokenKind K) {
switch (K) {
default: return false;
@@ -50,7 +51,8 @@
/// [GNU] '[' constant-expression '...' constant-expression ']'
///
/// NOTE: [OBC] allows '[ objc-receiver objc-message-args ]' as an
-/// initializer. We need to consider this case when parsing array designators.
+/// initializer (because it is an expression). We need to consider this case
+/// when parsing array designators.
///
Parser::ExprResult Parser::ParseInitializerWithPotentialDesignator() {
// Parse each designator in the designator list until we find an initializer.
@@ -205,7 +207,7 @@
InitExprsOk = false;
// We have two ways to try to recover from this error: if the code looks
- // gramatically ok (i.e. we have a comma comming up) try to continue
+ // gramatically ok (i.e. we have a comma coming up) try to continue
// parsing the rest of the initializer. This allows us to emit
// diagnostics for later elements that we find. If we don't see a comma,
// assume there is a parse error, and just skip to recover.
More information about the cfe-commits
mailing list