History log of /external/clang/test/SemaCXX/reinterpret-cast.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b6d6993e6e6d3daf4d9876794254d20a134e37c2 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r239765

Change-Id: I0393bcc952590a7226af8c4b58534a8ee5fd2d99
/external/clang/test/SemaCXX/reinterpret-cast.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/SemaCXX/reinterpret-cast.cpp
a6115068cde719142eb394db88612c185cabd05b 24-May-2012 Eli Friedman <eli.friedman@gmail.com> Add a warning to diagnose statements in C++ like "*(volatile int*)x;". Conceptually, this is part of -Wunused-value, but I added a separate flag -Wunused-volatile-lvalue so it doesn't get turned off by accident with -Wno-unused-value. I also made a few minor improvements to existing unused value warnings in the process. <rdar://problem/11516811>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-cast.cpp
41f4431f3989ff23029eaf2ad947f07e39fb268c 03-Feb-2012 Chad Rosier <mcrosier@apple.com> C++ 5.2.10p2 has a note that mentions that, subject to all other restrictions,
a cast to the same type is allowed so long as it does not cast away constness.

Fix for PR11747. Patch by Aaron Ballman. Reviewed by Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-cast.cpp
1f8f2d52ff3712770a49f318a687b0c8b0ada9d0 24-May-2011 Chandler Carruth <chandlerc@gmail.com> Fix a bug in -Wundefined-reinterpret-cast where we failed to look
through sugared types when testing for TagTypes. This was the actual
cause of the only false positive in Clang+LLVM.

Next evaluation will be over a much larger selection of code including
large amounts of open source code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-cast.cpp
f4bbbf0aaf741cc7d014e2cf059670a6756f8cbd 02-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a warning for when reinterpret_cast leads to undefined behavior, patch by Richard Trieu!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-cast.cpp
bb29d1ba8b0895e3923c724f49845636f35b4bde 23-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't allow reinterpret_cast to reference of vector element and property expression. Thanks goes to Eli Friedman!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-cast.cpp
b464a5b18916b467ed884d07f9e34295d39cec0a 23-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> reinterpret_cast to reference of a bit-field is not allowed.

Fixes rdar://9202628 & http://llvm.org/PR9564.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-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/reinterpret-cast.cpp
c79f767941fdfedb02d20296a042ad951a593890 08-Sep-2010 Daniel Dunbar <daniel@zuster.org> tests: Use -ffreestanding when including stdint.h, to avoid platform dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-cast.cpp
66cf2d1290c598fcbaf1c6b50411f2513daf3b3e 05-Sep-2010 Chris Lattner <sabre@nondot.org> print "const intptr_t" instead of "intptr_t const"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-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/reinterpret-cast.cpp
52647c63c3cbdf0c87fe8db3ef6f475bfd49725d 05-Jun-2010 Anders Carlsson <andersca@mac.com> When deciding whether reinterpret_cast casts away constness we need to look at array qualifiers. Fixes rdar://problem/8018292.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-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/reinterpret-cast.cpp
a873dfc9e7314681bb37efd9ab185045de121e43 03-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement the lvalue-to-rvalue conversion where needed. The
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-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/reinterpret-cast.cpp
f1cd5e5c85f2ad433874310d826c1860a262909c 22-Nov-2009 Sean Hunt <rideau3@gmail.com> Use intptr_t rather than long so that this test will not fail on LLP64 systems,
where long is only 32-bits and so a reinterpret_cast would be ill-formed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-cast.cpp
76d69bb7f984c390f90504a06dfc7485387ffdd7 18-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> CastsAwayConstness shouldn't care if member pointers point into different classes. Fixes PR5545.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-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/reinterpret-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/reinterpret-cast.cpp
db64728e69a45b89870ede13944a934d3c2ed12a 28-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add handling of member pointers to reinterpret_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-cast.cpp
2f639b9f3c6b081f076d2ac6d75115ce44bfa249 24-Oct-2008 Douglas Gregor <dgregor@apple.com> Semantic analysis for C++ reinterpret_cast and const_cast. Patch by Sebastian Redl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/reinterpret-cast.cpp