651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/SemaCXX/static-cast.cpp
|
d4c5f84bbed2ecb5ddd0f0e8316c553b2084772a |
|
15-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement appropriate semantics for C++ casting and conversion when 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
8e960435696b4ccf6a8ad0ed0530e3280b77af8b |
|
08-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Properly diagnose invalid casts to function references. Patch by Faisal Vali, tweaked by me. Fixes PR8230. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
0c42bb653dc40b1caae010618831e320af824b18 |
|
05-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
'const std::type_info*' instead of 'std::type_info const*' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
58f9e13e87e57236fee4b914eea9be6f92a1c345 |
|
05-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
make clang print types as "const int *" instead of "int const*", which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
7002f4c03c2d0544f4e8bea8d3a5636519081e35 |
|
09-Apr-2010 |
John McCall <rjmccall@apple.com> |
Turn access control on by default in -cc1. Remove -faccess-control from -cc1; add -fno-access-control. Make the driver pass -fno-access-control by default. Update a bunch of tests to be correct under access control. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
c6e378e7d4e14b451f50158968d012dace6646d2 |
|
25-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch static_cast from the old reference-initialization code (via CheckReferenceInit) over to the new initialization code (InitializationSequence), which is better-tested and doesn't require us to compute the entire conversion sequence twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
7c2342dd4c9947806842e5aca3d2bb2e542853c9 |
|
10-Mar-2010 |
John McCall <rjmccall@apple.com> |
When pretty-printing tag types, only print the tag if we're in C (and 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
4ce46c2db2b17ef52b34dbeeec01e448025c8edc |
|
08-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Perform overload resolution when static_cast'ing from a pointer-to-member-to-derived to a pointer-to-member-to-base. Fixes PR6072. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
6b2accb4793e16b2e93a8c2589f5df702231f17a |
|
10-Feb-2010 |
John McCall <rjmccall@apple.com> |
Improve access control diagnostics. Perform access control on member-pointer conversions. Fix an access-control bug where privileges were not considered at intermediate points along the inheritance path. Prepare for friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
e1cd3374a8762d56c49d9abbc0c973a99e236422 |
|
31-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix my dyslexia. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
c099d9bc4842afc0e724eddab661cbb386c82117 |
|
31-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Add a test case for a fixed PR just to ensure we don't regress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
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/SemaCXX/static-cast.cpp
|
ab15d0e5af616c11b6cbb478c81d0a8eaa9d450a |
|
15-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When performing a static downcast as part of a static_cast, make sure that we're dealing with canonical types like the documentation say (yay, CanQualType). Alas, this is another instance where using getQualifiers() on a non-canonical QualType got us in trouble. Good news: with this fix, Clang can now parse all of its own headers! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
a82e4ae149168be47458f298371035911685370c |
|
14-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
- Have TryStaticImplicitCast set the cast kind to NoOp when binding a reference. CheckReferenceInit already inserts implicit casts to the necessary types. This fixes an assertion in CodeGen for some casts and brings a fix for PR5453 close, if I understand that bug correctly. - Also, perform calculated implicit cast sequences if they're determined to work. This finally diagnoses static_cast to ambiguous or implicit bases and fixes two long-standing fixmes in the test case. For the C-style cast, this requires propagating the access check suppression pretty deep into other functions. - Pass the expressions for TryStaticCast and TryStaticImplicitCast by reference. This should lead to a better AST being emitted for such casts, and also fixes a memory leak, because CheckReferenceInit and PerformImplicitConversion wrap the node passed to them. These wrappers were previously lost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
19aeac6ea4897c542b21c9f53a0a51762d8ddf83 |
|
14-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When type-checking a static cast (or the static_cast part of a C-style cast) that is converting to a class type, enumerate its constructors as in any other direct initialization. This ensures that we get the proper conversion sequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
5ed66f709126b60e88631bf86d7e2d59e774686f |
|
22-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Try to instantiate templates before doing hierarchy checks in static_cast. Fixes PR5261. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
9cc11e70031365972424b43f439021d88096b146 |
|
25-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators. Add custom conversions to static_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
7c94c4bb7b875dc1a2b23f77f1ed8013cf94abdb |
|
03-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use "()" instead of "(void)" when pretty-printing a parameter-less function type for C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
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/SemaCXX/static-cast.cpp
|
7c80bd64032e610c0dbd74fc0ef6ea334447f2fd |
|
17-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
21593acb933324b439bc68b68e7cc7d1c3e3484d |
|
28-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement pointer to member handling in static_cast. Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same. Make a few style corrections as suggested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
e3dc28a32a61960bdef59f79d0da161c72a5c88a |
|
08-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Greatly improve static_cast diagnostics git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
4e84935b299f2572601419692f1f2e84def685e7 |
|
05-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
A small error message improvement and some comment cleanup for static_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|
0777972d38a3125efed962b045704c30ae6965cf |
|
31-Oct-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement semantic checking of static_cast and dynamic_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/static-cast.cpp
|