Index: clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp =================================================================== --- clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp +++ clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp @@ -252,7 +252,7 @@ } replaceWithNullptr(Check, SM, StartLoc, EndLoc); - return skipSubTree(); + return true; } private: Index: clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr-basic.cpp =================================================================== --- clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr-basic.cpp +++ clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr-basic.cpp @@ -327,6 +327,21 @@ // CHECK-FIXES: const int *const_p6 = static_cast(t ? t : static_cast(nullptr)); } +void test_nested_implicit_cast_expr() { + int func0(void*, void*); + int func1(int, void*, void*); + + (double)func1(0, 0, 0); + // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: use nullptr + // CHECK-MESSAGES: :[[@LINE-2]]:23: warning: use nullptr + // CHECK-FIXES: (double)func1(0, nullptr, nullptr); + (double)func1(func0(0, 0), 0, 0); + // CHECK-MESSAGES: :[[@LINE-1]]:23: warning: use nullptr + // CHECK-MESSAGES: :[[@LINE-2]]:26: warning: use nullptr + // CHECK-MESSAGES: :[[@LINE-3]]:30: warning: use nullptr + // CHECK-MESSAGES: :[[@LINE-4]]:33: warning: use nullptr + // CHECK-FIXES: (double)func1(func0(nullptr, nullptr), nullptr, nullptr); +} // FIXME: currently, the check doesn't work as it should with templates. template