diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2014-07-22 01:54:49 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2014-07-22 01:54:49 +0000 |
commit | 9115f7255f489610de3cd3bb9e1a1aef66e38ae9 (patch) | |
tree | 354d2a34c36648eb31479dfaf2f3c2d601ce233e /include/clang/Sema/Sema.h | |
parent | e6de71dffb8ce404e22505f0e80015137437fde9 (diff) |
Avoid crash if default argument parsed with errors.
If function parameters have default values, and that of the second
parameter is parsed with errors, function declaration would have
a parameter without default value that follows a parameter with
that. Such declaration breaks logic of selecting overloaded
function. As a solution, put opaque object as default value in such case.
This patch fixes PR20055.
Differential Revision: http://reviews.llvm.org/D4378
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/Sema.h')
-rw-r--r-- | include/clang/Sema/Sema.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 83488d0a6a..8dba089924 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -1625,7 +1625,7 @@ public: void ActOnParamUnparsedDefaultArgument(Decl *param, SourceLocation EqualLoc, SourceLocation ArgLoc); - void ActOnParamDefaultArgumentError(Decl *param); + void ActOnParamDefaultArgumentError(Decl *param, SourceLocation EqualLoc); bool SetParamDefaultArgument(ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc); |