]> granicus.if.org Git - clang/commitdiff
CIndex: Fix clang_equalLocations for change to ptr_data field.
authorDaniel Dunbar <daniel@zuster.org>
Sat, 30 Jan 2010 23:58:27 +0000 (23:58 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 30 Jan 2010 23:58:27 +0000 (23:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94930 91177308-0d34-0410-b5e6-96231b3b80d8

tools/CIndex/CIndex.cpp

index 718aff02ed04fd2797a60ef2121a1faae276867e..5e97494dd9b955814156678fefced1c967130672 100644 (file)
@@ -1136,7 +1136,9 @@ CXSourceLocation clang_getNullLocation() {
 }
 
 unsigned clang_equalLocations(CXSourceLocation loc1, CXSourceLocation loc2) {
-  return loc1.ptr_data == loc2.ptr_data && loc1.int_data == loc2.int_data;
+  return (loc1.ptr_data[0] == loc2.ptr_data[0] &&
+          loc1.ptr_data[1] == loc2.ptr_data[1] &&
+          loc1.int_data == loc2.int_data);
 }
 
 CXSourceLocation clang_getLocation(CXTranslationUnit tu,