diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2017-02-14 12:47:56 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2017-02-14 12:47:56 +0000 |
commit | d1013b44e305e8da235583b763b2308dafdb813f (patch) | |
tree | 2b96956691e5c8bb1b1ffe0cb8c62eebd12aba5c /clang-tools-extra/test/clang-tidy/nolintnextline.cpp | |
parent | be2588fa7fb5a1677cc42e5a6236355c9cef0a56 (diff) | |
download | bcm5719-llvm-d1013b44e305e8da235583b763b2308dafdb813f.tar.gz bcm5719-llvm-d1013b44e305e8da235583b763b2308dafdb813f.zip |
[clang-tidy] Add support for NOLINTNEXTLINE.
Reviewers: alexfh
Subscribers: JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D29899
llvm-svn: 295049
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/nolintnextline.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/nolintnextline.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/nolintnextline.cpp b/clang-tools-extra/test/clang-tidy/nolintnextline.cpp new file mode 100644 index 00000000000..d18f335c2ec --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/nolintnextline.cpp @@ -0,0 +1,33 @@ +class A { A(int i); }; +// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: single-argument constructors must be marked explicit + +// NOLINTNEXTLINE +class B { B(int i); }; + +// NOLINTNEXTLINE(we-dont-care-about-categories-yet) +class C { C(int i); }; + + +// NOLINTNEXTLINE + +class D { D(int i); }; +// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: single-argument constructors must be marked explicit + +// NOLINTNEXTLINE +// +class E { E(int i); }; +// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: single-argument constructors must be marked explicit + +#define MACRO(X) class X { X(int i); }; +MACRO(F) +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: single-argument constructors must be marked explicit +// NOLINTNEXTLINE +MACRO(G) + +#define MACRO_NOARG class H { H(int i); }; +// NOLINTNEXTLINE +MACRO_NOARG + +// CHECK-MESSAGES: Suppressed 4 warnings (4 NOLINT) + +// RUN: %check_clang_tidy %s google-explicit-constructor %t -- |