[PATCH] D32914: Introduce Wzero-as-null-pointer-constant.
Malcolm Parsons via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 8 05:41:03 PDT 2017
malcolm.parsons added a comment.
Have you looked at the tests for clang-tidy's modernize-use-nullptr check?
I wouldn't expect to see a warning for template types:
template<typename T>
class TemplateClass {
public:
explicit TemplateClass(int a, T default_value = 0) {}
};
void IgnoreSubstTemplateType() {
TemplateClass<int*> a(1);
}
test/clang-tidy/modernize-use-nullptr.cpp:252:51: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
explicit TemplateClass(int a, T default_value = 0) {}
^
nullptr
https://reviews.llvm.org/D32914
More information about the cfe-commits
mailing list