"Enabling -Wshadow option" (issue180041)

1 view
Skip to first unread message

preston....@gmail.com

unread,
Dec 15, 2009, 1:34:51 PM12/15/09
to zhanyo...@gmail.com, vlad...@gmail.com, googletes...@googlegroups.com, re...@codereview.appspotmail.com
Reviewers: Zhanyong Wan, Vlad,

Message:
Adding support for the -Wshadow GCC compiler flag. Issue 220.



Please review this at http://codereview.appspot.com/180041

Affected files:
include/gtest/gtest-test-part.h
include/gtest/gtest.h
include/gtest/internal/gtest-death-test-internal.h
include/gtest/internal/gtest-param-util.h
include/gtest/internal/gtest-string.h
scons/SConstruct.common
src/gtest-death-test.cc
src/gtest-internal-inl.h
src/gtest.cc
test/gtest_unittest.cc
xcode/Config/General.xcconfig


w...@google.com

unread,
Dec 15, 2009, 2:41:03 PM12/15/09
to preston....@gmail.com, zhanyo...@gmail.com, vlad...@gmail.com, googletes...@googlegroups.com, re...@codereview.appspotmail.com
Sorry for suggesting a massive change. I can do it myself if you don't
have time. Thanks!


http://codereview.appspot.com/180041/diff/18/24
File include/gtest/gtest-test-part.h (right):

http://codereview.appspot.com/180041/diff/18/24#newcode59
include/gtest/gtest-test-part.h:59: TestPartResult(Type outcome_type,
The convention I like is to call this a_type (and a_file_name,
a_line_number, etc for others). Then it's easy to match up the
parameter with the field. And you don't have to think hard for good
names when new parameters are added.

http://codereview.appspot.com/180041

preston....@gmail.com

unread,
Dec 16, 2009, 1:13:35 PM12/16/09
to zhanyo...@gmail.com, vlad...@gmail.com, w...@google.com, googletes...@googlegroups.com, re...@codereview.appspotmail.com
Ok, changed to an "a_" prefix.

Do you want me to use "an_" in appropriate places? (I did)

Do you want me to change _all_ parameters in a method/function signature
to use "a_"? (I didn't)


http://codereview.appspot.com/180041

preston....@gmail.com

unread,
Dec 16, 2009, 1:13:30 PM12/16/09
to zhanyo...@gmail.com, vlad...@gmail.com, w...@google.com, googletes...@googlegroups.com, re...@codereview.appspotmail.com

Zhanyong Wan (λx.x x)

unread,
Dec 16, 2009, 1:15:32 PM12/16/09
to preston....@gmail.com, zhanyo...@gmail.com, vlad...@gmail.com, w...@google.com, googletes...@googlegroups.com, re...@codereview.appspotmail.com
On Wed, Dec 16, 2009 at 10:13 AM, <preston....@gmail.com> wrote:
> Ok, changed to an "a_" prefix.

Great. Thanks for doing the grungy work!

> Do you want me to use "an_" in appropriate places? (I did)

Yes, this is greawt.

> Do you want me to change _all_ parameters in a method/function signature
> to use "a_"? (I didn't)

No need for that. We just need to fix where the warnings are.

> http://codereview.appspot.com/180041
>



--
Zhanyong

Zhanyong Wan (λx.x x)

unread,
Dec 16, 2009, 1:20:59 PM12/16/09
to preston....@gmail.com, zhanyo...@gmail.com, vlad...@gmail.com, w...@google.com, googletes...@googlegroups.com, re...@codereview.appspotmail.com
I've looked through the entire change. Everything's great! Thanks
for the hard work. I'll get this tested and checked in soon.

2009/12/16 Zhanyong Wan (λx.x x) <w...@google.com>:
--
Zhanyong
Reply all
Reply to author
Forward
0 new messages