summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/unusedvariablecheck.cxx
AgeCommit message (Collapse)Author
2014-01-27Prepare dual-mode compiler plugin featureStephan Bergmann
...which can act as either a rewriter or a non-rewriter that emits warnings. Also added COMPILER_PLUGIN_WARNINGS_ONLY=X to demote warnings from plugin X from errors to warnings, even under --enable-werror. Change-Id: I05361936240a890515c6bba2459565417c1746b7
2013-09-22add mode lines to new files (and idls) since last runCaolán McNamara
Change-Id: Id1e74f18c90e69d1a781c8f02e30dc3c005ed4fd
2013-07-23adjust for upstreaming of warn_unused attributeLuboš Luňák
The warn_unused attribute has been upstream to GCC and Clang, so use it if present. Still warn about STL types if those do not use it yet (which is the status as of now). Change-Id: I3c003e44c08d1d141e23bba38cf92e663a5ac353
2013-05-02add constLuboš Luňák
Change-Id: I71236b9ca6300372ba00c85401cf19f6c0e7ac99
2013-03-28pass around CompilerInstance rather than ASTContextLuboš Luňák
It's possible to get the latter from the former, and the former is useful for other things too (access to the preprocessor, for example). Change-Id: I708d709129fd3a35bf7c63da4de09c2e696b382d
2013-02-02remove not needed #includeLuboš Luňák
Change-Id: I0fa791733407199db5be2cc9606ac9be1da64188
2013-02-02append [loplugin] automatically in report() rathen than manually everywhereLuboš Luňák
Change-Id: I2f98622f152ae0c7ac8d1113d6380f686ac7234c
2013-02-02avoid having to manuall modify sources when adding a new clang pluginLuboš Luňák
Now each one registers in its .cxx file. Change-Id: I811c0d4400c2bdccc1c287269378d7e8ad8743ce
2012-12-05Adapt to current Clang trunkStephan Bergmann
Change-Id: I0aadc7019934841d6864258695a17503918b6c20
2012-12-05Adapt to Clang 3.2Stephan Bergmann
Change-Id: I9e51867198d7677c26cbd97f5d9c85ac13dc90c5
2012-10-15support for compiler rewritersLuboš Luňák
Change-Id: I12e98ac9fc49ef2007914324006a396d183b778c
2012-10-15some namespacing improvementsLuboš Luňák
Change-Id: I95bd78340519bc1457385561b64c74e938b40bb2
2012-10-13compiler check to compare SAL_WARN/LOG areas against sal/inc/sal/log-areas.doxLuboš Luňák
Some of the areas are guesses I've added after seeing them, whoever feels reponsible for whichever part of the code feel free to adjust them. Change-Id: I2192de84d51cc2bc7c28fa84019d38b465985d15
2012-10-12compilers don't seem to warn about unused variables in the global scopeLuboš Luňák
And this causes at least some problems with extern variables in headers, maybe that could be handled, but it probably wouldn't be trivial to get it exactly right about which location to warn and which ones not. Change-Id: I8974c9ba9493d09165b026ee7a451238f6d90a30
2012-10-12DeclBase::getLocation() gives better location than getLocStart()Luboš Luňák
It usually points to the declaration name rather than its start. Change-Id: Idcb068ed88a783c177ae9dc255595afa0a163a7e
2012-10-12avoid crash on pointers to functionsLuboš Luňák
Clang's dyn_cast<> crashes on NULL, and getParentFunctionOrMethod() is NULL if the parameter is a part of a pointer-to-function declaration. Change-Id: Iee9eef488746f9a46bc090df8d318f27ad65f0ef
2012-10-12do not report unnamed parameters as unusedLuboš Luňák
Change-Id: I0cc44354085fbee15aa94d23c29830fd40e8d939
2012-10-09do not analyse system headers in the compiler pluginLuboš Luňák
Change-Id: Ica1e233b45cc778bfdc86cfd608ada7fc261c6c2
2012-10-09move some code to a common baseLuboš Luňák
Change-Id: Ife306c69054dfcc20b1339b88a4e14e5333ced71
2012-10-09compiler check for unused variablesLuboš Luňák
This is for variables that the compiler itself cannot figure out (e.g. non-trivial ctors). The classes need to be marked manually. Change-Id: I0109972e11e20578b1adc32065f701a871ee21aa