aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseInit.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-10-26 21:46:13 +0000
committerChris Lattner <sabre@nondot.org>2008-10-26 21:46:13 +0000
commit838cb21b800e55d88201fa76b978a7d11478c655 (patch)
tree2010edfba16d7eee0c57887183879a30dafe2079 /lib/Parse/ParseInit.cpp
parentad3c91c267b071db52df308eb6d80fb336a8dee5 (diff)
minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseInit.cpp')
-rw-r--r--lib/Parse/ParseInit.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Parse/ParseInit.cpp b/lib/Parse/ParseInit.cpp
index c7c08dccbc..f4073af33f 100644
--- a/lib/Parse/ParseInit.cpp
+++ b/lib/Parse/ParseInit.cpp
@@ -18,7 +18,8 @@ using namespace clang;
/// 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 @@ static bool MayBeDesignationStart(tok::TokenKind K) {
/// [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 @@ Parser::ExprResult Parser::ParseInitializer() {
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.