]> granicus.if.org Git - clang/commit
Replace the workaround from r153445 with a proper fix.
authorKaelyn Uhrain <rikka@google.com>
Tue, 3 Apr 2012 18:20:11 +0000 (18:20 +0000)
committerKaelyn Uhrain <rikka@google.com>
Tue, 3 Apr 2012 18:20:11 +0000 (18:20 +0000)
commit6d858d96ea294baecdf3e7ad3f3c5395c00dec8e
tree66841fb215eefc47865e390f1f0f203ce53af5a7
parentb3f904f79bbe55f3e088d7174d64d20d186914a1
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
include/clang/Sema/TypoCorrection.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaLookup.cpp
test/FixIt/typo-crash.cpp