[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 set the repository for this revision to rL LLVM. jyu2 updated this revision to Diff 80462. jyu2 added a comment. A typo. Repository: rL LLVM https://reviews.llvm.org/D27358 Files: lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp Index:

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 removed rL LLVM as the repository for this revision. jyu2 updated this revision to Diff 80459. jyu2 added a comment. Update patch to address Reid's suggestion https://reviews.llvm.org/D27358 Files: lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp Index:

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. I changed! Thank you do much. Upload new patch. Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1530-1532 +const CXXRecordDecl *ClassDecl = + cast(CGF.CurCodeDecl)->getParent(); +if (ClassDecl != nullptr && ClassDecl->getNumVBases())

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 80487. jyu2 added a comment. Remove unnecessary check. Repository: rL LLVM https://reviews.llvm.org/D27358 Files: CodeGen/MicrosoftCXXABI.cpp Index: CodeGen/MicrosoftCXXABI.cpp === ---

[PATCH] D27358: V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: cfe-commits, erichkeane, majnemer, rnk. jyu2 set the repository for this revision to rL LLVM. jyu2 added a project: clang-c. The problem only happen on window ( A MSVC compatibility issues) The nature of the problem is virtual base dtor called

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. Hi Reid, I know some problems(ms compatibility) when throw inside destructor. I have not yet look like those problems. I am new for clang. I need sometime to catch up. -:) Thank you so much for your code review. I had add new patch to address your suggestion.

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 80491. jyu2 added a comment. last one missing test part diff. Sorry for that Repository: rL LLVM https://reviews.llvm.org/D27358 Files: lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp Index:

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2017-07-13 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In https://reviews.llvm.org/D33537#771274, @aaron.ballman wrote: > In https://reviews.llvm.org/D33537#771159, @baloghadamsoftware wrote: > > > In https://reviews.llvm.org/D33537#770264, @aaron.ballman wrote: > > > > > I think we should try to get as much of this

[PATCH] D34671: This is to address more command from Richard Smith for my change of https://reviews.llvm.org/D33333

2017-06-30 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 104959. jyu2 added a comment. Hi Aaron, Thank you so much for your review. I just update change to address your comments. Let me kwon if you see more problems. Thanks again. Jennifer Repository: rL LLVM https://reviews.llvm.org/D34671 Files:

[PATCH] D34671: This is to address more command from Richard Smith for my change of https://reviews.llvm.org/D33333

2017-06-30 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6356-6357 +: Warning< + "%0 has a non-throwing exception specification but can " "still " + "throw">, +

[PATCH] D34671: This is to address more command from Richard Smith for my change of https://reviews.llvm.org/D33333

