summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/warn-shadow.c
Commit message (Collapse)AuthorAgeFilesLines
* Silence the -Wshadow warning for enumerators shadowing a type.Aaron Ballman2018-10-221-0/+7
| | | | | | Amends r344259 so that enumerators shadowing types are not diagnosed, as shadowing under those circumstances is rarely (if ever) an issue in practice. llvm-svn: 344898
* Improve -Wshadow warnings with enumerators.Aaron Ballman2018-10-111-0/+5
| | | | | | | | | | | Addresses PR24718 by checking for enumerators that shadow other enumerators. Catches issues like: enum E1{e1}; void f(void) { enum E2{e1}; } llvm-svn: 344259
* Split test to test -Wshadow with emmintrin.h more portable.Ted Kremenek2013-10-081-10/+0
| | | | llvm-svn: 192144
* Suppress useless -Wshadow warning when using _mm* macros from emmintrin.hTed Kremenek2013-10-071-0/+10
| | | | | | | | | | Fixes <rdar://problem/10679282>. I'm not completely satisfied with this patch. Sprinkling "diagnostic ignored" _Pragmas throughout this file is gross, but I couldn't suppress it for the entire file. llvm-svn: 192143
* Fix the diagnostic when we are shadowing an external variable and there ↵Argyrios Kyrtzidis2011-01-311-1/+6
| | | | | | exists a locally scoped extern with the same name. llvm-svn: 124580
* 'extern' variables in functions don't shadow externs in global scope. Fixes ↵Argyrios Kyrtzidis2011-01-311-0/+6
| | | | | | rdar://8883302. llvm-svn: 124578
* -Wshadow should only warn about parameter declarations when we'reJohn McCall2010-03-221-0/+5
| | | | | | | | | entering a function or block definition, not on every single declaration. Unfortunately we don't have previous-lookup results around when it's time to make this decision, so we have to redo the lookup. The alternative is to use delayed diagnostics. llvm-svn: 99172
* Implement -Wshadow for parameter declarations as well.John McCall2010-03-201-2/+27
| | | | llvm-svn: 99037
* Remove warning about shadowing a built-in; built-ins aren't actuallyDouglas Gregor2010-03-171-1/+1
| | | | | | | considered to be a part of the translation unit unless they're named in a way that brings them into existence. llvm-svn: 98729
* Forgot the testcases.John McCall2010-03-161-0/+20
llvm-svn: 98685
OpenPOWER on IntegriCloud