Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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.
|
|
When calling the tartan script uninstalled, the $clang_bin_dir will be
the directory containing the tartan script — the scripts/ directory.
|
|
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.
|
|
Configuring against LLVM 3.4 stable previously failed because
`llvm-config --version` returned 3.4.2.
|
|
|
|
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).
|
|
Hopefully this makes things a little clearer as to how to use Tartan.
|
|
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.
|
|
This standardises all error messages on using the Clang-internal
QualType formatting functions, improving consistency.
|
|
This eliminates the horrible FORCE_* flag hacks which were needed for
comparing non-basic types.
|
|
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.
|
|
This will allow common code, such as names, descriptions and enable
handling, to be factored out.
|
|
All Tartan code should be in the ‘tartan’ namespace rather than the
anonymous one for consistency.
|
|
By passing the --[enable|disable]-checker arguments to the plugin.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
Rather than assuming they’re installed.
|
|
Also ensure all the right test files are distributed.
|
|
This improves gnome-clang’s behaviour when running uninstalled in a
custom environment (such as a JHBuild shell).
|
|
It now automatically sets the GNOME_CLANG_PLUGIN variable from the
source directory, if present. The website documentation has also been
updated.
|
|
|
|
Test that extracting non-NULL checks from g_return[_val]_if_fail() calls
works.
|
|
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.
|
|
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.
|
|
The integer constant 0 can be interpreted as NULL, so only perform NULL
pointer checks when the expected type is a pointer.
|
|
This partially fixes running gnome-clang while uninstalled.
|
|
This makes the tests a little less hard-coded.
|
|
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).
|
|
This loosely depends on the GLib patch in bug #719966.
|
|
Just in case these warnings are hit, it would be useful to know what
Stmt/Expr caused them.
|
|
|