[cfe-commits] r61795 - /cfe/trunk/lib/Parse/ParseDeclCXX.cpp

Chris Lattner sabre at nondot.org
Mon Jan 5 22:55:51 PST 2009


Author: lattner
Date: Tue Jan  6 00:55:51 2009
New Revision: 61795

URL: http://llvm.org/viewvc/llvm-project?rev=61795&view=rev
Log:
minor code cleanups, reduce indentation since 'if' block can't fall through.

Modified:
    cfe/trunk/lib/Parse/ParseDeclCXX.cpp

Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=61795&r1=61794&r2=61795&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Tue Jan  6 00:55:51 2009
@@ -134,20 +134,18 @@
 
 /// ParseUsingDirectiveOrDeclaration - Parse C++ using using-declaration or
 /// using-directive. Assumes that current token is 'using'.
-Parser::DeclTy *Parser::ParseUsingDirectiveOrDeclaration(unsigned Context)
-{
+Parser::DeclTy *Parser::ParseUsingDirectiveOrDeclaration(unsigned Context) {
   assert(Tok.is(tok::kw_using) && "Not using token");
 
   // Eat 'using'.
   SourceLocation UsingLoc = ConsumeToken();
 
-  if (Tok.is(tok::kw_namespace)) {
+  if (Tok.is(tok::kw_namespace))
     // Next token after 'using' is 'namespace' so it must be using-directive
     return ParseUsingDirective(Context, UsingLoc);
-  } else {
-    // Otherwise, it must be using-declaration.
-    return ParseUsingDeclaration(Context, UsingLoc); //FIXME: It is just stub.
-  }
+
+  // Otherwise, it must be using-declaration.
+  return ParseUsingDeclaration(Context, UsingLoc);
 }
 
 /// ParseUsingDirective - Parse C++ using-directive, assumes





More information about the cfe-commits mailing list