File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -145,8 +145,9 @@ New checks
145145- New :doc: `modernize-use-concise-preprocessor-directives
146146 <clang-tidy/checks/modernize/use-concise-preprocessor-directives>` check.
147147
148- Rewrites preprocessor conditions like ``#if defined(MEOW) `` as ``#ifdef MEOW ``
149- and ``#elif !defined(MEOW) `` as ``#elifndef MEOW ``.
148+ Finds uses of ``#if `` that be simplified to ``#ifdef `` or ``#ifndef `` and,
149+ since C23 and C++23, uses of ``#elif `` that can be simplified to ``#elifdef ``
150+ or ``#elifndef ``.
150151
151152- New :doc: `modernize-use-scoped-lock
152153 <clang-tidy/checks/modernize/use-scoped-lock>` check.
Original file line number Diff line number Diff line change 33modernize-use-concise-preprocessor-directives
44=============================================
55
6- Shortens `#if ` preprocessor conditions:
6+ Finds uses of ``#if `` that be simplified to ``#ifdef `` or ``#ifndef `` and,
7+ since C23 and C++23, uses of ``#elif `` that can be simplified to ``#elifdef ``
8+ or ``#elifndef ``:
79
810.. code-block :: c++
911
@@ -15,7 +17,7 @@ Shortens `#if` preprocessor conditions:
1517 #ifdef MEOW
1618 #ifndef MEOW
1719
18- And, since C23 and C++23, shortens ` #elif ` conditions too :
20+ Since C23 and C++23:
1921
2022.. code-block :: c++
2123
You can’t perform that action at this time.
0 commit comments