[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-25 Thread Roman Lebedev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb8fdafe68ce2: [Sema] Perform call checking when building CXXNewExpr (authored by lebedev.ri). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73020/new/

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D73020#1892245 , @rsmith wrote: > In D73020#1891368 , @lebedev.ri > wrote: > > > In D73020#1857704 , @rsmith wrote: > > > > > Looks good if

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. In D73020#1891368 , @lebedev.ri wrote: > In D73020#1857704 , @rsmith wrote: > > > Looks good if you change the

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 246559. lebedev.ri added a comment. Rebased, NFC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73020/new/ https://reviews.llvm.org/D73020 Files: clang/lib/Sema/SemaChecking.cpp

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D73020#1857704 , @rsmith wrote: > Looks good if you change the error to a warning. I'm going to treat that as an implicit accept since the error got changed into a warning. Will commit this soon. Repository: rG LLVM

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 245625. lebedev.ri added a comment. Rebased ontop of patch demoting call-site-based align attr checking from error into a warning, NFC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73020/new/

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Bump @rsmith thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73020/new/ https://reviews.llvm.org/D73020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-09 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri marked an inline comment as done. lebedev.ri added a comment. Bump @rsmith thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73020/new/ https://reviews.llvm.org/D73020 ___ cfe-commits

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri marked 3 inline comments as done. lebedev.ri added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:3887-3891 if (!I.isPowerOf2()) { Diag(Arg->getExprLoc(), diag::err_alignment_not_power_of_two) << Arg->getSourceRange();

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:3887-3891 if (!I.isPowerOf2()) { Diag(Arg->getExprLoc(), diag::err_alignment_not_power_of_two) << Arg->getSourceRange(); return; }

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Looks good if you change the error to a warning. Comment at: clang/lib/Sema/SemaChecking.cpp:3887-3891 if (!I.isPowerOf2()) { Diag(Arg->getExprLoc(), diag::err_alignment_not_power_of_two) << Arg->getSourceRange();

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 242373. lebedev.ri marked 3 inline comments as done. lebedev.ri added a comment. @rsmith Thank you for taking a look! Addressed all review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73020/new/

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. It would be really useful to provide these extra parameters to `FindAllocationFunctions` too. For example, we could support direct dispatch to a size-class-specific allocation function: void *operator new(std::size_t n) __attribute__((enable_if(n == 16, "optimized

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-02-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. bump @rsmith Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73020/new/ https://reviews.llvm.org/D73020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-01-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 240196. lebedev.ri added a comment. Rebased, NFC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73020/new/ https://reviews.llvm.org/D73020 Files: clang/lib/AST/ExprConstant.cpp

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-01-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 239180. lebedev.ri added a comment. Not only do we need to 'insert' size implicit argument, but we may need to insert alignment implicit argument. And while for size we can only insert `nullptr`, for alignment we can actually insert the correct value.

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-01-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri planned changes to this revision. lebedev.ri added a comment. Ah right, hmm, posted too soon. I actually need to synthesize the size/align arguments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73020/new/

[PATCH] D73020: [Sema] Perform call checking when building CXXNewExpr

2020-01-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: rsmith, erichkeane, aaron.ballman, jdoerfert. lebedev.ri added a project: clang. lebedev.ri added a parent revision: D73019: [Sema] Don't disallow placing `__attribute__((alloc_align(param_idx)))` on `std::align_val_t`-typed