From 2e2c7a40b7164e8499b2551c363550d6da68dc97 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 3 Jul 2012 00:15:11 +0000 Subject: [PATCH] Remove a redundant assignment to the FDecl variable from *inside* it's initializer. I really feel like Clang should warn about this, but I can't describe a good reason. GCC will warn on this in some cases under -Wsequence-point, but it actually seems like a false positive for that warning.... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159631 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDeclObjC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 7342128715..87acd1e63d 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -273,7 +273,7 @@ void Sema::ActOnStartOfObjCMethodOrCFunctionDef(Scope *FnBodyScope, Decl *D, assert((getCurMethodDecl() == 0 && getCurFunctionDecl() == 0) && "Method/c-function parsing confused"); if (!parseMethod) { - FunctionDecl *FDecl = FDecl = dyn_cast_or_null(D); + FunctionDecl *FDecl = dyn_cast_or_null(D); // If we don't have a valid c-function decl, simply return. if (!FDecl) return; -- 2.40.0