ahmedasadi marked 3 inline comments as done.
ahmedasadi added inline comments.


================
Comment at: test/SemaCXX/warn-shadow.cpp:65
     char *data; // expected-warning {{declaration shadows a static data member 
of 'A'}}
+    char *a1; // expected-warning {{declaration shadows a typedef in 'A'}}
+    char *a2; // expected-warning {{declaration shadows a type alias in 'A'}}
----------------
arphaman wrote:
> It looks like previously this wouldn't have been a warning. Should we really 
> warn about local variables that shadow typedef names?
GCC does, though I agree the warning isn't that helpful as a variable typically 
can't be used in place of a type (only exception I can think of is sizeof).

I'll modify the patch to only warn when typedefs / type aliases shadow each 
other.


https://reviews.llvm.org/D31235



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

Reply via email to