summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-05-27clang-plugin: UNFINISHED work to add reference count checkingwip/pwithnall/refcountingPhilip Withnall9-1/+499
2014-05-26website: Fix running instructions to use `scan-build make`Philip Withnall1-3/+2
Even if ./configure hard-codes the Clang compiler path into the generated Makefiles, other environment variables it sets are needed at compile time, so make must always be run inside scan-build. Otherwise the analyser gets run without the Tartan plugin loaded, which is sad.
2014-05-26scripts: Fix the path used when running tartan uninstalledPhilip Withnall1-2/+2
When calling the tartan script uninstalled, the $clang_bin_dir will be the directory containing the tartan script — the scripts/ directory.
2014-05-26scripts: Handle LLVM micro versions in tartan scriptPhilip Withnall1-1/+16
As per the previous commit. Also improve error handling when the expected version is not supported, to make it more obvious what the user can do to fix the situation.
2014-05-26build: Handle LLVM versions with a micro componentPhilip Withnall1-5/+5
Configuring against LLVM 3.4 stable previously failed because `llvm-config --version` returned 3.4.2.
2014-05-25scripts: Remove an unnecessarily hardcoded stringPhilip Withnall1-2/+2
2014-05-25scripts: Improve error handling in tartan scriptPhilip Withnall1-0/+7
Actually kill the script if Clang or the plugin library cannot be found. Emit an error if the script is called with no arguments (in this case Clang would also emit an error if we called it, but the Clang error is quite uninformative).
2014-05-25website: Improve usage instruction formatting and wordingPhilip Withnall1-25/+41
Hopefully this makes things a little clearer as to how to use Tartan.
2014-05-25clang-plugin: Fix error message formatting in GVariant checkerPhilip Withnall7-60/+60
The Clang QualType formatting adds quotation marks, but our error messages already contained them. Loath as I am to revert to using ASCII quotation marks, the formatting provided by QualType is quite good (since it adds aka information), so drop the old Tartan Unicode quotation marks.
2014-05-25clang-plugin: Simplify GVariant checker error message codePhilip Withnall1-9/+2
This standardises all error messages on using the Clang-internal QualType formatting functions, improving consistency.
2014-05-25clang-plugin: Port GVariant checker to use TypeManagerPhilip Withnall2-169/+89
This eliminates the horrible FORCE_* flag hacks which were needed for comparing non-basic types.
2014-05-24clang-plugin: Move type lookups out into a new TypeManagerPhilip Withnall5-69/+180
This implements caching of the looked up types (which should improve performance) and also centralises the implementation so it can be used by other checkers.
2014-05-22clang-plugin: Make all checkers inherit from a Checker parent classPhilip Withnall12-36/+137
This will allow common code, such as names, descriptions and enable handling, to be factored out.
2014-05-22clang-plugin: Tidy up namespacing for checkersPhilip Withnall11-4/+42
All Tartan code should be in the ‘tartan’ namespace rather than the anonymous one for consistency.
2014-05-22clang-plugin: Allow checkers to be individually disabledPhilip Withnall10-15/+101
By passing the --[enable|disable]-checker arguments to the plugin.
2014-05-20website: Add a troubleshooting section to the websitePhilip Withnall1-0/+23
2014-05-20bugs: Add a bug about making it more obvious that Tartan is runningPhilip Withnall1-0/+50
2014-05-09clang-plugin: Fix diagnostics to correctly use format placeholdersPhilip Withnall7-287/+207
2014-05-09tests: Check for all expected error lines rather than just onePhilip Withnall4-21/+32
Previously, the wrapper-compiler-errors script was assuming a test was successful if it could see at least one of the expected error message lines in the compiler output. Since several of those lines are boilerplate, this hid legitimate test failures. Fix it so that *all* expected lines are checked for (although there are no checks which test that *only* those lines were output), and fix up a few tests.
2014-05-09clang-plugin: Improve error message cosmetics in the GVariant checkerPhilip Withnall1-1/+4
2014-05-09clang-plugin: Fix handling of const types in the GSignal checkerPhilip Withnall1-2/+5
2014-05-08clang-plugin: Add a g_signal_connect() checkerPhilip Withnall11-6/+1337
This validates that: • The named signal exists on the given GObject subclass. • The type of the callback function matches that declared for the signal. Unit tests are included.
2014-05-08clang-plugin: Fix a typo in a debug messagePhilip Withnall1-1/+1
2014-05-07clang-plugin: Add missing #includes to gir-manager.hPhilip Withnall1-0/+3
2014-05-07clang-plugin: Improve WARN_EXPR print formatPhilip Withnall1-1/+1
2014-05-07clang-plugin: Fix #define used to enable debug outputPhilip Withnall1-1/+1
2014-05-07bugs: File some new feature idea bugsPhilip Withnall6-0/+172
2014-05-07clang-plugin: Clarify a warning about (allow-none) annotationsPhilip Withnall1-1/+1
2014-05-07build: Remove dependency on gnome-commonPhilip Withnall4-10/+217
Inline the relevant code from gnome-autogen.sh (there isn’t much of it), and do the same with the GNOME macros in configure.ac. Copy the gnome-compiler-flags.m4 macro in-tree. It’s licenced under GPLv2+, which is fine.
2014-05-07build: Rename from gnome-clang to TartanPhilip Withnall27-253/+269
Make the name a little less GNOME-centric, since the plugin actually only (currently) deals with GLib, so has much wider application than just on GNOME code. Also, ‘Tartan’ sounds cooler.
2014-05-07bugs: Add a bug about gedit integrationPhilip Withnall3-0/+82
2014-05-06website: Add release dates to the websitePhilip Withnall1-2/+2
2014-05-06website: Add a link to the 0.2.0 releasePhilip Withnall1-0/+1
2014-05-06Post-release version bumpPhilip Withnall2-1/+7
2014-05-06Release version 0.2.00.2.0Philip Withnall1-0/+6
2014-05-06tests: Use the uninstalled gnome-clang and plugin in the testsPhilip Withnall1-2/+8
Rather than assuming they’re installed.
2014-05-06tests: Fix builddir ≠ srcdir problemsPhilip Withnall1-3/+8
Also ensure all the right test files are distributed.
2014-05-06scripts: Use `which clang` instead of hardcoding /usr/binPhilip Withnall1-2/+2
This improves gnome-clang’s behaviour when running uninstalled in a custom environment (such as a JHBuild shell).
2014-05-06scripts: Support running gnome-clang while uninstalledPhilip Withnall3-4/+22
It now automatically sets the GNOME_CLANG_PLUGIN variable from the source directory, if present. The website documentation has also been updated.
2014-05-06bugs: Add a comment about diagnostic outputPhilip Withnall2-0/+30
2014-05-06tests: Add tests for existing assertion extraction codePhilip Withnall7-0/+332
Test that extracting non-NULL checks from g_return[_val]_if_fail() calls works.
2014-05-06clang-plugin: Make failure to load a GI typelib a warning not an errorPhilip Withnall1-2/+2
Since we no longer know which typelibs are required and which are unnecessary. We don’t want a single corrupt typelib to prevent gnome-clang from running.
2014-05-06clang-plugin: Automatically promote int to uint with constant varargsPhilip Withnall2-1/+27
If an integer constant is passed as a vararg, it will be passed as a signed integer to the function. For integers less than G_MAXINT this is not a problem (as the bit representations of int and uint are the same to that point). Modify the GVariant checker to accept low-valued signed integers for unsigned integer GVariant elements.
2014-05-06clang-plugin: Don’t confuse integer constants with NULLPhilip Withnall2-1/+10
The integer constant 0 can be interpreted as NULL, so only perform NULL pointer checks when the expected type is a pointer.
2014-05-06scripts: Mark gnome-clang as executablePhilip Withnall4-0/+80
This partially fixes running gnome-clang while uninstalled.
2014-05-06tests: Move templates out of wrapper-compiler-errors into new filesPhilip Withnall13-23/+64
This makes the tests a little less hard-coded.
2014-05-06clang-plugin: Hard-code GLib functions to ignore for nullability checksPhilip Withnall1-1/+31
There are several GLib functions which are exported as symbols in libglib-2.0.so, but which are deliberately not documented or exposed in the GIR file. They’re for internal use by GLib macros. Since we can’t extract nullability information from the GIR file for them, hard-code them into a list of GLib functions to ignore, otherwise we get loads of false positives (especially in unit test code).
2014-05-06clang-plugin: Support (optional) and (nullable) attributesPhilip Withnall4-2/+38
This loosely depends on the GLib patch in bug #719966.
2014-05-06clang-plugin: Add extra debug info on internal warningsPhilip Withnall2-6/+9
Just in case these warnings are hit, it would be useful to know what Stmt/Expr caused them.
2014-05-05clang-plugin: Clarify some nullability checker error messagesPhilip Withnall1-6/+4