Try to fix test on msvc and 32 bit hosts.

llvm-svn: 216727
This commit is contained in:
Benjamin Kramer
2014-08-29 14:47:30 +00:00
parent 06e323a6ee
commit 041c138ba5
2 changed files with 5 additions and 5 deletions

View File

@@ -34,7 +34,7 @@ void IntegerTypesCheck::check(const MatchFinder::MatchResult &Result) {
auto TL = *Result.Nodes.getNodeAs<TypeLoc>("tl");
SourceLocation Loc = TL.getLocStart();
if (Loc.isMacroID())
if (Loc.isInvalid() || Loc.isMacroID())
return;
// Look through qualification.

View File

@@ -1,13 +1,13 @@
// RUN: clang-tidy -checks=-*,google-runtime-int %s -- -x c++ 2>&1 | FileCheck %s -implicit-check-not='{{warning:|error:}}'
long a();
// CHECK: [[@LINE-1]]:1: warning: consider replacing 'long' with 'int64'
// CHECK: [[@LINE-1]]:1: warning: consider replacing 'long' with 'int{{..}}'
typedef unsigned long long uint64; // NOLINT
long b(long = 1);
// CHECK: [[@LINE-1]]:1: warning: consider replacing 'long' with 'int64'
// CHECK: [[@LINE-2]]:8: warning: consider replacing 'long' with 'int64'
// CHECK: [[@LINE-1]]:1: warning: consider replacing 'long' with 'int{{..}}'
// CHECK: [[@LINE-2]]:8: warning: consider replacing 'long' with 'int{{..}}'
template <typename T>
void tmpl() {
@@ -33,7 +33,7 @@ short bar(const short, unsigned short) {
long volatile long wat = 42;
// CHECK: [[@LINE-1]]:3: warning: consider replacing 'long long' with 'int64'
unsigned long y;
// CHECK: [[@LINE-1]]:3: warning: consider replacing 'unsigned long' with 'uint64'
// CHECK: [[@LINE-1]]:3: warning: consider replacing 'unsigned long' with 'uint{{..}}'
unsigned long long **const *tmp;
// CHECK: [[@LINE-1]]:3: warning: consider replacing 'unsigned long long' with 'uint64'
unsigned long long **const *&z = tmp;