2017-06-30 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 104966. jyu2 added a comment. Hi Richard, Thank you so much for your review. I just update patch to address you new comment. Please let me know if you see more problems. Thanks. Jennifer Repository: rL LLVM https://reviews.llvm.org/D34671 Files:

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2017-08-01 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In https://reviews.llvm.org/D33537#827509, @baloghadamsoftware wrote: > Test changed. I made some bad throws reachable, but the frontend check still > does detects them. If block contains two or more throws, that mean compiler can not statically know throw is really

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-05-21 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In https://reviews.llvm.org/D3#760149, @aaron.ballman wrote: > As an FYI, there is a related check currently under development in > clang-tidy; we probably should not duplicate this functionality in both > places. See https://reviews.llvm.org/D19201 for the other

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-05-18 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. Throwing in the destructor is not good (C++11 change try to not allow see below). But in reality, those codes are exist. C++11 [class.dtor]p3: A declaration of a destructor that does not have an exception-specification is implicitly considered to have the same

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-05-18 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 99517. jyu2 added a comment. Reid, Thank you so much for your comments. I upload new patch to address your suggestion. 1> Emit warning for throw exception in all noexcept function. And special diagnostic note for destructor and delete operators. 2> Silence

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-05-22 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In https://reviews.llvm.org/D3#760431, @aaron.ballman wrote: > In https://reviews.llvm.org/D3#760419, @jyu2 wrote: > > > In https://reviews.llvm.org/D3#760149, @aaron.ballman wrote: > > > > > As an FYI, there is a related check currently under development in >

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-05-30 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 100796. jyu2 added a comment. Okay this CFG version of this change. In this change I am basic using same algorithm with -Winfinite-recursion. In addition to my original implementation, I add handler type checking which basic using

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-01 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 101167. jyu2 marked an inline comment as done. jyu2 added a comment. Update to address review comments. https://reviews.llvm.org/D3 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/AnalysisBasedWarnings.cpp

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-01 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In https://reviews.llvm.org/D3#770238, @aaron.ballman wrote: > In https://reviews.llvm.org/D3#768332, @jyu2 wrote: > > > Okay this CFG version of this change. In this change I am basic using same > > algorithm with -Winfinite-recursion. > > > > In addition to my

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-01 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 12 inline comments as done. jyu2 added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6341 +: Warning<"%0 has a non-throwing exception specification but can still " + "throw, may result in unexpected program termination.">, +

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-01 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 8 inline comments as done. jyu2 added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:334 + continue; +else + HasThrowOutFunc = true; aaron.ballman wrote: > You can drop the `else` here and just set `HasThrowOutFunc` to

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 2 inline comments as done. jyu2 added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:334 + continue; +else + HasThrowOutFunc = true; jyu2 wrote: > aaron.ballman wrote: > > You can drop the `else` here and just set

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-05 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 101373. jyu2 added a comment. Add more test include 1> throw/catch reference types. 2> try block. 3>unreachable code. https://reviews.llvm.org/D3 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/AnalysisBasedWarnings.cpp

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-16 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: test/SemaCXX/warn-throw-out-noexcept-func.cpp:1 +// RUN: %clang_cc1 %s -fdelayed-template-parsing -fcxx-exceptions -fexceptions -fsyntax-only -Wexceptions -verify -std=c++11 +struct A { aaron.ballman wrote: >

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-16 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 102877. jyu2 added a comment. update patch https://reviews.llvm.org/D3 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/AnalysisBasedWarnings.cpp test/CXX/except/except.spec/p11.cpp test/SemaCXX/warn-throw-out-noexcept-func.cpp Index:

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-16 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: test/SemaCXX/warn-throw-out-noexcept-func.cpp:27 +} + +struct N : A { aaron.ballman wrote: > jyu2 wrote: > > aaron.ballman wrote: > > > Can you add a test case like: > > > ``` > > > struct Throws { > > > ~Throws()

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-16 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 102868. jyu2 added a comment. Update patch https://reviews.llvm.org/D3 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/AnalysisBasedWarnings.cpp test/CXX/except/except.spec/p11.cpp test/SemaCXX/warn-throw-out-noexcept-func.cpp Index:

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-15 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 7 inline comments as done. jyu2 added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:296 + + if (ThrowType->isReferenceType()) +ThrowType = ThrowType->castAs() aaron.ballman wrote: > If `ThrowType` can be null, there should be a

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-15 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 102759. jyu2 marked 13 inline comments as done. https://reviews.llvm.org/D3 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/AnalysisBasedWarnings.cpp test/CXX/except/except.spec/p11.cpp test/SemaCXX/warn-throw-out-noexcept-func.cpp

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-15 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 102754. jyu2 added a comment. Address Aaron's comments. https://reviews.llvm.org/D3 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/AnalysisBasedWarnings.cpp test/CXX/except/except.spec/p11.cpp

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-16 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 102828. jyu2 added a comment. Thanks Aaron!!! I just upload new patch to address your comments. I now understand your point on when I can use auto. https://reviews.llvm.org/D3 Files: include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-01-14 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked an inline comment as done. jyu2 added inline comments. Comment at: lib/Sema/SemaStmtAsm.cpp:470 +if (NS->isGCCAsmGoto() && +Exprs[ConstraintIdx]->getStmtClass() == Stmt::AddrLabelExprClass) + break; efriedma wrote: > jyu2 wrote: > >

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-01-15 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 181862. jyu2 added a comment. I add additional test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h include/clang/AST/ExprObjC.h

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-01-15 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 2 inline comments as done. jyu2 added inline comments. Comment at: lib/Sema/SemaStmtAsm.cpp:470 +if (NS->isGCCAsmGoto() && +Exprs[ConstraintIdx]->getStmtClass() == Stmt::AddrLabelExprClass) + break; efriedma wrote: > jyu2 wrote: > >

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-01-14 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked an inline comment as done. jyu2 added inline comments. Comment at: lib/Sema/SemaStmtAsm.cpp:470 +if (NS->isGCCAsmGoto() && +Exprs[ConstraintIdx]->getStmtClass() == Stmt::AddrLabelExprClass) + break; efriedma wrote: > jyu2 wrote: > >

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-01-14 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 181702. jyu2 added a comment. Add code to diagnostic error for use of the "l" modifier that does not point to a label in the label list. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files:

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-01-15 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 181973. jyu2 marked an inline comment as done. jyu2 added a comment. Change error message. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in LLVM

2019-01-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 181342. jyu2 added a comment. 1> I add code for CFG.cpp and a test for that, as efriedman request. 2> changes are respond the comments I received CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in LLVM

2019-01-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 7 inline comments as done. jyu2 added inline comments. Comment at: lib/CodeGen/CGStmt.cpp:2182 +} + } + nickdesaulniers wrote: > If this new block was moved closer to the new one on L2227, I assume they > could be combined and possibly

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in LLVM

2019-01-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked an inline comment as done. jyu2 added inline comments. Comment at: lib/Sema/SemaStmtAsm.cpp:470 +if (NS->isGCCAsmGoto() && +Exprs[ConstraintIdx]->getStmtClass() == Stmt::AddrLabelExprClass) + break; efriedma wrote: > jyu2 wrote: > >

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in LLVM

2019-01-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 181403. jyu2 added a comment. Couple of change to respond Eli’s comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in LLVM

2019-01-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 3 inline comments as done. jyu2 added inline comments. Comment at: lib/Analysis/CFG.cpp:1474 + appendScopeBegin(JT.block, VD, G); + addSuccessor(B, JT.block); +} efriedma wrote: > Please don't copy-paste code. :-( changed

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in LLVM

2019-01-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 2 inline comments as done. jyu2 added inline comments. Comment at: lib/Sema/SemaStmtAsm.cpp:470 +if (NS->isGCCAsmGoto() && +Exprs[ConstraintIdx]->getStmtClass() == Stmt::AddrLabelExprClass) + break; jyu2 wrote: > efriedma wrote: > >

[PATCH] D58160: MS ABI: adding template static member in the linker directive section to make sure init function can be called before main.

2019-04-03 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 closed this revision. jyu2 added a comment. Closed by commit rG0b28b8b09be7 : Bug-40323: MS ABI adding template static member in the linker directive section… (authored by jyu2). Repository: rL LLVM CHANGES SINCE

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-03-04 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 189205. jyu2 added a comment. Rebased CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Stmt.h include/clang/Basic/DiagnosticParseKinds.td

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-22 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 188021. jyu2 added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Stmt.h include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D58160: MS ABI: adding template static member in the linker directive section to make sure init function can be called before main.

2019-03-18 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In D58160#1433458 , @rnk wrote: > lgtm Thank you so much Reid! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58160/new/ https://reviews.llvm.org/D58160

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-07 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked an inline comment as done. jyu2 added inline comments. Comment at: lib/AST/Stmt.cpp:628 + DiagOffs = CurPtr-StrStart-1; + return diag::err_asm_invalid_operand_for_goto_labels; +} rsmith wrote: > jyu2 wrote: > > rsmith wrote:

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-07 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: lib/Analysis/CFG.cpp:3137 + + Block = createBlock(false); + Block->setTerminator(G); efriedma wrote: > efriedma wrote: > > Passing add_successor=false seems suspect; this could probably use more > > test coverage. > Did

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-07 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 185911. jyu2 marked an inline comment as done. jyu2 added a comment. Remove check for %lN Fix missing successor of asm goto in CFG build. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files:

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-12 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 186577. jyu2 added a comment. Cleanup CFG code, remove obj-lifetime code when build CFE for asm-goto. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Stmt.h

[PATCH] D58160: Fix runtime problem from //bugs.llvm.org/show_bug.cgi?id=40323

2019-02-12 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: cfe-commits, rnk, majnemer, erichkeane. Herald added subscribers: llvm-commits, jdoerfert. Herald added a project: LLVM. A MS only run time problem, because the init function for template static member is not getting called when the template

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 186356. jyu2 added a comment. I find some ambiguous error for asm-goto out of scope. Instead call VerifyIndirectOrAsmJumps one time, call that function twice one for indirect-goto one for asm-goto. Let me know if you see any problems. Thanks for all the

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-15 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 187036. jyu2 marked an inline comment as done. jyu2 added a comment. Review comment addressed CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Stmt.h

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-15 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: lib/Sema/JumpDiagnostics.cpp:675 + // asm-goto. + //if (!IsAsmGoto && IndirectJumpTargets.empty()) { + if (JumpTargets.empty()) { efriedma wrote: > Commented-out code? > > We probably don't need a diagnostic for an asm

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-15 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 187124. jyu2 marked 5 inline comments as done. jyu2 added a comment. Herald added a subscriber: rnkovacs. Review comments addressed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files:

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-15 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: lib/AST/StmtProfile.cpp:324 VisitStringLiteral(S->getClobberStringLiteral(I)); + ID.AddInteger(S->getNumLabels()); } rsmith wrote: > Don't we also need to profile the labels themselves? How this can be lost? :-(

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-05 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 2 inline comments as done. jyu2 added inline comments. Comment at: lib/AST/Stmt.cpp:457-460 this->NumOutputs = NumOutputs; this->NumInputs = NumInputs; this->NumClobbers = NumClobbers; + this->NumLabels = NumLabels; rsmith wrote: > jyu2

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-05 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 185360. jyu2 added a comment. 1>emit better error for use of output constraints. 2> Add assert for NumLabels and NumOutputs are both larger than 0. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files:

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-05 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: lib/AST/Stmt.cpp:457-458 + this->NumLabels = NumLabels; + assert((NumLabels != 0 && NumOutputs == 0) || + (NumOutputs != 0 && NumLabels == 0)); rsmith wrote: > This can be simplified a little: > ``` >

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-05 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 185477. jyu2 marked 4 inline comments as done. jyu2 added a comment. More change from review. Add scope checking for asm-goto. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Stmt.h

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-05 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 185489. jyu2 added a comment. small fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Stmt.h include/clang/Basic/DiagnosticASTKinds.td

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-01-30 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 184349. jyu2 marked an inline comment as done. jyu2 added a comment. Change test for BE IR change. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Expr.h

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-04 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 185206. jyu2 marked 8 inline comments as done. jyu2 added a comment. More review comments addressed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Stmt.h

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-04 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: lib/AST/Stmt.cpp:457-460 this->NumOutputs = NumOutputs; this->NumInputs = NumInputs; this->NumClobbers = NumClobbers; + this->NumLabels = NumLabels; rsmith wrote: > Please assert that you don't have both outputs

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-04 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 2 inline comments as done. jyu2 added inline comments. Comment at: lib/Sema/JumpDiagnostics.cpp:347 + LabelAndGotoScopes[S] = ParentScope; + Jumps.push_back(S); +} efriedma wrote: > This doesn't look right; I think we need to add it to

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-04 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 commandeered this revision. jyu2 edited reviewers, added: craig.topper; removed: jyu2. jyu2 added inline comments. Comment at: lib/Analysis/CFG.cpp:2126 + if (cast(S)->isGCCAsmGoto()) +return VisitGCCAsmStmt(cast(S)); + return VisitStmt(S, asc);

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-04 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 185094. jyu2 added a comment. 1> Add code for scope checking 2> Using CastInterator 3> CFG change to remove duplicate Block list CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files:

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-04 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 12 inline comments as done. jyu2 added inline comments. Comment at: include/clang/AST/Stmt.h:1008 + (*iterator_adaptor_base::I)->getStmtClass() <= lastExprConstant); + return *reinterpret_cast(iterator_adaptor_base::I); } rsmith

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-06-04 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 closed this revision. jyu2 added a comment. jyu2 committed rGb8fee677bf8e : Re-check in clang support gun asm goto after fixing tests. (authored by jyu2). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-06-01 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. jyu2 committed rG954ec09aed4f : clang support gnu asm goto In D56571#1523895 , @nickdesaulniers wrote: > Was this committed accidentally? > > Today in master I

