diff options
author | Kaelyn Uhrain <rikka@google.com> | 2012-04-03 18:20:11 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2012-04-03 18:20:11 +0000 |
commit | 6d858d96ea294baecdf3e7ad3f3c5395c00dec8e (patch) | |
tree | 66841fb215eefc47865e390f1f0f203ce53af5a7 /include | |
parent | b3f904f79bbe55f3e088d7174d64d20d186914a1 (diff) |
Replace the workaround from r153445 with a proper fix.
Infinite recursion was happening when DiagnoseInvalidRedeclaration
called ActOnFunctionDeclarator to check if a typo correction works when
the correction was just to the nested-name-specifier because the wrong
DeclContext was being passed in. Unlike a number of functions
surrounding typo correction, the DeclContext passed in for a function is
the context of the function name after applying any nested name
specifiers, not the lexical DeclContext where the
function+nested-name-specifier appears.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153962 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Sema/TypoCorrection.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/clang/Sema/TypoCorrection.h b/include/clang/Sema/TypoCorrection.h index a333c8182b..a8f6e1178b 100644 --- a/include/clang/Sema/TypoCorrection.h +++ b/include/clang/Sema/TypoCorrection.h @@ -205,7 +205,7 @@ class CorrectionCandidateCallback { : WantTypeSpecifiers(true), WantExpressionKeywords(true), WantCXXNamedCasts(true), WantRemainingKeywords(true), WantObjCSuper(false), - IsObjCIvarLookup(false), AllowAddedQualifier(true) {} + IsObjCIvarLookup(false) {} virtual ~CorrectionCandidateCallback() {} @@ -239,10 +239,6 @@ class CorrectionCandidateCallback { // Temporary hack for the one case where a CorrectTypoContext enum is used // when looking up results. bool IsObjCIvarLookup; - - /// \brief Whether to allow this typo correction to add a - /// nested-name-specifier. - bool AllowAddedQualifier; }; /// @brief Simple template class for restricting typo correction candidates |