[PATCH] Refactor: Simplify boolean expressions in lib/Parse
David Majnemer
david.majnemer at gmail.com
Sun Mar 22 14:24:11 PDT 2015
================
Comment at: lib/Parse/ParseDecl.cpp:5191-5193
@@ -5195,5 +5190,5 @@
+ } else
// This handles C99 6.7.5.3p11: in "typedef int X; void foo(X)", X is
// considered to be a type, not a K&R identifier-list.
- isGrouping = false;
- } else {
// Otherwise, this is a grouping paren, e.g. 'int (*X)' or 'int(X)'.
+ isGrouping = !(Tok.is(tok::r_paren) || // 'int()' is a function.
----------------
I think these sentences need to be rephrased now that the control flow has been removed.
================
Comment at: lib/Parse/ParseDecl.cpp:5198
@@ -5202,1 +5197,3 @@
+ isDeclarationSpecifier() || // 'int(int)' is a function.
+ isCXX11AttributeSpecifier());
----------------
I think you are missing `// 'int([[]]int)' is a function.` on this line.
http://reviews.llvm.org/D8530
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list