[PATCH] D50050: [AST] CastExpr: BasePathSize is not large enough.

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 31 09:57:06 PDT 2018


lebedev.ri updated this revision to Diff 158311.
lebedev.ri marked an inline comment as done.
lebedev.ri added a comment.

- Store/prepend it into `llvm::TrailingObjects<>`
- Use `unsigned short`
- Assert that the storage is at least large enough to be compliant with implimits <https://timsong-cpp.github.io/cppwp/implimits#2.26>
- Don't allocate even that `unsigned short` unless the path is not empty (use one bit in `CastExprBits`)


Repository:
  rC Clang

https://reviews.llvm.org/D50050

Files:
  include/clang/AST/Expr.h
  include/clang/AST/ExprCXX.h
  include/clang/AST/ExprObjC.h
  include/clang/AST/Stmt.h
  lib/AST/Expr.cpp
  lib/AST/ExprCXX.cpp
  test/CodeGenCXX/castexpr-basepathsize-threshold.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50050.158311.patch
Type: text/x-patch
Size: 17944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180731/e98760cc/attachment-0001.bin>


More information about the cfe-commits mailing list