[PATCH] D60912: MS ABI: handle inline static data member as template static data member

2019-04-19 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In D60912#1472983 , @rnk wrote: > Thanks, I think there's another case to handle, though. Hi Reid, Thank you so much for the review. Yes, I check the following test case, both gnu and cl call foo twice. Do we want to do

[PATCH] D60912: MS ABI: handle inline static data member as template static data member

2019-04-19 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: rnk, majnemer, erichkeane, cfe-commits. Herald added a project: clang. MS only run time problem with inline static data member. A inline static data member’s init function gets called multiple time. To fix this, using template static data members

[PATCH] D60912: MS ABI: handle inline static data member as template static data member

2019-04-19 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In D60912#1472987 , @rnk wrote: > In D60912#1472986 , @jyu2 wrote: > > > inline static int aoo = foo(); // C++17 inline variable, thus also a > > definition > > > This is a `static inline`

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-04-24 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In D56571#1476266 , @nickdesaulniers wrote: > @compudj email me the preprocessed output of basic_percpu_ops_test.c and I'll > take a look. (Should be able to find my email via `git log`). @nickdesaulniers, thanks for looking into

[PATCH] D60912: MS ABI: handle inline static data member and inline variable as template static data member

2019-04-25 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked an inline comment as done. jyu2 added inline comments. Comment at: lib/CodeGen/CGDeclCXX.cpp:470-471 PrioritizedCXXGlobalInits.push_back(std::make_pair(Key, Fn)); - } else if (isTemplateInstantiation(D->getTemplateSpecializationKind())) { + } else if

