[cfe-commits] r76796 - in /cfe/trunk: include/clang/Parse/Parser.h lib/Parse/ParseCXXInlineMethods.cpp lib/Parse/ParseDeclCXX.cpp test/SemaCXX/default2.cpp

Douglas Gregor dgregor at apple.com
Thu Jul 23 14:26:47 PDT 2009


On Jul 22, 2009, at 2:45 PM, Eli Friedman wrote:

> Author: efriedma
> Date: Wed Jul 22 16:45:50 2009
> New Revision: 76796
>
> URL: http://llvm.org/viewvc/llvm-project?rev=76796&view=rev
> Log:
> Fix the parsing of default arguments for inline member function
> definitions.
>
> I'm not very familiar with this code, so please review.
>
>
> Modified:
>    cfe/trunk/include/clang/Parse/Parser.h
>    cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
>    cfe/trunk/lib/Parse/ParseDeclCXX.cpp
>    cfe/trunk/test/SemaCXX/default2.cpp
>
> Modified: cfe/trunk/include/clang/Parse/Parser.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=76796&r1=76795&r2=76796&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/Parse/Parser.h (original)
> +++ cfe/trunk/include/clang/Parse/Parser.h Wed Jul 22 16:45:50 2009
> @@ -1147,6 +1147,8 @@
>   void ParseCXXClassMemberDeclaration(AccessSpecifier AS);
>   void ParseConstructorInitializer(DeclPtrTy ConstructorDecl);
>   MemInitResult ParseMemInitializer(DeclPtrTy ConstructorDecl);
> +  void HandleMemberFunctionDefaultArgs(Declarator& DeclaratorInfo,
> +                                       DeclPtrTy ThisDecl);
>
>   // 
> = 
> = 
> =-------------------------------------------------------------------- 
> ===//
>   // C++ 10: Derived classes [class.derived]
>
> Modified: cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp?rev=76796&r1=76795&r2=76796&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp (original)
> +++ cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp Wed Jul 22  
> 16:45:50 2009
> @@ -29,6 +29,8 @@
>
>   DeclPtrTy FnD = Actions.ActOnCXXMemberDeclarator(CurScope, AS, D,  
> 0, 0);
>
> +  HandleMemberFunctionDefaultArgs(D, FnD);
> +
>   // Consume the tokens and store them for later parsing.

Ah, this is the part of the change that matters. Yes, this looks good.  
Thanks, Eli!

	- Doug



More information about the cfe-commits mailing list