27 Commits

Author SHA1 Message Date
Stephan Bergmann
4f762202f6 Adapt loplugin:sallogareas
...to b6a69585b00867005820c1dd94e10e0e6b545e2a "old sal_detail_log_backtrace
into sal_detail_log" and follow-up c697ae306cd4eaa8144ed93fc908e50d5934e249
"Some clean up"

Change-Id: Ie38899e70c5b326724f9442fbf92e453b05eec01
2017-02-28 23:12:48 +01:00
Stephan Bergmann
8458ec8c9c Fix SAL_DEBUG_BACKTRACE
...after 56d071c10ca8016848f1f059aa3eb197fe928844 "rename SAL_DEBUG_TRACE to
SAL_DEBUG_BACKTRACE" (looks like this doesn't get used much...)
2017-02-09 10:35:20 +01:00
Noel Grandin
994e38e336 loplugin: use TypeCheck instead of getQualifiedNameAsString
since the latter is rather slow

Change-Id: Ib73cdb923585580777c2265b561c1808e93b2baa
Reviewed-on: https://gerrit.libreoffice.org/33585
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01 12:49:42 +00:00
Noel Grandin
bd6723fd53 disable the 'two different log areas in the same file' loplugin check
too many false+ to leave it alive by default

Change-Id: I6d8f92b630c351c1ac788fad79f8d7c435ba4963
2016-12-15 14:11:16 +02:00
Noel Grandin
d15b4e2045 teach sallogareas plugin to catch inconsistencies
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a
Reviewed-on: https://gerrit.libreoffice.org/32004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-15 06:45:14 +00:00
Stephan Bergmann
4e9dd6e1b7 Disambiguate clang::StringLiteral
...vs. recently introduced llvm::StringLiteral (llvm/ADT/StringRef.h)

Change-Id: I4d74546b0d1401a74b0c15368bbc93794ecd0b1d
2016-12-14 15:52:33 +01:00
Jochen Nitschke
1520d0d6f3 cppcheck: silence warnings in compilerplugins
mostly missing explicit before ctors and
uninitialized member vars

one odd use of std::find
> compilerplugins/clang/implicitboolconversion.cxx
> 800 stlIfFind warning	Suspicious condition.
> The result of find() is an iterator, but it is not properly checked.

Change-Id: Iade53494cd7fe8ddb0e110e431449ae5a517fe3b
Reviewed-on: https://gerrit.libreoffice.org/24398
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-27 12:03:57 +00:00
Stephan Bergmann
593f3b703c Re-enable loplugin:sallogareas
I had it locally enabled for like a month now, and it did not produce any more
noise than any of the other plugins, but quite some amount of malformed area
designators had been introduced over time.

Change-Id: I642591496bb9338246ba43a3d988481930c087fb
2016-01-06 16:48:15 +01:00
Tor Lillqvist
dac678d44e Deactivate the sallogareas plugin
It's boring and a waste of time to have to keep registering in
include/sal/log-areas.dox new log areas that other people have introduced.

We don't really have a uniform policy for logging anyway, so why bother trying
to enforce a such for the log areas? Anybody uses whatever log areas and log
output style and formatting they want in the code they happen to be working
on. And that's fine with me. We were supposed to be the project that avoids
unnecessary process, rules and bureaucracy, right?

Change-Id: I6bddcb56b58edcd885e5dc743c8730878de0036d
2014-09-11 09:28:35 +03:00
Stephan Bergmann
1f078fcadd Prepare dual-mode compiler plugin feature
...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
2014-01-27 13:12:33 +01:00
Caolán McNamara
3656a57e88 add mode lines to new files (and idls) since last run
Change-Id: Id1e74f18c90e69d1a781c8f02e30dc3c005ed4fd
2013-09-22 12:21:34 +01:00
Luboš Luňák
e6c20364e7 add const
Change-Id: I71236b9ca6300372ba00c85401cf19f6c0e7ac99
2013-05-02 18:19:59 +02:00
Tor Lillqvist
294ad90704 Update location of log-areas.dox
Change-Id: If54a3d7047f13ae9c9345c21737a89afee645403
2013-04-24 11:42:09 +03:00
Luboš Luňák
153a69cad2 pass around CompilerInstance rather than ASTContext
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-03-28 18:01:00 +01:00
Luboš Luňák
276953ef21 remove not needed #include
Change-Id: I0fa791733407199db5be2cc9606ac9be1da64188
2013-02-02 22:59:45 +01:00
Luboš Luňák
f5ee30c3ee append [loplugin] automatically in report() rathen than manually everywhere
Change-Id: I2f98622f152ae0c7ac8d1113d6380f686ac7234c
2013-02-02 22:59:45 +01:00
Luboš Luňák
a1c61eb112 move documentation of plugins to the .cxx files
It's mostly there already anyway, no need to duplicate it.

Change-Id: I5b066f90725a064fb0746e1411900e835e3f66c3
2013-02-02 22:59:44 +01:00
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
Luboš Luňák
62532ad485 do not set our clang timestamp to the timestamp of the clang binary
If the clang binary comes from a package which had been built before
any of our clang related sources were changed the last time, the timestamp
would be older and so there would be no rebuild. So do the stamp handling
the usual way, clang upgrades will work fine, downgrades will not, but
that's the same problem like with downgrading a library and its headers.

To somewhat mitigate the problem (Clang plugin doesn't get cleaned by
'make clean'), include the full Clang version (which includes SVN revision)
in config_clang.h and make all Clang plugin code include that, so
at least configure re-run will trigger a rebuild if necessary.

Change-Id: I993197f79e92e36105092c92c33b2e1db343e975
2013-01-06 18:23:04 +01:00
Lubos Lunak
e1b11cc461 config_clang.h 2012-12-26 13:56:45 +01:00
Stephan Bergmann
149858e94e Adapt to Clang 3.2
Change-Id: I9e51867198d7677c26cbd97f5d9c85ac13dc90c5
2012-12-05 15:30:33 +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
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
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
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