[cfe-commits] r159631 - /cfe/trunk/lib/Sema/SemaDeclObjC.cpp

Chandler Carruth chandlerc at gmail.com
Mon Jul 2 17:15:11 PDT 2012


Author: chandlerc
Date: Mon Jul  2 19:15:11 2012
New Revision: 159631

URL: http://llvm.org/viewvc/llvm-project?rev=159631&view=rev
Log:
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....

Modified:
    cfe/trunk/lib/Sema/SemaDeclObjC.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=159631&r1=159630&r2=159631&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Mon Jul  2 19:15:11 2012
@@ -273,7 +273,7 @@
   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;





More information about the cfe-commits mailing list