зеркало из https://github.com/microsoft/clang-1.git
Switch PerformImplicitConversion over to use DefaultLvalueConversion for lvalue-to-rvalue conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148874 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
1acbe5e656
Коммит
d814eaf0df
|
@ -2324,12 +2324,14 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType,
|
|||
// Nothing to do.
|
||||
break;
|
||||
|
||||
case ICK_Lvalue_To_Rvalue:
|
||||
case ICK_Lvalue_To_Rvalue: {
|
||||
assert(From->getObjectKind() != OK_ObjCProperty);
|
||||
FromType = FromType.getUnqualifiedType();
|
||||
From = ImplicitCastExpr::Create(Context, FromType, CK_LValueToRValue,
|
||||
From, 0, VK_RValue);
|
||||
ExprResult FromRes = DefaultLvalueConversion(From);
|
||||
assert(!FromRes.isInvalid() && "Can't perform deduced conversion?!");
|
||||
From = FromRes.take();
|
||||
break;
|
||||
}
|
||||
|
||||
case ICK_Array_To_Pointer:
|
||||
FromType = Context.getArrayDecayedType(FromType);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-store=region -analyzer-constraints=range -verify %s
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-store=region -analyzer-constraints=range -verify -Wno-null-dereference %s
|
||||
// XFAIL
|
||||
|
||||
typedef typeof(sizeof(int)) size_t;
|
||||
|
|
Загрузка…
Ссылка в новой задаче