[PATCH] D152764: [clang-tidy] Reserved-identifier: Improved AllowedIdentifiers option to support regular expressions

Piotr Zegar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 15 14:54:17 PDT 2023


PiotrZSL accepted this revision.
PiotrZSL added a comment.
This revision is now accepted and ready to land.

Overall looks good..



================
Comment at: clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp:50
+    if (!AllowedIdentifiers.back().isValid())
+      configurationDiag("Invalid allowed identifier regex '%0'") << Identifier;
+  }
----------------
you may remove that last one that is not valid from an AllowedIdentifiers, simply use pop_back()


================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:246
 
+- Improved option `AllowedIdentifiers` from :doc:`bugprone-reserved-identifier
+  <clang-tidy/checks/bugprone/reserved-identifier>` to support regular
----------------
Consider following current approach: "Improved the bugprone-reserved-identifier check by enhancing the AllowedIdentifiers option to support regular expressions."


================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:247
+- Improved option `AllowedIdentifiers` from :doc:`bugprone-reserved-identifier
+  <clang-tidy/checks/bugprone/reserved-identifier>` to support regular
+  expressions.
----------------
consider inserting here "check"


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152764/new/

https://reviews.llvm.org/D152764



More information about the cfe-commits mailing list