13 Commits

Author SHA1 Message Date
Luboš Luňák
a7c3adb773 avoid having to manuall modify sources when adding a new clang plugin
Now each one registers in its .cxx file.

Change-Id: I811c0d4400c2bdccc1c287269378d7e8ad8743ce
2013-02-02 22:59:44 +01:00
Stephan Bergmann
f995e0f7bb Adapt to current Clang trunk
Change-Id: I0aadc7019934841d6864258695a17503918b6c20
2012-12-05 17:33:47 +01:00
Stephan Bergmann
149858e94e Adapt to Clang 3.2
Change-Id: I9e51867198d7677c26cbd97f5d9c85ac13dc90c5
2012-12-05 15:30:33 +01:00
Luboš Luňák
0349c738da support for compiler rewriters
Change-Id: I12e98ac9fc49ef2007914324006a396d183b778c
2012-10-15 15:40:33 +02:00
Luboš Luňák
41d6a0ea2d some namespacing improvements
Change-Id: I95bd78340519bc1457385561b64c74e938b40bb2
2012-10-15 15:40:33 +02:00
Luboš Luňák
1e313e759b compiler check to compare SAL_WARN/LOG areas against sal/inc/sal/log-areas.dox
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-13 17:40:45 +02:00
Luboš Luňák
cd8a490536 compilers don't seem to warn about unused variables in the global scope
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-12 16:56:53 +02:00
Luboš Luňák
2acc59ea28 DeclBase::getLocation() gives better location than getLocStart()
It usually points to the declaration name rather than its start.

Change-Id: Idcb068ed88a783c177ae9dc255595afa0a163a7e
2012-10-12 16:56:53 +02:00
Luboš Luňák
d1eee073eb avoid crash on pointers to functions
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-12 13:10:55 +02:00
Luboš Luňák
9c0304f5a7 do not report unnamed parameters as unused
Change-Id: I0cc44354085fbee15aa94d23c29830fd40e8d939
2012-10-12 13:10:55 +02:00
Luboš Luňák
7cd19a8f10 do not analyse system headers in the compiler plugin
Change-Id: Ica1e233b45cc778bfdc86cfd608ada7fc261c6c2
2012-10-09 17:25:28 +02:00
Luboš Luňák
4fc56b9d4c move some code to a common base
Change-Id: Ife306c69054dfcc20b1339b88a4e14e5333ced71
2012-10-09 17:25:28 +02:00
Luboš Luňák
13e39545ea compiler check for unused variables
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
2012-10-09 17:25:27 +02:00