[cfe-dev] Warning for static member accessed through dot or arrow

Csaba Raduly via cfe-dev cfe-dev at lists.llvm.org
Mon Dec 12 00:57:37 PST 2016


On Mon, Dec 12, 2016 at 1:32 AM, Mat Sutcliffe via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
(snip)
> Maybe it's too simple an issue for anyone to waste time talking about, so it
> might just be a case of submitting the patch and seeing what happens. I'm
> just being extra cautious because it's my first patch to LLVM.
> Coincidentally, this came up on StackOverflow just the other day:
> <http://stackoverflow.com/q/41018973/1639256>

The fact that it caused somebody to go WTF when reading that code
suggests that a compiler warning about it *is* worthwhile.

That line of code probably caused a loss of 30-60 minutes of
programmer productivity.

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds



More information about the cfe-dev mailing list