[PATCH] D141892: [clang-tidy] Implement modernize-use-constraints
Chris Cotter via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 30 10:28:06 PDT 2023
ccotter marked an inline comment as done.
ccotter added a comment.
> 3. What about boost enable_if ? Support it, or restrict check to std only.
> 4. What about enable_if used as an function argument ? Support it, or add some info to documentation that such construction is not supported.
I added some notes to the documentation on supported constructions and unsupported ones. The unsupported ones can be added; I intentionally did not support them in this initial version of the tool to keep the review simpler, although I'd like to add them soon after it lands.
If there are no other comments, @PiotrZSL would you mind landing this for me? Thanks!
================
Comment at: clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp:352
+ FixIts.push_back(FixItHint::CreateInsertion(
+ *ConstraintInsertionLoc, "requires " + *ConditionText + " "));
+ return FixIts;
----------------
PiotrZSL wrote:
> You not checking anywhere if this optional is initialized.
Indeed - `bugprone-unchecked-optional-access` finds this!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141892/new/
https://reviews.llvm.org/D141892
More information about the cfe-commits
mailing list