summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)AuthorFilesLines
2013-02-22s/the the/the/Tor Lillqvist2-2/+2
Change-Id: Iadacffaad832c6ff06757e8567e24f929f24a4c3
2013-02-11Fixed compilation error of Clang plugins on Ubuntu/MintMarc-André Laverdière1-0/+2
Change-Id: Ib08c5075034e0e16c5541f05425ef15d2cc3a6f6 Reviewed-on: https://gerrit.libreoffice.org/2045 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-02-09make it possible to limit what files will be modified by a compiler pluginLuboš Luňák3-25/+90
Change-Id: I4e3e8f5ca5e5b5b59b1bd067281f90940dd893b1
2013-02-09fix check whether a file is in a directoryLuboš Luňák1-4/+4
Make sure / is appended, otherwise /foo might match /foobar/file . Change-Id: I36469916b72b407c8f0c9c255099ee671039cf17
2013-02-09treat all source files as not up to date only with FORCE_COMPILE_ALLLuboš Luňák1-0/+2
So running the compiler plugin can be done either with FORCE_COMPILE_ALL=1 for simplicity, running the plugin on all source files for the target, or it's possible to use make's -W option (or touch files manually) to run it only for selected files. Change-Id: Ifa82bbe91dc1e179af9db8fbf99271bcf03a1d47
2013-02-07create an output dir that's already needed by $(shell ...)Luboš Luňák1-1/+2
Otherwise there's an error message e.g. during a clean build. Change-Id: I42efd08e014a4ebe25cfd1a497f622e5ea5c39ad
2013-02-07make sure the default target for compilerplugins is buildingLuboš Luňák1-1/+3
CLANGFORCE was the first in the makefile after c6ffe17631cccf11fbe00479d2169116d494a7da and therefore the default Change-Id: Id3b86a1ea2c27479067f7f55a977da3e6e8a2dfb
2013-02-02tutorial examples for writing new Clang plugin actionsLuboš Luňák9-1/+380
http://wiki.documentfoundation.org/Clang_plugins Change-Id: Ieb4fc186490e81ab961c094ca0a7fcdabc0f348f
2013-02-02a bit more reliable detection of removed/added sourcesLuboš Luňák1-0/+4
Change-Id: I7fdde46334c648ab6cba54210e31fada87dcfb55
2013-02-02remove not needed #includeLuboš Luňák9-18/+1
Change-Id: I0fa791733407199db5be2cc9606ac9be1da64188
2013-02-02append [loplugin] automatically in report() rathen than manually everywhereLuboš Luňák6-20/+21
Change-Id: I2f98622f152ae0c7ac8d1113d6380f686ac7234c
2013-02-02always use the report() helperLuboš Luňák5-29/+30
Change-Id: I2966fdb5bd98b1ddf718079584acf90a3e3a3700
2013-02-02move clang plugin that's no longer neededLuboš Luňák3-0/+3
But still keep it in case it'd be needed again, or simply as a starting reference. Change-Id: If519e1320e1bd6dce7746b57172324b33504051e
2013-02-02move documentation of plugins to the .cxx filesLuboš Luňák6-32/+28
It's mostly there already anyway, no need to duplicate it. Change-Id: I5b066f90725a064fb0746e1411900e835e3f66c3
2013-02-02automatically link all .cxx files in clang/ into the pluginLuboš Luňák1-12/+18
This means that just moving sources to the dir will enable the plugin action in that source, without modifying any sources, so those changes would not be accidentally committed when using a rewriter to change LO sources. Change-Id: Ic5a9c52dbf1939a1e78ad39ed6691ce3a1f399df
2013-02-02avoid having to manuall modify sources when adding a new clang pluginLuboš Luňák16-52/+161
Now each one registers in its .cxx file. Change-Id: I811c0d4400c2bdccc1c287269378d7e8ad8743ce
2013-02-02move plugin handling to separate source filesLuboš Luňák4-156/+212
Change-Id: Ifa1af34121bda9ca3250d09a3b8a46ea226795ed
2013-02-01one more config/ -> config_host/ fix after the renameLuboš Luňák1-1/+1
Change-Id: I347790e1ca2ee6a27303d3644aa1459ff76ba4b0
2013-01-31rewriters no longer create .new files, they modify sources directlyLuboš Luňák1-1/+1
Change-Id: I24bce9dcf46367b5658071ed692d346bb01a83a3
2013-01-11point to our wiki page on clang rather than clang homepageLuboš Luňák1-1/+1
Change-Id: Ia54040c7ed02e6a2d62dd93890a7d1467dd83a40
2013-01-11fix detection whether to ignore a source file or notLuboš Luňák1-3/+2
When compiling using icecream, the whole input is one file fed from stdin, so getBufferName() is "<stdin>", so get the filename from #line directives. Change-Id: Ie87937b10b0c7e8ddfa57a405b80fd9bde68dd0a
2013-01-06do not set our clang timestamp to the timestamp of the clang binaryLuboš Luňák4-5/+3
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-05I hate arbitrary integer typesLuboš Luňák1-1/+1
Change-Id: I4c8edfc0ee0390d595c43e384bf6e5f595a7b84f
2013-01-04handle case of SRCDIR == BUILDDIRLuboš Luňák1-1/+1
Change-Id: I9daea65dc28ab13776a7c4319e5d5811515fe160
2013-01-04rewriter plugin for removing forward rtl string declarationsLuboš Luňák4-0/+116
Change-Id: I12bf38985ae62756973c05aacf762ae3c405ac9b
2013-01-04support for removing a statement as a wholeLuboš Luňák2-10/+57
Change-Id: Icb7b017a0c76a6169f0f629bb40bf97449c75837
2013-01-04better handling of which files are processed by clang pluginsLuboš Luňák3-11/+62
Check that only LO's files are processed, as there's no point otherwise. Also warn about files in workdir/solver/builddir, as those are either generated or copies. Try to automatically match include files from solver to srcdir though, as that's where include files are usually included from :(. Change-Id: Ie8389e903f623a9d0e75015091acc0da78e76c3a
2012-12-26fix buildLubos Lunak1-0/+1
2012-12-26better error handling when writing modified sourceLubos Lunak1-10/+17
2012-12-26config_clang.hLubos Lunak2-6/+4
2012-12-11adjust clang plugins for srcdir != builddirLuboš Luňák1-2/+2
Change-Id: Ie4c934b52c4b010703e91f84b83e1fe590b5d187
2012-12-07CLANGPLUGIN_CPPFLAGS did not actually workStephan Bergmann1-6/+2
...it just appeared to work on machines that happen to have /usr/bin/clang. So hoist CLANGDIR/CLANGBUILD from compilerplugins/Makefile-clang.mk to configure.ac instead. Change-Id: Ie5d9c6bb8e9d0caa1583d78c8693f06b69873095
2012-12-05Adapt to current Clang trunkStephan Bergmann1-0/+1
Change-Id: I0aadc7019934841d6864258695a17503918b6c20
2012-12-05Adapt to Clang 3.2Stephan Bergmann7-1/+10
Change-Id: I9e51867198d7677c26cbd97f5d9c85ac13dc90c5
2012-11-20skip 'else' from a macro expansion tooLuboš Luňák2-9/+11
Change-Id: I1a6d70d1554dc5bf8f46940ed62b47ab34983aa7
2012-10-26do not warn about missing area in SAL_DEBUGLuboš Luňák1-7/+23
Change-Id: I99314136cac7f47a5adf8e0e29093ec9fbf4fd90
2012-10-22CLANGPLUGIN_CPPFLAGS for building plugin for Clang in nonstandard locationStephan Bergmann1-1/+1
(i.e., configure with CLANGPLUGIN_CPPFLAGS=-I.../clang-installation/include -I.../clang-build/tools/clang/include) Change-Id: Ic6d2973629103f71c32f44ebba2ac70d137d18e7
2012-10-19only one warning per one SAL_INFO/SAL_WARNLubos Lunak2-0/+9
Change-Id: I5aafe9ed51c86dc31492d205f44fba6b1db137d2
2012-10-15rewriter for postfix->prefix operator++Luboš Luňák4-0/+211
Change-Id: I59a7490ec76b10fd31033d1ceccd1e3eae0ad398
2012-10-15convenience functions for source rewritersLuboš Luňák4-10/+107
Change-Id: I36e2b49bc615db0b12b03ffa755fa51acc6830a0
2012-10-15support for compiler rewritersLuboš Luňák12-23/+188
Change-Id: I12e98ac9fc49ef2007914324006a396d183b778c
2012-10-15some namespacing improvementsLuboš Luňák6-8/+6
Change-Id: I95bd78340519bc1457385561b64c74e938b40bb2
2012-10-14document sallogareas compiler checkLuboš Luňák1-0/+8
Change-Id: I72d25ec9a1acafa2bc451e620d5dc5721d849c42
2012-10-13remove debug outputLuboš Luňák1-4/+4
Change-Id: I719ce8870320f3bddd68fe26cf2c2b941e0a9403
2012-10-13compiler check to compare SAL_WARN/LOG areas against sal/inc/sal/log-areas.doxLuboš Luňák7-9/+166
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ňák1-0/+2
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ňák2-3/+3
It usually points to the declaration name rather than its start. Change-Id: Idcb068ed88a783c177ae9dc255595afa0a163a7e
2012-10-12print something when compiling clang plugin tooLuboš Luňák1-0/+2
Change-Id: Ia312533381260a7c506dfd75b9f88c74a8329958
2012-10-12rebuild clang plugin when clang changesLuboš Luňák1-1/+5
Change-Id: Ia4192224d0b217ba2393dc457250cf12febe9306
2012-10-12avoid crash on pointers to functionsLuboš Luňák1-1/+1
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