[clang-tools-extra] [clang-tidy] Fix false positive in `bugprone-std-namespace-modification` when opening subnamespaces of `std::` (PR #174170)

Victor Chernyakin via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 1 17:06:44 PST 2026


================
@@ -413,6 +413,12 @@ Changes in existing checks
   <clang-tidy/checks/bugprone/sizeof-expression>` check by fixing
   a crash on ``sizeof`` of an array of dependent type.
 
+- Improved :doc:`bugprone-std-namespace-modification
+  <clang-tidy/checks/bugprone/std-namespace-modification>`. It now:
+
+  - No longer diagnoses simply opening subnamespaces of ``std::``
+    such as ``std::chrono``.
----------------
localspook wrote:

I'm doing bullet points even though there's only one entry to anticipate the followup changes.

https://github.com/llvm/llvm-project/pull/174170


More information about the cfe-commits mailing list