DS parameter  has a default (null) value anyway, so there's no need for an 
if/else here.

DeclGroupPtrTy ParseDeclarationOrFunctionDefinition(
                                                  ParsedAttributesWithRange 
&attrs,
                                                  ParsingDeclSpec *DS = 0,
                                                  AccessSpecifier AS = AS_none);

http://llvm-reviews.chandlerc.com/D253

Files:
  lib/Parse/Parser.cpp

Index: lib/Parse/Parser.cpp
===================================================================
--- lib/Parse/Parser.cpp
+++ lib/Parse/Parser.cpp
@@ -760,11 +760,7 @@
   default:
   dont_know:
     // We can't tell whether this is a function-definition or declaration yet.
-    if (DS) {
       return ParseDeclarationOrFunctionDefinition(attrs, DS);
-    } else {
-      return ParseDeclarationOrFunctionDefinition(attrs);
-    }
   }
 
   // This routine returns a DeclGroup, if the thing we parsed only contains a
Index: lib/Parse/Parser.cpp
===================================================================
--- lib/Parse/Parser.cpp
+++ lib/Parse/Parser.cpp
@@ -760,11 +760,7 @@
   default:
   dont_know:
     // We can't tell whether this is a function-definition or declaration yet.
-    if (DS) {
       return ParseDeclarationOrFunctionDefinition(attrs, DS);
-    } else {
-      return ParseDeclarationOrFunctionDefinition(attrs);
-    }
   }
 
   // This routine returns a DeclGroup, if the thing we parsed only contains a 
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to