Skip to content

Commit

Permalink
Avoid limits.h in clang-tidy-plugin tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytheway committed Apr 12, 2020
1 parent d5cf17a commit fec1a7c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/clang-tidy-plugin/test/no-long.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
// RUN: %check_clang_tidy %s cata-no-long %t -- -plugins=%cata_plugin --

#include <limits.h>
#include <stdint.h>

// Want these defines without including limits.h. They're probably not the
// correct values, but it doesn't matter.
#define LONG_MIN -2147483647
#define LONG_MAX 2147483647
#define ULONG_MAX 4294967295

long i1;
// CHECK-MESSAGES: warning: Variable 'i1' declared as 'long'. Prefer int or int64_t to long. [cata-no-long]

Expand Down

0 comments on commit fec1a7c

Please sign in to comment.