summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/warn-unused-function.c
Commit message (Collapse)AuthorAgeFilesLines
* Add -Winfinite-recursion to -Wmost (and -Wall), PR23789.Nico Weber2015-06-181-1/+1
| | | | llvm-svn: 240056
* This is now passing. Uncomment and close out PR6281.Bill Wendling2013-10-171-4/+2
| | | | llvm-svn: 192869
* c: make __attribute__((unused)) transitive.Fariborz Jahanian2012-09-061-1/+13
| | | | | | | Don't warn if annotated decl is used inside another unused. // rdar://12233989 llvm-svn: 163329
* We regard a function as 'unused' from the codegen perspective, so our ↵Argyrios Kyrtzidis2011-04-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | warnings diverge from gcc's unused warnings which don't get emitted if the function is referenced even in an unevaluated context (e.g. in templates, sizeof, etc.). Also, saying that a function is 'unused' because it won't get codegen'ed is somewhat misleading. - Don't emit 'unused' warnings for functions that are referenced in any part of the user's code. - A warning that an internal function/variable won't get emitted is useful though, so introduce -Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not "needed" ('used' from the codegen perspective), e.g: static void foo() { } template <int> void bar() { foo(); } test.cpp:1:13: warning: function 'foo' is not needed and will not be emitted static void foo() { } ^ Addresses rdar://8733476. llvm-svn: 129794
* Mark functions referenced by 'cleanup' attribute as used. Fixes rdar://8728293Argyrios Kyrtzidis2010-12-041-0/+7
| | | | llvm-svn: 120872
* Recursive functions should be marked when used from another function. Fixes ↵Argyrios Kyrtzidis2010-08-251-0/+3
| | | | | | http://llvm.org/PR7923. llvm-svn: 112045
* Commit improved version of 111026 & 111027.Argyrios Kyrtzidis2010-08-151-0/+9
| | | | | | | | | | | | | | | | | | | | Unused warnings for functions: -static functions -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace Unused warnings for variables: -static variables -variables in anonymous namespace -static data members in anonymous namespace -static data members specializations in anonymous namespace Reveals lots of opportunities for dead code removal in llvm codebase that will interest my esteemed colleagues. llvm-svn: 111086
* Revert 111026 & 111027, build breakage.Argyrios Kyrtzidis2010-08-131-9/+0
| | | | llvm-svn: 111036
* Expand the unused warnings for functions. Warn for:Argyrios Kyrtzidis2010-08-131-0/+9
| | | | | | | | | | -static function declarations -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace llvm-svn: 111026
* Don't warn about unused static functions if they are marked with Chris Lattner2010-04-091-0/+5
| | | | | | attr constructor or destructor. Patch by Jean-Daniel Dupas! llvm-svn: 100870
* Include all warnings under '-Wunused' in '-Wmost' and '-Wall'.Ted Kremenek2010-04-081-0/+2
| | | | llvm-svn: 100786
* Do not add functions marked with the unused attribute to the list of unused ↵Tanya Lattner2010-02-171-0/+4
| | | | | | functions to warn about. Update test case. llvm-svn: 96452
* Fix unused function warning to handle used attributes and redeclarations. ↵Tanya Lattner2010-02-171-2/+11
| | | | | | Update test case. llvm-svn: 96444
* Disable warn_unused_function for now, its breaking various project builds due toDaniel Dunbar2010-02-161-1/+2
| | | | | | false positives. llvm-svn: 96375
* Implementing unused function warning.Tanya Lattner2010-02-121-0/+16
llvm-svn: 95940
OpenPOWER on IntegriCloud