[PATCH] D57267: [AST] Factor out the logic of the various Expr::Ignore*

Bill Wendling via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 8 12:26:00 PST 2019

void added a comment.

In D57267#1390484 <https://reviews.llvm.org/D57267#1390484>, @riccibruno wrote:

> @void @rnk Perhaps you can comment on this: currently `Expr::IgnoreImpCasts` skips `FullExpr`s, but `Expr::IgnoreParenImpCasts` only skips (via `IgnoreParens`) `ConstantExpr`s. Is there any reason for this inconsistency ? I would like to add `FullExpr` to the nodes skipped by `IgnoreParenImpCasts` for consistency but I am worried about unexpected issues even though all tests pass.

I don't think there was an explicit reason beyond "I didn't need to do it at the time". So probably just an oversight on my part. I don't know the code nearly as well as @rnk, so I could be wrong, but I think the existing tests should tell you if something went haywire if you skip `FullExpr`s.

  rC Clang



More information about the cfe-commits mailing list