[PATCH] D49838: [AST] Sink 'part of explicit cast' down into ImplicitCastExpr

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 26 01:37:10 PDT 2018


lebedev.ri created this revision.
lebedev.ri added reviewers: rsmith, rjmccall, erichkeane, aaron.ballman.
lebedev.ri added a project: clang.
lebedev.ri added a dependency: D49508: [Sema] Mark implicitly-inserted ICE's as being part of explicit cast (PR38166).

As discussed in IRC with @rsmith, it is slightly not good to keep that in the `CastExpr` itself:
Given the explicit cast, which is represented in AST as an `ExplicitCastExpr` + `ImplicitCastExpr`'s,
only the  `ImplicitCastExpr`'s will be marked as `PartOfExplicitCast`, but not the `ExplicitCastExpr` itself.
Thus, it is only ever `true` for `ImplicitCastExpr`'s, so we don't need to write/read/dump it for `ExplicitCastExpr`'s.


Repository:
  rC Clang

https://reviews.llvm.org/D49838

Files:
  include/clang/AST/Expr.h
  include/clang/AST/Stmt.h
  lib/AST/ASTDumper.cpp
  lib/Sema/SemaCast.cpp
  lib/Serialization/ASTReaderStmt.cpp
  lib/Serialization/ASTWriterStmt.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49838.157431.patch
Type: text/x-patch
Size: 5342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180726/330f2d3f/attachment-0001.bin>


More information about the cfe-commits mailing list