Coding style change

From: James Sun <james...@fb.com>
Date: Tuesday, January 24, 2017 at 2:36 PM
To: "cfe-commits@lists.llvm.org" <cfe-commits@lists.llvm.org>
Subject: Add warning for c++ member variable shadowing

Dear members

Here is a patch (attached) to create warnings where a member variable shadows 
the one in one of its inheriting classes. For cases where we really don't want 
to shadow member variables, e.g.

class a {
  int foo;
}

class b : a {
  int foo; // Generate a warning
}

This patch
(1) adds a member variable shadowing checking, and
(2) incorporates it to the unit tests.


Comments are welcome.

Thanks

James

Attachment: inheritance-shadow-warning-v0.2.patch
Description: inheritance-shadow-warning-v0.2.patch

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to