folly/Foreach.h: fix FOR_EACH_R and FOR_EACH_KV to avoid shadowing warnings
authorJim Meyering <meyering@fb.com>
Fri, 11 Nov 2016 00:50:45 +0000 (16:50 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Fri, 11 Nov 2016 00:53:32 +0000 (16:53 -0800)
commit1dee6ec97e5608698324284582257b68252881a6
tree167d0db2fb75c2b81f3f0905eae361cdd5ffec9d
parent7213df65aa8d4d6fca18b1a6cfe76a77eed6a797
folly/Foreach.h: fix FOR_EACH_R and FOR_EACH_KV to avoid shadowing warnings

Summary:
Fix these macros not to self-shadow for nested uses.
How? Make each local variable name include __LINE__.
This works in most cases, but not all: if you put the
nested uses all on one line, you'll still get shadowing warnings.

Reviewed By: yfeldblum

Differential Revision: D4161553

fbshipit-source-id: 9e11ae6778272c733a4c820cfb30c5db59998a5b
folly/Foreach.h