diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-08-29 14:47:30 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-08-29 14:47:30 +0000 |
| commit | 041c138ba50c5d98c2acdaa105bc222b894bf354 (patch) | |
| tree | ffa0a96ddcfbfa53a420c2b1cf349cd2beec50db | |
| parent | 06e323a6eeff2652342d96078139f24e39b656e0 (diff) | |
| download | bcm5719-llvm-041c138ba50c5d98c2acdaa105bc222b894bf354.tar.gz bcm5719-llvm-041c138ba50c5d98c2acdaa105bc222b894bf354.zip | |
Try to fix test on msvc and 32 bit hosts.
llvm-svn: 216727
| -rw-r--r-- | clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp | 2 | ||||
| -rw-r--r-- | clang-tools-extra/test/clang-tidy/google-runtime-int.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp b/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp index b3b6b65d2e9..a442dc0df1a 100644 --- a/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp +++ b/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp @@ -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. diff --git a/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp b/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp index 9fcde079d1e..bf1e7aa7237 100644 --- a/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp +++ b/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp @@ -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; |

