[clang-tools-extra] r216727 - Try to fix test on msvc and 32 bit hosts.

Benjamin Kramer benny.kra at googlemail.com
Fri Aug 29 07:47:30 PDT 2014


Author: d0k
Date: Fri Aug 29 09:47:30 2014
New Revision: 216727

URL: http://llvm.org/viewvc/llvm-project?rev=216727&view=rev
Log:
Try to fix test on msvc and 32 bit hosts.

Modified:
    clang-tools-extra/trunk/clang-tidy/google/IntegerTypesCheck.cpp
    clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp

Modified: clang-tools-extra/trunk/clang-tidy/google/IntegerTypesCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/google/IntegerTypesCheck.cpp?rev=216727&r1=216726&r2=216727&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/google/IntegerTypesCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/google/IntegerTypesCheck.cpp Fri Aug 29 09:47:30 2014
@@ -34,7 +34,7 @@ void IntegerTypesCheck::check(const Matc
   auto TL = *Result.Nodes.getNodeAs<TypeLoc>("tl");
   SourceLocation Loc = TL.getLocStart();
 
-  if (Loc.isMacroID())
+  if (Loc.isInvalid() || Loc.isMacroID())
     return;
 
   // Look through qualification.

Modified: clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp?rev=216727&r1=216726&r2=216727&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp Fri Aug 29 09:47:30 2014
@@ -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;





More information about the cfe-commits mailing list