summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/pointer-addition.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove offset size check in nullptr arithmetic handlingAndrew Kaylor2017-09-201-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D37042 llvm-svn: 313784
* Fix 32-bit buildbots by removing tests that are dependent on pointer-size ↵Andrew Kaylor2017-09-191-2/+0
| | | | | | | | comparisons. The recently behavior in the code that these tests were meant to be checking will be ammended as soon as a suitable change can be properly reviewed. llvm-svn: 313684
* Teach clang to tolerate the 'p = nullptr + n' idiom used by glibcAndrew Kaylor2017-09-191-1/+10
| | | | | | Differential Revision: https://reviews.llvm.org/D37042 llvm-svn: 313666
* PR10405 - Desugar FunctionType and TemplateSpecializationType if any type ↵Nikola Smiljanic2015-07-161-5/+5
| | | | | | that appears inside needs to be desugared. llvm-svn: 242371
* Sema: Semantically check _Atomic-qualified pointersDavid Majnemer2015-02-121-2/+4
| | | | | | This fixes PR22568. llvm-svn: 228959
* Cleanup a fixme by using a specific diagnostic for subscriptingChandler Carruth2011-06-271-1/+1
| | | | | | a pointer to void. llvm-svn: 133912
* Factor out (some of) the checking for invalid forms of pointerChandler Carruth2011-06-271-13/+13
| | | | | | | | | | | | | | | | | | | 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. llvm-svn: 133906
* Fix a problem with the diagnostics of invalid arithmetic with functionChandler Carruth2011-06-201-1/+2
| | | | | | | | pointers I found while working on the NULL arithmetic warning. We here always assuming the LHS was the pointer, instead of using the selected pointer expression. llvm-svn: 133428
* Congruent diagnostic for void* arithmetic.Abramo Bagnara2010-09-131-0/+1
| | | | llvm-svn: 113740
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - 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). llvm-svn: 91446
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Make one expected-diag directive match exactly one actual diagnostic.Sebastian Redl2009-02-071-1/+1
| | | | | | This uncovers some bugs, so several test cases now fail. llvm-svn: 64025
* Support arithmetic on pointer-to-function types as a GNUDouglas Gregor2009-01-231-2/+7
| | | | | | extension. Addresses clang PR/3371. llvm-svn: 62823
* Centralize error reporting of improper uses of incomplete types in theDouglas Gregor2009-01-191-3/+3
| | | | | | | | | | new DiagnoseIncompleteType. It provides additional information about struct/class/union/enum types when possible, either by pointing to the forward declaration of that type or by pointing to the definition (if we're in the process of defining that type). Fixes <rdar://problem/6500531>. llvm-svn: 62521
* Add proper type-checking for pointer additiion; before, we were acceptingEli Friedman2008-05-181-0/+14
addition with a pointer and an integer even when it didn't make sense. llvm-svn: 51228
OpenPOWER on IntegriCloud