Luboš Luňák
1ed9af9a44
skip 'else' from a macro expansion too
...
Change-Id: I1a6d70d1554dc5bf8f46940ed62b47ab34983aa7
2012-11-20 16:30:02 +01:00
Luboš Luňák
5646906f5b
do not warn about missing area in SAL_DEBUG
...
Change-Id: I99314136cac7f47a5adf8e0e29093ec9fbf4fd90
2012-10-26 19:26:11 +02:00
Stephan Bergmann
9cabab002b
CLANGPLUGIN_CPPFLAGS for building plugin for Clang in nonstandard location
...
(i.e., configure with CLANGPLUGIN_CPPFLAGS=-I.../clang-installation/include
-I.../clang-build/tools/clang/include)
Change-Id: Ic6d2973629103f71c32f44ebba2ac70d137d18e7
2012-10-22 16:25:41 +02:00
Lubos Lunak
1a77b93aec
only one warning per one SAL_INFO/SAL_WARN
...
Change-Id: I5aafe9ed51c86dc31492d205f44fba6b1db137d2
2012-10-19 10:15:42 +02:00
Luboš Luňák
dc3aa430f9
rewriter for postfix->prefix operator++
...
Change-Id: I59a7490ec76b10fd31033d1ceccd1e3eae0ad398
2012-10-15 23:33:08 +02:00
Luboš Luňák
2e3642e66b
convenience functions for source rewriters
...
Change-Id: I36e2b49bc615db0b12b03ffa755fa51acc6830a0
2012-10-15 23:33:07 +02: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
1d5c2d8368
document sallogareas compiler check
...
Change-Id: I72d25ec9a1acafa2bc451e620d5dc5721d849c42
2012-10-14 11:55:24 +02:00
Luboš Luňák
f1b6058a3b
remove debug output
...
Change-Id: I719ce8870320f3bddd68fe26cf2c2b941e0a9403
2012-10-13 18:27:39 +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
2c3759735f
print something when compiling clang plugin too
...
Change-Id: Ia312533381260a7c506dfd75b9f88c74a8329958
2012-10-12 13:12:05 +02:00
Luboš Luňák
f56da8c967
rebuild clang plugin when clang changes
...
Change-Id: Ia4192224d0b217ba2393dc457250cf12febe9306
2012-10-12 13:12:04 +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
06fb559a4b
note about (not) linking llvm/clang libraries
...
Change-Id: I628e3b99b69d238abc9df3e62e77b30eb85f1a0d
2012-10-09 23:31:39 +02:00
Luboš Luňák
7c4d3ea6ba
don't check next statement after if body if there's also an else part
...
Change-Id: I04265acd821187f529562691f35ede93b84368fa
2012-10-09 17:25:28 +02:00
Luboš Luňák
4d3c6a0499
ignore macro expansion completely for now
...
Change-Id: Ie37b83fef1279a0a953de27941e3b342437c81d1
2012-10-09 17:25:28 +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
4d05099806
do not force compiler plugin warnings to errors with -Werror, for now
...
Change-Id: I87585fce44e803513d5345709d9723075b9429a1
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
d4aa136e97
compiler plugin check for if/while/true bodies with possibly {} missing
...
Change-Id: Ia84c70006b0b8a039b6fea27f3c5cde796f25d03
2012-10-09 17:25:27 +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
Luboš Luňák
02a8d36ebf
initial support for clang compiler plugins
...
The plugin is intentionally built using a custom Makefile,
because it's used by gbuild, so I don't want to build the plugin
using gbuild too. It is also intentionally not placed under workdir/,
as that is cleaned by 'make clean', the plugin is cleaned only
by 'make distclean', so that cleaning it doesn't cause ccache misses.
No actual functionality in the plugin itself yet.
Change-Id: Ic05eba8d6260eec123c9e699eb5385abfe1b832f
2012-10-09 17:25:27 +02:00