[PATCH] D57114: Remove Expr sugar decorating the CXXUuidofExpr node.

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 23 15:21:19 PST 2019


riccibruno added inline comments.


================
Comment at: lib/Sema/SemaTemplate.cpp:6311
         if (isa<CXXUuidofExpr>(E)) {
-          Converted = TemplateArgument(ArgResult.get());
+          Converted = TemplateArgument(ArgResult.get()->IgnoreImpCasts());
           break;
----------------
A remark which I hope is relevant. Please ignore it if I am off the mark, or if it is obvious.

I was looking at which of the `Expr::Ignore*` function to use for something else and it seems that `IgnoreParenImpCasts()` is *not* equivalent to doing `IgnoreParens()` + `IgnoreImpCasts()` until reaching a fixed point.

This is very surprising given the name, and given that `IgnoreParenCasts()` *is* equivalent to doing `IgnoreParens()` + `IgnoreCasts()` until reaching a fixed point.

>From my notes:

> * `Expr *IgnoreParenImpCasts() LLVM_READONLY`
>  Ought to be IgnoreParens() + IgnoreImpCasts() until fixed point.
>  But actually only IgnoreParens + skip:
>  * ImplicitCastExpr
>  * MaterializeTemporaryExpr
>  * SubstNonTypeTemplateParmExpr



Repository:
  rC Clang

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

https://reviews.llvm.org/D57114





More information about the cfe-commits mailing list