]> granicus.if.org Git - clang/commit
Whenever we're creating an expression that is typically an rvalue
authorDouglas Gregor <dgregor@apple.com>
Tue, 13 Jul 2010 18:40:04 +0000 (18:40 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 13 Jul 2010 18:40:04 +0000 (18:40 +0000)
commit6398235d7890a81b785ea5af3b6e66d86bf184cc
tree51c5154e7ce66f26b051400f26e14f305868fe25
parent6dc1ef87044e6b177d4df0d2b593a94616180b3d
Whenever we're creating an expression that is typically an rvalue
(e.g., a call, cast, etc.), immediately adjust the expression's type
to strip cv-qualifiers off of all non-class types (in C++) or all
types (in C). This effectively extends my previous fix for PR7463,
which was restricted to calls, to other kinds of expressions within
similar characteristics. I've audited every use of
getNonReferenceType() in the code base, switching to the newly-renamed
getNonLValueExprType() where necessary.

Big thanks to Eli for pointing out just how incomplete my original fix
for PR7463 actually was. We've been handling cv-qualifiers on rvalues
wrong for a very, very long time. Fixes PR7463.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108253 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/DeclObjC.h
include/clang/AST/Type.h
lib/AST/DeclTemplate.cpp
lib/AST/Type.cpp
lib/CodeGen/CGExprComplex.cpp
lib/Sema/SemaCXXCast.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaOverload.cpp
test/SemaCXX/cv-unqual-rvalues.cpp [new file with mode: 0644]