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

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 2 07:44:26 PST 2017


JonasToth added inline comments.


================
Comment at: test/clang-tidy/nolintnextline.cpp:23
+
+// NOLINTNEXTLINE without-brackets-skip-all, another-check
+class C5 { C5(int i); };
----------------
xgsa wrote:
> 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
> ```
Ah sure, that makes sense.


https://reviews.llvm.org/D40671





More information about the cfe-commits mailing list