[PATCH] D60912: MS ABI: handle inline static data member and inline variable as template static data member

2019-04-25 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 closed this revision. jyu2 added a comment. committed rGc19f4f806972 : Fix bug 37903:MS ABI: handle inline static data member and inline variable as… (authored by jyu2). CHANGES SINCE LAST ACTION

[PATCH] D60912: MS ABI: handle inline static data member and inline variable as template static data member

2019-04-23 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 196346. jyu2 retitled this revision from "MS ABI: handle inline static data member as template static data member" to "MS ABI: handle inline static data member and inline variable as template static data member". jyu2 edited the summary of this revision. jyu2

[PATCH] D60930: [codeview] Fix symbol names for dynamic initializers and atexit stubs

2019-04-22 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. Looks good to me. We are basically de-mangled name for those __E initialize global’s function and __F destroy global's function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60930/new/ https://reviews.llvm.org/D60930

[PATCH] D79743: [clang][asm goto][slh] Warn if asm goto + SLH

2020-05-13 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. Two questions: 1> What happen under SLH, will asm goto gets removed, or a runtime problem? 2> Should we emit error or warning in the Parser instead? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79743/new/

[PATCH] D79743: [clang][asm goto][slh] Warn if asm goto + SLH

2020-05-13 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In D79743#2034945 , @zbrid wrote: > In D79743#2034792 , @jyu2 wrote: > > > Two questions: > > 1> What happen under SLH, will asm goto gets removed, or a runtime problem? > > 2> Should we

