[Cocoa] Enable two clang warnings recommended by Xcode
Created attachment 295614 [details] Patch
Comment on attachment 295614 [details] Patch r=me
Comment on attachment 295614 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295614&action=review > Source/JavaScriptCore/Configurations/Base.xcconfig:40 > +CLANG_WARN_SUSPICIOUS_MOVE = YES; Does this mean that we can get rid of our std::move() overload/WTFMove()?
(In reply to comment #3) > Comment on attachment 295614 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=295614&action=review > > > Source/JavaScriptCore/Configurations/Base.xcconfig:40 > > +CLANG_WARN_SUSPICIOUS_MOVE = YES; > > Does this mean that we can get rid of our std::move() overload/WTFMove()? No, we still need WTFMove() for -Wmove to function properly; clang's diagnostic only analyzes single-parameter functions named "move" in the std namespace.
Comment on attachment 295614 [details] Patch Clearing flags on attachment: 295614 Committed r209088: <http://trac.webkit.org/changeset/209088>
All reviewed patches have been landed. Closing bug.
(In reply to comment #4) > (In reply to comment #3) > > Comment on attachment 295614 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=295614&action=review > > > > > Source/JavaScriptCore/Configurations/Base.xcconfig:40 > > > +CLANG_WARN_SUSPICIOUS_MOVE = YES; > > > > Does this mean that we can get rid of our std::move() overload/WTFMove()? > > No, we still need WTFMove() for -Wmove to function properly; clang's > diagnostic only analyzes single-parameter functions named "move" in the std > namespace. Actually we didn't need to enable CLANG_WARN_SUSPICIOUS_MOVE, since -Wmove is included in -Wall. Looks like Xcode isn't smart enough to figure that out. It doesn't hurt to be explicit though, in case that changes.