[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-07-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 154005. EricWF marked 2 inline comments as done. EricWF added a comment. Address main review comments. The `TransformTraitType` is now built early, and the `DeclSpec` refers to it and not the list of argument types. Additionally, the mangling formulation `u

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-07-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 13 inline comments as done. EricWF added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:3250-3251 - mangleType(T->getBaseType()); + for (auto Ty : T->getArgs()) +mangleType(Ty); } rsmith wrote: > EricWF wrote: > > EricWF wrote: > >

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF planned changes to this revision. EricWF marked 7 inline comments as done. EricWF added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:5262-5266 +AST_MATCHER(Type, unaryTransformType) { + if (const auto *T = Node.getAs()) +return T->getNumArgs()

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-05-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/TypeLoc.h:1992-1993 + unsigned getExtraLocalDataAlignment() const { +static_assert(alignof(TransformTraitTypeLoc) >= alignof(TypeSourceInfo *), + "not enough alignment for tail-allocated data"); +

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 12 inline comments as done. EricWF added a comment. Ping. https://reviews.llvm.org/D45131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-04-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 141293. EricWF marked 2 inline comments as done. EricWF added a comment. Address all inline comments. - Dynamically allocate `TransformTraitType`s list of argument types; making the node trivially destructible. - Detect and handle parameter packs when buildin

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-04-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:3250-3251 - mangleType(T->getBaseType()); + for (auto Ty : T->getArgs()) +mangleType(Ty); } EricWF wrote: > rsmith wrote: > > We need manglings to be self-delimiting, and we can't tell w

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-04-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 4 inline comments as done. EricWF added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:1077-1087 + auto DiagSelect = [&]() -> Optional { +if (Info.MinArity && Info.MinArity == Info.MaxArity && +Info.MinArity != Args.size()) + return DiagIn

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-04-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 10 inline comments as done. EricWF added inline comments. Comment at: include/clang/AST/Type.h:3990 /// The untransformed type. - QualType BaseType; + SmallVector ArgTypes; rsmith wrote: > You can't store types with non-trivial destructors on

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-04-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Type.h:3990 /// The untransformed type. - QualType BaseType; + SmallVector ArgTypes; You can't store types with non-trivial destructors on AST nodes; the Type destructor will never run, so you'll

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-03-31 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: rsmith, aaron.ballman, majnemer. Herald added a subscriber: klimek. This patch refactors `UnaryTransformType` into `TransformTraitType` which accepts an arbitrary number of input arguments, which is needed to support upcoming traits such as `