Fix nullptr value printing (ROOT-7092).
This commit is contained in:
parent
0e1c818da1
commit
69234ce153
@ -318,6 +318,7 @@ namespace {
|
|||||||
else if (desugaredTy->isIntegralOrEnumerationType()
|
else if (desugaredTy->isIntegralOrEnumerationType()
|
||||||
|| desugaredTy->isReferenceType()
|
|| desugaredTy->isReferenceType()
|
||||||
|| desugaredTy->isPointerType()
|
|| desugaredTy->isPointerType()
|
||||||
|
|| desugaredTy->isNullPtrType()
|
||||||
|| desugaredTy->isFloatingType()) {
|
|| desugaredTy->isFloatingType()) {
|
||||||
if (desugaredTy->isIntegralOrEnumerationType()) {
|
if (desugaredTy->isIntegralOrEnumerationType()) {
|
||||||
// 1) enum, integral, float, double, referece, pointer types :
|
// 1) enum, integral, float, double, referece, pointer types :
|
||||||
@ -349,6 +350,10 @@ namespace {
|
|||||||
= m_Sema->BuildCStyleCastExpr(noLoc, TSI, noLoc, E).get();
|
= m_Sema->BuildCStyleCastExpr(noLoc, TSI, noLoc, E).get();
|
||||||
CallArgs.push_back(castedE);
|
CallArgs.push_back(castedE);
|
||||||
}
|
}
|
||||||
|
else if (desugaredTy->isNullPtrType()) {
|
||||||
|
// nullptr should decay to void* just fine.
|
||||||
|
CallArgs.push_back(E);
|
||||||
|
}
|
||||||
else if (desugaredTy->isFloatingType()) {
|
else if (desugaredTy->isFloatingType()) {
|
||||||
// floats and double will fall naturally in the correct
|
// floats and double will fall naturally in the correct
|
||||||
// case, because of the overload resolution.
|
// case, because of the overload resolution.
|
||||||
|
@ -46,3 +46,5 @@ q // CHECK: (const int *) 0x123
|
|||||||
|
|
||||||
// PR ROOT-5467
|
// PR ROOT-5467
|
||||||
&A::someFunc // CHECK: (int (class A::*)(float)) @0x{{[0-9a-f]+}}
|
&A::someFunc // CHECK: (int (class A::*)(float)) @0x{{[0-9a-f]+}}
|
||||||
|
|
||||||
|
nullptr // CHECK: (nullptr_t) @0x0
|
||||||
|
Loading…
Reference in New Issue
Block a user