[PATCH] D79743: [clang][asm goto][slh] Warn if asm goto + SLH

2020-05-14 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. I don’t know what consequences is of using asm goto under SLH. In general, if asm-goto is not allowed, the diagnostic should be emitted during the parser. If asm-goto is not allowed under specified condition, the diagnostic should be emitted during sema. Diagnostic

[PATCH] D79743: [clang][asm goto][slh] Warn if asm goto + SLH

2020-05-19 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. This looks good to me. Could you also add a test to use this new DiagGroup (-Wno-slh-asm-goto)? Thanks. Jennifer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79743/new/ https://reviews.llvm.org/D79743

[PATCH] D79743: [clang][asm goto][slh] Warn if asm goto + SLH

2020-05-19 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 accepted this revision. jyu2 added a comment. This revision is now accepted and ready to land. LGTM. Please changed format for td file. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:247 + + def warn_slh_does_not_support_asm_goto : Warning< +

[PATCH] D87279: [clang] Fix handling of physical registers in inline assembly operands.

2020-10-07 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2066 + // Keep track of defined physregs. + std::set PhysRegOutputs; + Use llvm::SmallSet? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87279/new/ https://reviews.llvm.org/D87279

[PATCH] D87279: [clang] Fix handling of physical registers in inline assembly operands.

2020-10-09 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 accepted this revision. jyu2 added a comment. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87279/new/ https://reviews.llvm.org/D87279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D82832: Correctly generate invert xor value for Binary Atomics of int size > 64

2020-06-29 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: hfinkel, erichkeane, rjmccall, cfe-commits. Herald added a subscriber: jfb. When using __sync_nand_and_fetch with __int128, a problem is found that the wrong value for the 'invert' value gets emitted to the xor in case where the int size is

