xaizek / for-postfix (License: GPLv2+) (since 2018-12-07)
Clang-based standalone tool that detects for-loops with postfix operators.
Commit 8c57f199accdd1cc950163197fe7349f6cc29f61

Add README file
Author: xaizek
Author date (UTC): 2014-03-24 20:34
Committer name: xaizek
Committer date (UTC): 2014-03-24 20:49
Parent(s): 79ec411233a634f6f3ed2cbc4248224f17e02c3c
Signing key:
Tree: fe3a107c9f957880d80882a78b3533851370e11b
File Lines added Lines deleted
README.md 33 0
File README.md copied from file test-files/vector-all.cpp (similarity 51%) (mode: 100644) (index 42aa3d3..03302a1)
1 Brief description
2 -----------------
3
4 Clang-based standalone tool that detects for-loops with postfix operators.
5
6 Example
7 -------
8
9 Input:
10
11 ```c++
1 12 #include <cstdlib> #include <cstdlib>
2 13
3 14 #include <vector> #include <vector>
 
... ... main(void)
32 43
33 44 return EXIT_SUCCESS; return EXIT_SUCCESS;
34 45 } }
46 ```
47
48 Run command:
49
50 ```sh
51 bin/for-postfix vector-all.cpp --
52 ```
53
54 Output (paths are truncated):
55
56 ```
57 .../vector-all.cpp:17:dangerous use of postfix operator
58 .../vector-all.cpp:25:dangerous use of postfix operator
59 ```
60
61 Building
62 --------
63
64 1. Clone the repository to `llvm/tools/clang/tools/extra`.
65 2. Add `add_subdirectory(for-postfix)` to `CMakeLists.txt` in the same
66 directory.
67 3. Run `ninja for-postfix` inside your LLVM's `build/` directory.
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/for-postfix

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/for-postfix

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master