1// RUN: clang-tidy %s -checks=-*,modernize-use-nullptr -- -std=c17 | count 0
2
3// Note: this test expects no diagnostics, but FileCheck cannot handle that,
4// hence the use of | count 0.
5
6#define NULL 0
7void f(void) {
8 char *str = NULL; // ok
9 (void)str;
10}
11

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

source code of clang-tools-extra/test/clang-tidy/checkers/modernize/use-nullptr.c