diff options
| author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-02-08 14:56:26 +0000 |
|---|---|---|
| committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-02-08 14:56:26 +0000 |
| commit | df0913ba70529f10f56714e53162f422a4bab4c3 (patch) | |
| tree | 3b153aca5106521ade792bc0a2e74f27ab85a0d4 /clang/lib | |
| parent | cc4c8e848aa663c63568f5ee834b0ec0b654c519 (diff) | |
| download | bcm5719-llvm-df0913ba70529f10f56714e53162f422a4bab4c3.tar.gz bcm5719-llvm-df0913ba70529f10f56714e53162f422a4bab4c3.zip | |
Fix redundant errors with missing default arguments in member declarations.
llvm-svn: 64085
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index f5681af0fa0..c0160b2d423 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1707,8 +1707,11 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, ProcessDeclAttributes(NewFD, D); if (getLangOptions().CPlusPlus) { - // In C++, check default arguments now that we have merged decls. - CheckCXXDefaultArguments(NewFD); + // In C++, check default arguments now that we have merged decls. Unless + // the lexical context is the class, because in this case this is done + // during delayed parsing anyway. + if (!CurContext->isRecord()) + CheckCXXDefaultArguments(NewFD); // An out-of-line member function declaration must also be a // definition (C++ [dcl.meaning]p1). |

