diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2010-11-30 04:44:33 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2010-11-30 04:44:33 +0000 |
| commit | ebd45a004d6a1cd6e2cebb36fbaf07fc612b0be6 (patch) | |
| tree | 8b74e2953d6b3e0a612190892bd4c2f194043e25 /clang/lib | |
| parent | 2965d3e3cd7ab3860c726eaa27487a5921386b5a (diff) | |
| download | bcm5719-llvm-ebd45a004d6a1cd6e2cebb36fbaf07fc612b0be6.tar.gz bcm5719-llvm-ebd45a004d6a1cd6e2cebb36fbaf07fc612b0be6.zip | |
Fix bug in r120299 spotted by dgregor.
llvm-svn: 120389
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index e8025409bd6..19b07498433 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -3843,10 +3843,10 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc, ParmVarDecl *Param) { if (Param->hasUnparsedDefaultArg()) { Diag(CallLoc, - diag::err_use_of_default_argument_to_function_declared_later) << + diag::err_use_of_default_argument_to_function_declared_later) << FD << cast<CXXRecordDecl>(FD->getDeclContext())->getDeclName(); Diag(UnparsedDefaultArgLocs[Param], - diag::note_default_argument_declared_here); + diag::note_default_argument_declared_here); return ExprError(); } @@ -3868,7 +3868,7 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc, // The names in the [default argument] expression are bound, and // the semantic constraints are checked, at the point where the // default argument expression appears. - ContextRAII SavedContext(*this, FD->getDeclContext()); + ContextRAII SavedContext(*this, FD); Result = SubstExpr(UninstExpr, ArgList); } if (Result.isInvalid()) |

