aaron.ballman added a subscriber: klimek.
aaron.ballman added inline comments.


================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:3527
+  return N < Node.getNumInits() &&
+          InnerMatcher.matches(*Node.getInit(N)->IgnoreParenImpCasts(), Finder,
+                               Builder);
----------------
hwright wrote:
> aaron.ballman wrote:
> > I'm not certain we want the `IgnoreParenImpCasts()` here -- what if someone 
> > wants to match an initializer that uses one of those properties?
> The `hasArg` implementation directly above has the same call to 
> `IgnoreParenImpCasts()`.  Is it also in error?  (It would seem that they 
> should both be consistent.)
Yeah, I noticed that as well. Doing some code archaeology, it seems that 
`hasArg()` has had that form since its inception and it was never explicitly 
discussed what should happen there.

@klimek -- do you have opinions here, since you wrote the original code for 
`hasArg()`? Should we be leaving the paren and implicit cast stripping up to 
the caller rather than doing it automatically?


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

https://reviews.llvm.org/D56090



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to