13b21be065e9feb0759303bd51b8e8653130f0fb |
|
27-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Factor out (some of) the checking for invalid forms of pointer arithmetic into a couple of common routines. Use these to make the messages more consistent in the various contexts, especially in terms of consistently diagnosing binary operators with invalid types on both the left- and right-hand side. Also, improve the grammar and wording of the messages some, handling both two pointers and two (different) types. The wording of function pointer arithmetic diagnostics still strikes me as poorly phrased, and I worry this makes them slightly more awkward if more consistent. I'm hoping to fix that with a follow-on patch and test case that will also make them more helpful when a typedef or template type parameter makes the type completely opaque. Suggestions on better wording are very welcome, thanks to Richard Smith for some initial help on that front. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/pointer-subtract-compat.c
|
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 |
|
15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/pointer-subtract-compat.c
|
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 |
|
24-Mar-2009 |
Daniel Dunbar <daniel@zuster.org> |
Rename clang to clang-cc. Tests and drivers updated, still need to shuffle dirs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/pointer-subtract-compat.c
|
0804888d9162cfd422925762c161bd80f80358b9 |
|
23-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Allow subtraction of function pointer types in C, as a GNU extension. Fixes rdar://problem/6520707 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/pointer-subtract-compat.c
|
f1c7b48638a3ec78129fee9672ed8e2616e63c9c |
|
02-Sep-2008 |
Eli Friedman <eli.friedman@gmail.com> |
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
/external/clang/test/Sema/pointer-subtract-compat.c
|