Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
David Chisnall 95c23b1a00 Add the const parameter checker.
This complains if a non-const parameter is not modified. In the PALs,
the size parameter is modified only by some implementations, so we can
make it const in the ones where it isn't.
2019-04-30 09:46:10 +01:00
David Chisnall 91f2310215 More checks.
Use using instead of typedef.
2019-04-30 09:46:01 +01:00
David Chisnall 5c197e4ae4 [NFC] More checks, comments on end of namespace braces. 2019-04-30 09:46:01 +01:00
David Chisnall 49ece8f4e1 Enable the static analyser from clang-tidy.
Fix a false positive.  The loops in the pagemap accessor are too
complicated for the static analyser to check, so it doesn't spot that a
non-null return is impossible.
2019-04-30 09:46:01 +01:00
David Chisnall d06e539732 Add more checks.
Add missing parentheses in UNUSED (shouldn't matter, but keeps a checker
that may catch real bugs elsewhere happy).
2019-04-30 09:46:01 +01:00
David Chisnall b5bc09ced3 Add some more checkers.
Change the result of `operator=` on `Mod` to return `Mod&`.  In this
example:

```c++
Mod<4, int> a;
int b = (a = 8);
```

The value of `b` will now be 0, not 8, and will equal the value of `a`.
Hopefully this is less confusing to users of this class.
2019-04-29 15:14:43 +01:00
David Chisnall 22d33ebf99 Add another checker.
Use nullptr where appropriate.
2019-04-29 15:00:25 +01:00
David Chisnall e6325e5cd2 Add a clang-tidy config file.
Small set of checks for now, we can add to this over time.
2019-04-29 11:30:23 +01:00