[cfe-commits] r159631 - /cfe/trunk/lib/Sema/SemaDeclObjC.cpp
Fariborz Jahanian
fjahanian at apple.com
Mon Jul 2 17:22:30 PDT 2012
Wow. How did I manage to write this? Thanks.
- fariborz
On Jul 2, 2012, at 5:15 PM, Chandler Carruth wrote:
> 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;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list