[PATCH] D33722: [clang-tidy] Add checker for undelegated copy of base classes

Dominik Szabó via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 16 05:19:55 PDT 2017


szdominik added inline comments.


================
Comment at: clang-tidy/misc/UndelegatedCopyOfBaseClassesCheck.cpp:92
+  // Loop until the beginning of the initialization list.
+  while (!Tok.is(tok::r_paren))
+    Lex.LexFromRawLexer(Tok);
----------------
aaron.ballman wrote:
> This doesn't balance tokens. What about:
> ```
> struct S {
>  /* ... */
> };
> 
> struct T : S {
>   T(const T &O) : S((1 + 2), O) {}
> };
> ```
The loop search only the first right paren in the line, which is the end of parameter list ( "...&0**)**" ), so, as I see, it doesn't interesting what happens after the colon.


https://reviews.llvm.org/D33722





More information about the cfe-commits mailing list