| .. title:: clang-tidy - readability-redundant-preprocessor |
| readability-redundant-preprocessor |
| ================================== |
| Finds potentially redundant preprocessor directives. At the moment the |
| following cases are detected: |
| * `#ifdef` .. `#endif` pairs which are nested inside an outer pair with the |
| same condition. For example: |
| #ifdef FOO // inner ifdef is considered redundant |
| * Same for `#ifndef` .. `#endif` pairs. For example: |
| #ifndef FOO // inner ifndef is considered redundant |
| * `#ifndef` inside an `#ifdef` with the same condition: |
| #ifndef FOO // inner ifndef is considered redundant |
| * `#ifdef` inside an `#ifndef` with the same condition: |
| #ifdef FOO // inner ifdef is considered redundant |
| * `#if` .. `#endif` pairs which are nested inside an outer pair with the same |
| #if FOO == 4 // inner if is considered redundant |