]> granicus.if.org Git - clang/commitdiff
Sema: Remove some dead code from CreateNewFunctionDecl
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 9 Jan 2015 05:56:10 +0000 (05:56 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 9 Jan 2015 05:56:10 +0000 (05:56 +0000)
The same code is already in Sema::ActOnFunctionDeclarator, the only
caller of CreateNewFunctionDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225506 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp

index 3af60cf2992c1105bc785f0d7538019807a60bd8..8a5047592aa16babb449fedd01eef7d80e13f227 100644 (file)
@@ -6613,9 +6613,6 @@ static FunctionDecl* CreateNewFunctionDecl(Sema &SemaRef, Declarator &D,
     if (D.isInvalidType())
       NewFD->setInvalidDecl();
 
-    // Set the lexical context.
-    NewFD->setLexicalDeclContext(SemaRef.CurContext);
-
     return NewFD;
   }