summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/reinterpret-cast.cpp
Commit message (Collapse)AuthorAgeFilesLines
* tests: Use -ffreestanding when including stdint.h, to avoid platform ↵Daniel Dunbar2010-09-071-1/+1
| | | | | | dependencies. llvm-svn: 113301
* print "const intptr_t" instead of "intptr_t const"Chris Lattner2010-09-051-1/+1
| | | | llvm-svn: 113091
* make clang print types as "const int *" instead of "int const*",Chris Lattner2010-09-051-4/+4
| | | | | | | which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. llvm-svn: 113090
* When deciding whether reinterpret_cast casts away constness we need to look ↵Anders Carlsson2010-06-041-0/+12
| | | | | | at array qualifiers. Fixes rdar://problem/8018292. llvm-svn: 105494
* When pretty-printing tag types, only print the tag if we're in C (andJohn McCall2010-03-101-6/+6
| | | | | | | | | | therefore not creating ElaboratedTypes, which are still pretty-printed with the written tag). Most of these testcase changes were done by script, so don't feel too sorry for my fingers. llvm-svn: 98149
* Implement the lvalue-to-rvalue conversion where needed. TheDouglas Gregor2010-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lvalue-to-rvalue conversion adjusts lvalues of qualified, non-class type to rvalue expressions of the unqualified variant of that type. For example, given: const int i; (void)(i + 17); the lvalue-to-rvalue conversion for the subexpression "i" will turn it from an lvalue expression (a DeclRefExpr) with type 'const int' into an rvalue expression with type 'int'. Both C and C++ mandate this conversion, and somehow we've slid through without implementing it. We now have both DefaultFunctionArrayConversion and DefaultFunctionArrayLvalueConversion, and which gets used depends on whether we do the lvalue-to-rvalue conversion or not. Generally, we do the lvalue-to-rvalue conversion, but there are a few notable exceptions: - the left-hand side of a '.' operator - the left-hand side of an assignment - a C++ throw expression - a subscript expression that's subscripting a vector Making this change exposed two issues with blocks: - we were deducing const-qualified return types of non-class type from a block return, which doesn't fit well - we weren't always setting the known return type of a block when it was provided with the ^return-type syntax Fixes the current Clang-on-Clang compile failure and PR6076. llvm-svn: 95167
* 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
* Use intptr_t rather than long so that this test will not fail on LLP64 systems,Alexis Hunt2009-11-221-4/+6
| | | | | | where long is only 32-bits and so a reinterpret_cast would be ill-formed. llvm-svn: 89583
* CastsAwayConstness shouldn't care if member pointers point into different ↵Sebastian Redl2009-11-181-0/+6
| | | | | | classes. Fixes PR5545. llvm-svn: 89215
* Use "()" instead of "(void)" when pretty-printing a parameter-less function ↵Argyrios Kyrtzidis2009-06-031-3/+3
| | | | | | type for C++. llvm-svn: 72747
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Add handling of member pointers to reinterpret_cast.Sebastian Redl2009-01-271-0/+18
| | | | llvm-svn: 63150
* Semantic analysis for C++ reinterpret_cast and const_cast. Patch by ↵Douglas Gregor2008-10-241-0/+72
Sebastian Redl. llvm-svn: 58094
OpenPOWER on IntegriCloud