[PATCH] D26466: [clang-tidy] Fix NOLINT test
Nikita Kakuev via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 9 10:58:11 PST 2016
nkakuev created this revision.
nkakuev added a reviewer: alexfh.
nkakuev added a subscriber: cfe-commits.
Test cases I've added in review https://reviews.llvm.org/D26218 were too brittle and weren't working properly.
This patch fixes this.
https://reviews.llvm.org/D26466
Files:
test/clang-tidy/nolint.cpp
Index: test/clang-tidy/nolint.cpp
===================================================================
--- test/clang-tidy/nolint.cpp
+++ test/clang-tidy/nolint.cpp
@@ -1,5 +1,12 @@
// RUN: %check_clang_tidy %s google-explicit-constructor,clang-diagnostic-unused-variable,clang-analyzer-core.UndefinedBinaryOperatorResult %t -- -extra-arg=-Wunused-variable -- -I%S/Inputs/nolint
+#include "trigger_warning.h"
+void I(int& Out) {
+ int In;
+ A1(In, Out);
+}
+// CHECK-MESSAGES-NOT: trigger_warning.h:{{.*}} warning
+// CHECK-MESSAGES-NOT: :[[@LINE-4]]:{{.*}} note
class A { A(int i); };
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: single-argument constructors must be marked explicit
@@ -28,12 +35,4 @@
#define DOUBLE_MACRO MACRO(H) // NOLINT
DOUBLE_MACRO
-#include "trigger_warning.h"
-void I(int& Out) {
- int In;
- A1(In, Out);
-}
-// CHECK-NOT: trigger_warning.h:{{.*}} warning: The left operand of '>' is a garbage value
-// CHECK-NOT: :[[@LINE-4]]:{{.*}} note
-
// CHECK-MESSAGES: Suppressed 8 warnings (8 NOLINT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26466.77378.patch
Type: text/x-patch
Size: 1035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161109/c3d5e8d9/attachment-0001.bin>
More information about the cfe-commits
mailing list