# Extra Clang Tools 21.1.8 documentation

## clang-tidy - readability-use-concise-preprocessor-directives

# readability-use-concise-preprocessor-directives

Finds uses of `#if` that can be simplified to `#ifdef` or `#ifndef` and, since C23 and C++23, uses of `#elif` that can be simplified to `#elifdef` or `#elifndef`:

    #if defined(MEOW)
    #if !defined(MEOW)

    // becomes

    #ifdef MEOW
    #ifndef MEOW

Since C23 and C++23:

    #elif defined(MEOW)
    #elif !defined(MEOW)

    // becomes

    #elifdef MEOW
    #elifndef MEOW