[PATCH] D13071: [PATCH] New checker for mismatched operator new/operator delete definitions

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 09:23:32 PDT 2015


aaron.ballman added inline comments.

================
Comment at: clang-tidy/misc/NewDeleteOverloadsCheck.cpp:168
@@ +167,3 @@
+  SmallVector<const FunctionDecl *, 4> Diagnose;
+  for (const auto *O : Overloads) {
+    const auto &OI = std::find_if(
----------------
alexfh wrote:
> aaron.ballman wrote:
> > alexfh wrote:
> > > Please don't use "O", "l", "I" as variable names.
> > I thought this was the correct style for identifiers that do not require descriptive names (we use it *everywhere* in Clang)? I'm not opposed, but I am wondering if clang-tidy has different style guides?
> I'm not opposed to single-character identifiers, as long as they don't use characters that are indistinguishable from some other characters in some fonts. E.g. I don't want ever to be confused about `map[O]` vs `map[0]` (same for "l", "I", and sometimes even "1").
Ah, this makes perfect sense. Can do. :-)


http://reviews.llvm.org/D13071





More information about the cfe-commits mailing list