cor3ntin wrote: > Please note: the guidelines do not require one to replace [] with at(), > that's just one of the possible solutions. Actually at() is banned in many > codebases where exceptions are banned. > > It would be good to make this fix-it opt-in, configurable via option, so the > check only emits a warning by default.
+1 I find the fixit rather concerning, as it does not correspond to any widely accepted good practice. Using `at` does not fixes any issue, it just "shifts right" the detection of a problem. The advices this is trying to get at is: * assert in the operator[] (or use another precondition mechanism * Use ASan * use algorithms instead of loops and direct element manipulation wherever possible. https://github.com/llvm/llvm-project/pull/90043 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits