aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-02 01:29:43 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-02 01:29:43 +0000
commit8f8210c47797f013e0fb24a26f9c4751b10783fe (patch)
tree05ee32b6d2c5a84adc1c0e502fb5b5a0ac8ce3f2 /lib/Parse/ParseDeclCXX.cpp
parentdf496529b7009d6e58f335926884200b38d27687 (diff)
Fix an amusing typo that completely the re-introduction of parameters
for the purposes of parsing default arguments. In effect, we would re-introduce the parameter with a default argument N times (where N is the number of parameters preceding the parameter with a default argument). This showed up when a defaulted parameter of a member function of a local class shadowed a parameter of the enclosing function. Fixes PR6383. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r--lib/Parse/ParseDeclCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 3619b8e813..bfb75d2dd3 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -1143,7 +1143,7 @@ void Parser::HandleMemberFunctionDefaultArgs(Declarator& DeclaratorInfo,
LateMethod->DefaultArgs.reserve(FTI.NumArgs);
for (unsigned I = 0; I < ParamIdx; ++I)
LateMethod->DefaultArgs.push_back(
- LateParsedDefaultArgument(FTI.ArgInfo[ParamIdx].Param));
+ LateParsedDefaultArgument(FTI.ArgInfo[I].Param));
}
// Add this parameter to the list of parameters (it or may