[PATCH] D82832: Correctly generate invert xor value for Binary Atomics of int size > 64

2020-07-07 Thread Jennifer Yu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6cf0dac1ca3f: orrectly generate invert xor value for Binary Atomics of int size 64 (authored by jyu2). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82832: Correctly generate invert xor value for Binary Atomics of int size > 64

2020-07-07 Thread Jennifer Yu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6cf0dac1ca3f: orrectly generate invert xor value for Binary Atomics of int size 64 (authored by jyu2). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D92439: Fix missing error for use of 128-bit integer inside SPIR64 device code.

2020-12-01 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: erichkeane, aaron.ballman, Fznamznon, rjmccall, jdoerfert, rsmith. jyu2 added a project: clang. Herald added a subscriber: Anastasia. jyu2 requested review of this revision. Emit error for use of 128-bit integer inside device code had been

[PATCH] D92439: [CLANG] Fix missing error for use of 128-bit integer inside SPIR64 device code.

2020-12-04 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. Thanks @aaron.ballman to accept my change!!! Hi @jdoerfert, Thank you for your review. it seems you still has request change for for this. I did address your earlier comment in SPIR.h and upload the change. Is there anything else I need to change? Thanks. Jennifer

[PATCH] D92439: [CLANG] Fix missing error for use of 128-bit integer inside SPIR64 device code.

2020-12-09 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 closed this revision. jyu2 added a comment. commit by rGf8d5b49c786f : Fix missing error for use of 128-bit integer inside SPIR64 device code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92439/new/

[PATCH] D92439: [CLANG] Fix missing error for use of 128-bit integer inside SPIR64 device code.

2020-12-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In D92439#2429511 , @jdoerfert wrote: > Still unsure if we should also error out for NVPTX but that is a different > story. Looks OK from my side, assuming you address the earlier comment. With this change if NVPTX need diagnostic

[PATCH] D92439: [CLANG] Fix missing error for use of 128-bit integer inside SPIR64 device code.

2020-12-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 309067. jyu2 retitled this revision from "Fix missing error for use of 128-bit integer inside SPIR64 device code." to "[CLANG] Fix missing error for use of 128-bit integer inside SPIR64 device code.". jyu2 added a comment. Fix problem with @jdoerfert pointed

[PATCH] D92439: [CLANG] Fix missing error for use of 128-bit integer inside SPIR64 device code.

2020-12-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/Sema/Sema.cpp:241 + (Context.getAuxTargetInfo() && + Context.getAuxTargetInfo()->hasInt128Type())) { // If either of the 128-bit integer types are unavailable to name lookup, jdoerfert wrote: >

[PATCH] D92439: Fix missing error for use of 128-bit integer inside SPIR64 device code.

2020-12-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/Basic/Targets/SPIR.h:108 + + virtual bool hasInt128Type() const { return false; } }; jdoerfert wrote: > Not virtual but override. Thank you. I will change that. Comment at:

[PATCH] D92439: Fix missing error for use of 128-bit integer inside SPIR64 device code.

2020-12-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/Sema/Sema.cpp:241 + (Context.getAuxTargetInfo() && + Context.getAuxTargetInfo()->hasInt128Type())) { // If either of the 128-bit integer types are unavailable to name lookup, jdoerfert wrote: >

[PATCH] D92439: Fix missing error for use of 128-bit integer inside SPIR64 device code.

2020-12-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/Sema/Sema.cpp:241 + (Context.getAuxTargetInfo() && + Context.getAuxTargetInfo()->hasInt128Type())) { // If either of the 128-bit integer types are unavailable to name lookup, jyu2 wrote: >

[PATCH] D105562: [OPENMP]Fix overlapped mapping for dereferenced pointer members.

2021-07-08 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 accepted this revision. jyu2 added a comment. This revision is now accepted and ready to land. This will eliminate some IRS and it works okay with me. Thanks! But I don't know enough about this domain, please wait for some time to see if others may command on it.

[PATCH] D101781: Fix assert on the variable which is used in omp clause is not marked as used

2021-05-03 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: ABataev, jdoerfert, mikerice. jyu2 added a project: clang. jyu2 requested review of this revision. Herald added a subscriber: sstefan1. The problem only happens with constexpr variable, for constexpr variable, variable is not marked during parser

  1   2   3   4   >