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....

llvm-svn: 159631
This commit is contained in:
Chandler Carruth 2012-07-03 00:15:11 +00:00
parent 4e8ca4fa14
commit c4702dac1c
1 changed files with 1 additions and 1 deletions

View File

@ -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<FunctionDecl>(D);
FunctionDecl *FDecl = dyn_cast_or_null<FunctionDecl>(D);
// If we don't have a valid c-function decl, simply return.
if (!FDecl)
return;