Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Issue 11494: Generate a warning if the return value of FilePath::Append is ignored. (Closed)

Created:
12 years, 1 month ago by agl
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Generate a warning if the return value of FilePath::Append is ignored. There's currently a GCC bug which stops this working for return values which have a destructor. Hopefully this will help someone in the future, with future versions of GCC. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38172 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31742

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -3 lines) Patch
M base/compiler_specific.h View 2 chunks +8 lines, -2 lines 0 comments Download
M base/file_path.h View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
agl
12 years, 1 month ago (2008-11-19 21:31:52 UTC) #1
Evan Stade
I think Append should be a static function that takes a FilePath and a StringType ...
12 years, 1 month ago (2008-11-20 02:52:17 UTC) #2
Evan Stade
On second thought, that still might not be entirely obvious.
12 years, 1 month ago (2008-11-20 03:05:46 UTC) #3
Evan Stade
All right, final idea: deprecate Append() and replace it with operator+
12 years, 1 month ago (2008-11-20 03:44:08 UTC) #4
tony
12 years, 1 month ago (2008-11-20 08:58:14 UTC) #5
Operator overloading is against the style guide.

On 2008/11/20 03:44:08, Evan Stade wrote:
> All right, final idea: deprecate Append() and replace it with operator+

Powered by Google App Engine
This is Rietveld 408576698