summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-cast.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Diagnostics] Improve some error messages related to bad use of dynamic_castDávid Bolvanský2019-11-041-1/+1
|
* Lit C++11 Compatibility Patch #7Charles Li2016-04-131-2/+9
| | | | | | | 13 tests have been updated for C++11 compatibility. Differential Revision: http://reviews.llvm.org/D19068 llvm-svn: 266239
* Implement appropriate semantics for C++ casting and conversion whenDouglas Gregor2011-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | dealing with address-space- and GC-qualified pointers. Previously, these qualifiers were being treated just like cvr-qualifiers (in some cases) or were completely ignored, leading to uneven behavior. For example, const_cast would allow conversion between pointers to different address spaces. The new semantics are fairly simple: reinterpret_cast can be used to explicitly cast between pointers to different address spaces (including adding/removing addresss spaces), while static_cast/dynamic_cast/const_cast do not tolerate any changes in the address space. C-style casts can add/remove/change address spaces through the reinterpret_cast mechanism. Other non-CVR qualifiers (e.g., Objective-C GC qualifiers) work similarly. As part of this change, I tweaked the "casts away constness" diagnostic to use the term "casts away qualifiers". The term "constness" actually comes from the C++ standard, despite the fact that removing "volatile" also falls under that category. In Clang, we also have restrict, address spaces, ObjC GC attributes, etc., so the more general "qualifiers" is clearer. llvm-svn: 129583
* Provide overload diagnostics when explicit casts involving class types fail.John McCall2011-02-141-4/+4
| | | | | | PR8626. llvm-svn: 125506
* When pretty-printing tag types, only print the tag if we're in C (andJohn McCall2010-03-101-3/+3
| | | | | | | | | | 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
* 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
* We may need to instantiate a class template specialization as part of a ↵Douglas Gregor2009-10-291-2/+10
| | | | | | derived-to-base pointer case llvm-svn: 85532
* ir-gen related patch for type conversionFariborz Jahanian2009-08-281-2/+2
| | | | | | with class type conversion methods. WIP. llvm-svn: 80365
* Make functional-style casts emit correct messages, and fix a crash-on-invalid.Sebastian Redl2009-07-291-1/+1
| | | | llvm-svn: 77451
* Implement C++ semantics for C-style and functional-style casts. This ↵Sebastian Redl2009-07-251-4/+4
| | | | | | | | regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators. Add custom conversions to static_cast. llvm-svn: 77076
* Template instantiation for cast expressions.Douglas Gregor2009-05-191-0/+109
llvm-svn: 72119
OpenPOWER on IntegriCloud