[PATCH] D36294: CFI: blacklist STL allocate() from unrelated-casts

2017-08-04 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310097: CFI: blacklist STL allocate() from unrelated-casts (authored by vlad.tsyrklevich). Repository: rL LLVM https://reviews.llvm.org/D36294 Files: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp cfe/

[PATCH] D36294: CFI: blacklist STL allocate() from unrelated-casts

2017-08-03 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D36294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36294: CFI: blacklist STL allocate() from unrelated-casts

2017-08-03 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich marked an inline comment as done. vlad.tsyrklevich added inline comments. Comment at: lib/CodeGen/CodeGenFunction.cpp:789 +auto *MD = dyn_cast_or_null(D); +if (MD && MD->getName().equals("allocate") && MD->getNumParams() == 2) { + auto *BT = MD->para

[PATCH] D36294: CFI: blacklist STL allocate() from unrelated-casts

2017-08-03 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 109668. vlad.tsyrklevich marked 2 inline comments as done. vlad.tsyrklevich added a comment. Address pcc's comments https://reviews.llvm.org/D36294 Files: lib/CodeGen/CodeGenFunction.cpp test/CodeGen/cfi-unrelated-cast.cpp Index: test/CodeGen

[PATCH] D36294: CFI: blacklist STL allocate() from unrelated-casts

2017-08-03 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a subscriber: cfe-commits. pcc added inline comments. Comment at: lib/CodeGen/CodeGenFunction.cpp:785 + // Ignore unrelated casts from C++ calls to allocate(). Don't match on the + // namespace because not all allocators are in std:: The comment sho