Make sure to take the unqualified versions of the canonical types for 
type-checking pointer subtraction; if the canonical types aren't used,
the qualifiers won't always get stripped off correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55620 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/pointer-subtract-compat.c b/test/Sema/pointer-subtract-compat.c
new file mode 100644
index 0000000..4ed6abf
--- /dev/null
+++ b/test/Sema/pointer-subtract-compat.c
@@ -0,0 +1,6 @@
+// RUN: clang %s -fsyntax-only -verify -pedantic
+
+typedef const char rchar;
+int a(char* a, rchar* b) {
+  return a-b;
+}