[PATCH] D103565: Fix "control reaches end of non-void function" warnings on ppc64le

2021-06-02 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo added a comment. Warnings can be found here: https://lab.llvm.org/buildbot/#/builders/76/builds/2640 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103565/new/ https://reviews.llvm.org/D103565

[PATCH] D103565: Fix "control reaches end of non-void function" warnings on ppc64le

2021-06-02 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo created this revision. zhaomo added reviewers: ymandel, hokein. Herald added a subscriber: shchenz. zhaomo requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D103565

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-06-02 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo added a comment. Thanks folks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-06-01 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 349030. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp clang/unittests/ASTMatchers/GtestMatchersTest.cpp

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-06-01 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo added inline comments. Comment at: clang/lib/ASTMatchers/GtestMatchers.cpp:41 } - llvm_unreachable("Unhandled GtestCmp enum"); } hokein wrote: > zhaomo wrote: > > hokein wrote: > > > why remove this `llvm_unreachable`? I think this is a common

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-06-01 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 348998. zhaomo marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-27 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 348399. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp clang/unittests/ASTMatchers/GtestMatchersTest.cpp

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-27 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 348384. zhaomo marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-27 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo added inline comments. Comment at: clang/include/clang/ASTMatchers/GtestMatchers.h:39 + /// Matcher for gtest's ASSERT_... macros. internal::BindableMatcher gtestAssert(GtestCmp Cmp, StatementMatcher Left, hokein wrote: > as we add a new method to

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-26 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 348113. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp clang/unittests/ASTMatchers/GtestMatchersTest.cpp

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-26 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 348095. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp clang/unittests/ASTMatchers/GtestMatchersTest.cpp

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-26 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 348094. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp clang/unittests/ASTMatchers/GtestMatchersTest.cpp

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-26 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 348093. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp clang/unittests/ASTMatchers/GtestMatchersTest.cpp

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-26 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo created this revision. zhaomo added a reviewer: ymandel. Herald added a subscriber: mstorsjo. zhaomo requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds support for matching gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2019-09-20 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 221140. zhaomo added a comment. In this new patch, I added a "level" field to type metadata when vtable interleaving is enabled. Currently type metadata is a (byte offset, type) pair. However, suppose T1 and T2 are compatible with the same offset of a

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2019-04-15 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo added a comment. Addressed @rsmith's comments. Comment at: clang/include/clang/Driver/CC1Options.td:356-357 +HelpText<"Enable VTable interleaving">; +def disable_vtable_interleaving : Flag<["-"], "disable-vtable-interleaving">, +HelpText<"Disable VTable

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2019-04-15 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 195148. zhaomo marked 7 inline comments as done. zhaomo added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Fixed bugs in the previous patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51905/new/

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-13 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 165415. zhaomo added a comment. Fixed issues pointed out by Peter and Vlad. Richard: I just saw comments but I will travel tomorrow and this weekend so I will reply to your comments when I get a chance. https://reviews.llvm.org/D51905 Files:

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-13 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo added a comment. In https://reviews.llvm.org/D51905#1231383, @vlad.tsyrklevich wrote: > This change causes all compiler-rt cfi tests to be UNSUPPORTED for me > locally, do you have any idea why that might be? The lit changes don't make > it immediately clear. Not sure why that

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-13 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo added inline comments. Comment at: compiler-rt/test/cfi/lit.cfg:33 dso = '-fsanitize-cfi-cross-dso -fvisibility=default ' + interleave = '-Xclang -enable-vtable-interleaving -Wl,-plugin-opt,-enable-vtable-interleaving -Wl,-plugin-opt=save-temps

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-13 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:939 +/// We should only interleave vtables when the module has the hidden +/// LTO visibility, cfi-vcall is enabled and EnableVTableInterleaving vlad.tsyrklevich wrote: > doxygen

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-12 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:1767 + bool InBounds = shouldInterleaveVTables(VTableClass) ? false : true; return llvm::ConstantExpr::getGetElementPtr(VTable->getValueType(), VTable, pcc wrote: > Remind me why

[PATCH] D50372: Introduce the VTable interleaving scheme to the CFI design documentation

2018-09-11 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 164964. zhaomo added a comment. Fixed typos pointed out by pcc. https://reviews.llvm.org/D50372 Files: clang/docs/ControlFlowIntegrityDesign.rst Index: clang/docs/ControlFlowIntegrityDesign.rst

[PATCH] D50372: Introduce the VTable interleaving scheme to the CFI design documentation

2018-08-07 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 159636. zhaomo added a comment. Fix mistakes and provide more information about the interleaving algorithm https://reviews.llvm.org/D50372 Files: clang/docs/ControlFlowIntegrityDesign.rst Index: clang/docs/ControlFlowIntegrityDesign.rst

[PATCH] D50372: Introduce the VTable interleaving scheme to the CFI design documentation

2018-08-07 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 159606. zhaomo added a comment. Updated version of the patch https://reviews.llvm.org/D50372 Files: clang/docs/ControlFlowIntegrityDesign.rst Index: clang/docs/ControlFlowIntegrityDesign.rst

[PATCH] D50372: Introduce the VTable interleaving scheme to the CFI design documentation

2018-08-06 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo created this revision. zhaomo added reviewers: pcc, vlad.tsyrklevich. Herald added a subscriber: cfe-commits. Dimitar et. al. in [1] proposed a novel VTable layout scheme that enables efficient implementation of virtual call CFI. This patch adds an introduction of this scheme to the CFI