diff --git a/lib/Interpreter/ValueExtractionSynthesizer.cpp b/lib/Interpreter/ValueExtractionSynthesizer.cpp index 2bc649f9..73436586 100644 --- a/lib/Interpreter/ValueExtractionSynthesizer.cpp +++ b/lib/Interpreter/ValueExtractionSynthesizer.cpp @@ -318,6 +318,7 @@ namespace { else if (desugaredTy->isIntegralOrEnumerationType() || desugaredTy->isReferenceType() || desugaredTy->isPointerType() + || desugaredTy->isNullPtrType() || desugaredTy->isFloatingType()) { if (desugaredTy->isIntegralOrEnumerationType()) { // 1) enum, integral, float, double, referece, pointer types : @@ -349,6 +350,10 @@ namespace { = m_Sema->BuildCStyleCastExpr(noLoc, TSI, noLoc, E).get(); CallArgs.push_back(castedE); } + else if (desugaredTy->isNullPtrType()) { + // nullptr should decay to void* just fine. + CallArgs.push_back(E); + } else if (desugaredTy->isFloatingType()) { // floats and double will fall naturally in the correct // case, because of the overload resolution. diff --git a/test/Prompt/ValuePrinter/Regression.C b/test/Prompt/ValuePrinter/Regression.C index adcb6a06..d325400b 100644 --- a/test/Prompt/ValuePrinter/Regression.C +++ b/test/Prompt/ValuePrinter/Regression.C @@ -46,3 +46,5 @@ q // CHECK: (const int *) 0x123 // PR ROOT-5467 &A::someFunc // CHECK: (int (class A::*)(float)) @0x{{[0-9a-f]+}} + +nullptr // CHECK: (nullptr_t) @0x0