[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

Anton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 2 06:37:57 PST 2017


xgsa added inline comments.


================
Comment at: test/clang-tidy/nolintnextline.cpp:23
+
+// NOLINTNEXTLINE without-brackets-skip-all, another-check
+class C5 { C5(int i); };
----------------
JonasToth wrote:
> Ian confused now. The NOLINTNEXTLINE with incorrect parents should not silence the diagnostic, should it? 
> 
> In my understanding the following line should cause the explicit constructor check to warn. Is that check message missing or did I get something wrong?
Without parentheses, it works just as `NOLINTNEXTLINE` (i.e. suppresses all the diagnostics for line), because it's impossible to distinguish check names from user comments after `NOLINTNEXTLINE`:
```
// NOLINTNEXTLINE check-name, another-check
// NOLINTNEXTLINE Some description, why the suppression is added
```


https://reviews.llvm.org/D40671





More information about the cfe-commits mailing list