PiotrZSL added a comment.

Except pointed out issues, looks fine.



================
Comment at: 
clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp:49-50
+  for (const auto &Identifier : AllowedIdentifiers) {
+    if (!llvm::Regex(Identifier).isValid())
+      configurationDiag("Invalid allowed identifier regex '%0'") << Identifier;
+    AllowedIdentifiersRegex.emplace_back(Identifier.str());
----------------
avoid double compilation of regexp.
Simply:
```
AllowedIdentifiersRegex.emplace_back(Identifier.str());
if (!AllowedIdentifiersRegex.back().isValid()) {
       AllowedIdentifiersRegex.pop_back();
    configurationDiag("Invalid allowed identifier regex '%0'") << Identifier;
}
```


================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:414-416
+- Improved option `AllowedIdentifiers` from :doc:`bugprone-reserved-identifier
+  <clang-tidy/checks/bugprone/reserved-identifier>` to support regular
+  expressions.
----------------
Sort this entry by full check name.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152764

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D152764:... Félix-Antoine Constantin via Phabricator via cfe-commits
    • [PATCH] D15... Logan Smith via Phabricator via cfe-commits
    • [PATCH] D15... Piotr Zegar via Phabricator via cfe-commits
    • [PATCH] D15... Félix-Antoine Constantin via Phabricator via cfe-commits
    • [PATCH] D15... Piotr Zegar via Phabricator via cfe-commits
    • [PATCH] D15... Félix-Antoine Constantin via Phabricator via cfe-commits
    • [PATCH] D15... Piotr Zegar via Phabricator via cfe-commits
    • [PATCH] D15... Piotr Zegar via Phabricator via cfe-commits

Reply via email to