[PATCH] D79121: Add nomerge function attribute to clang

2020-04-29 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added a reviewer: rnk. zequanwu added a project: clang. Herald added a subscriber: cfe-commits. Related to D78659 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D79121 Files: clang/include/clang/Basic/

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-29 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 261059. zequanwu marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78659/new/ https://reviews.llvm.org/D78659 Files: llvm/docs/LangRef.rst llvm/include/llvm/Bitcode/LLVMBitCodes.h llvm/include/llvm/IR/Attributes.t

[PATCH] D79121: Add nomerge function attribute to clang

2020-04-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked 2 inline comments as done. zequanwu added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1799 + let Spellings = [Clang<"nomerge">]; + let Subjects = SubjectList<[Function]>; + let Documentation = [NoMergeDocs]; rnk wrote: > Clan

[PATCH] D79121: Add nomerge function attribute to clang

2020-04-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 261292. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://reviews.llvm.org/D79121 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/attr-nomerge.c

[PATCH] D79121: Add nomerge function attribute to clang

2020-04-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 261406. zequanwu added a comment. change `nomerge` to statement attribute CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://reviews.llvm.org/D79121 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 261698. zequanwu marked 4 inline comments as done. zequanwu added a comment. Add Sema test. Check if nomerge attribute has no arguments and statement contains call expressions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://revie

[PATCH] D84988: WIP [Coverage] Add empty line regions to SkippedRegions

2020-07-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added a reviewer: vsk. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. zequanwu requested review of this revision. Add a hook to track empty line regions when lexing. But the performance is slowed down by

[PATCH] D85176: [Coverage] Enable emitting gap area between macros

2020-08-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. Bug filed here: https://bugs.llvm.org/show_bug.cgi?id=45849 This is caused by gap area not emitted if either `AfterLoc` or `BeforeLoc` is a macro loca

[PATCH] D85390: [Clang] Add note for bad conversion when expression is of forward-declared type

2020-08-05 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added a reviewer: hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. I think one note to speficify the forward declaretion location should be enough. Two notes might be too noisy. Repo

[PATCH] D85390: [Clang] Add note for bad conversion error when expression is of forward-declared type

2020-08-06 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:8710 } + QualType fromType = op->getType(); + auto *fromDecl = fromType.getTypePtr()->getPointeeCXXRecordDecl(); hans wrote: > Can the reverse situation happen, where it's destType that'

[PATCH] D85390: [Clang] Add note for bad conversion error when expression is of forward-declared type

2020-08-06 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:8710 } + QualType fromType = op->getType(); + auto *fromDecl = fromType.getTypePtr()->getPointeeCXXRecordDecl(); zequanwu wrote: > hans wrote: > > Can the reverse situation happen, where

[PATCH] D85390: [Clang] Add note for bad conversion error when expression is of forward-declared type

2020-08-06 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 283744. zequanwu added a comment. Add new note and test case. I think for the class template case, the new note might not be useful, since they might simply caused by mismatch of template arguments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D85390: [Clang] Add note for bad conversion error when expression is of forward-declared type

2020-08-07 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 283949. zequanwu added a comment. Update diag note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85390/new/ https://reviews.llvm.org/D85390 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/l

[PATCH] D85390: [Clang] Add note for bad conversion error when expression is of forward-declared type

2020-08-07 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc354b2e3bfe6: [Clang] Add note for bad conversion when expression is pointer to forward… (authored by zequanwu). Changed prior to commit: https://

[PATCH] D85574: [Sema] Fix missing warning on initializer lists on field initializers with overloaded operators

2020-08-07 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added a reviewer: rtrieu. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D85574 Files: clang/lib/Sema/SemaDeclCXX.cpp cl

[PATCH] D85696: [AST] add parenthesis locations for IfStmt and SwitchStmt

2020-08-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added a reviewer: rsmith. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: shafik. Herald added a project: clang. zequanwu requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D85696 Fil

[PATCH] D85696: [AST] add parenthesis locations for IfStmt and SwitchStmt

2020-08-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 284532. zequanwu added a comment. Forgot changes on ASTReaderStmt.cpp, added now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85696/new/ https://reviews.llvm.org/D85696 Files: clang/include/clang/AST/Stmt

[PATCH] D85574: [Sema] Fix missing warning on initializer lists on field initializers with overloaded operators

2020-08-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 284551. zequanwu marked an inline comment as done. zequanwu added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85574/new/ https://reviews.llvm.org/D85574 Files: clang/lib/Sema/S

[PATCH] D85574: [Sema] Fix missing warning on initializer lists on field initializers with overloaded operators

2020-08-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:3584-3585 if (!isa(Base->IgnoreParenImpCasts())) return; rtrieu wrote: > Does the warning work if it was changed to be "Visit(Base);" before the > return here instead

[PATCH] D85696: [AST] add parenthesis locations for IfStmt and SwitchStmt

2020-08-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 284557. zequanwu marked 3 inline comments as done. zequanwu added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85696/new/ https://reviews.llvm.org/D85696 Files: clang/include/c

[PATCH] D85696: [AST] add parenthesis locations for IfStmt and SwitchStmt

2020-08-10 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG94c6ceab539e: [AST] add parenthesis locations for IfStmt and SwitchStmt (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D85574: [Sema] Fix missing warning on initializer lists on field initializers with overloaded operators

2020-08-10 Thread Zequan Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4aaa97700377: [Sema] Fix missing warning on initializer lists on field initializers with… (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D85176: [Coverage] Enable emitting gap area between macros

2020-08-11 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 284858. zequanwu added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85176/new/ https://reviews.llvm.org/D85176 Files: clang/lib/CodeGen/CoverageMappingGen.cpp clang/test/Cove

[PATCH] D85176: [Coverage] Enable emitting gap area between macros

2020-08-12 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa31c89c1b7a0: [Coverage] Enable emitting gap area between macros (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D84988: WIP [Coverage] Add empty line regions to SkippedRegions

2020-08-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 285811. zequanwu added a comment. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. - Rebase. - Merging adjcent skipped regions, if the regions are in the same file, could reduce binary size. - The new empty lines regions break exist

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D84988#2221805 , @vsk wrote: > Hi @zequanwu, are you looking for review for this patch? I wasn't sure > because of the WIP label. Yes, I removed the label. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 286123. zequanwu marked 3 inline comments as done. zequanwu edited the summary of this revision. zequanwu added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://rev

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:326 +if (PrevTokLoc.isValid()) { + unsigned PrevTokLine = SM.getSpellingLineNumber(PrevTokLoc); + if (SR.LineStart == PrevTokLine) { vsk wrote: > It looks like this

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:580 const auto &R = Segments[I]; - if (!(L.Line < R.Line) && !(L.Line == R.Line && L.Col < R.Col)) { + if (!(L.Line <= R.Line) && !(L.Line == R.Line && L.Col <= R.Col))

[PATCH] D86116: [Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same file as regions' {start, end}Loc

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: vsk, hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. Fix a bug if {Prev, Next}TokLoc is in different file from skipped regions' {start, end}Loc Repository: rG LLV

[PATCH] D86116: [Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same file as regions' {start, end}Loc

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 286167. zequanwu added a comment. Update test. The bug is when start or end location skipped regions has the same spelling line number as PrevTokLoc or NextTokLoc but in different files. In the test case, end location of skipped regions is in line 6 and PreT

[PATCH] D86116: [Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same file as regions' {start, end}Loc

2020-08-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 286387. zequanwu added a comment. Minor fix on test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86116/new/ https://reviews.llvm.org/D86116 Files: clang/lib/CodeGen/CoverageMappingGen.cpp clang/tes

[PATCH] D86116: [Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same file as regions' {start, end}Loc

2020-08-18 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG84fffa672831: [Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same file… (authored by zequanwu). Repository: rG LLVM Github

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-04 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 261973. zequanwu marked 10 inline comments as done. zequanwu added a comment. To keep it simple, `nomerge` attribute should not be applied to decl statement. Since label statement calls `ProcessDeclAttributeList` to handle attributes, label statement should

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-04 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:611 void CodeGenFunction::EmitAttributedStmt(const AttributedStmt &S) { + for (const auto *A: S.getAttrs()) +if (A->getKind() == attr::NoMerge) { rnk wrote: > Can we use S.hasAttr, or

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-05 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: clang/lib/Sema/SemaStmtAttr.cpp:178 +return true; + return llvm::any_of(S->children(), hasCallExpr); +} rsmith wrote: > This will recurse into too much (eg, the bodies of

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-08 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 262922. zequanwu added a comment. use `ConstStmtVisitor` to do recursive lookup for call expression. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://reviews.llvm.org/D79121 Files: clang/include/clang/Basic/Attr.td clang/includ

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-05-08 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 262933. zequanwu marked an inline comment as done. zequanwu added a comment. update comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78659/new/ https://reviews.llvm.org/D78659 Files: llvm/docs/LangRef.rst llvm/include/llvm/Bitcode/LLVMBi

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-08 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 262971. zequanwu marked an inline comment as done. zequanwu added a comment. use `ConstEvaluatedExprVisitor` to recursively looking up for call expr CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://reviews.llvm.org/D79121 Files:

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-05-08 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 262977. zequanwu added a comment. add `nomerge` case in `CodeExtractor.cpp` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78659/new/ https://reviews.llvm.org/D78659 Files: llvm/docs/LangRef.rst llvm/include/llvm/Bitcode/LLVMBitCodes.h llvm/i

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-05-12 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1305 +if (const auto *CB1 = dyn_cast(I1)) + if (CB1->cannotMerge()) +return Changed; rnk wrote: > It seems inconsiste

[PATCH] D79895: Fix warning about using uninitialized variable as function const reference parameter

2020-05-13 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: rsmith, rnk. zequanwu added a project: clang. Herald added a subscriber: cfe-commits. bug filed here: https://bugs.llvm.org/show_bug.cgi?id=45624 Uninitialized variable as function const reference parameter should be use. Repository: r

[PATCH] D79895: Fix warning about using uninitialized variable as function const reference parameter

2020-05-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 264076. zequanwu added a comment. Add new warning as subgroup of `Uninitialized`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79895/new/ https://reviews.llvm.org/D79895 Files: clang/include/clang/Analysis/Analyses/UninitializedValues.h clang

[PATCH] D79895: Fix warning about using uninitialized variable as function const reference parameter

2020-05-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 264129. zequanwu added a comment. Use another mapvector `constRefUses` to store uninitialized const reference uses so that the new warning can be easily disable by `-Wno-initialized-const-reference` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 264300. zequanwu added a comment. Since the new warning is controlled by `-Wuninitialized`, I disabled it in existing test case and added a separate test case for `-Wuninitialized-const-reference`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D798

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://reviews.llvm.org/D79121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D80153: [AST] Mangle LambdaContextDecl for top level decl

2020-05-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: CaseyCarter, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. Bug filed here: https://bugs.llvm.org/show_bug.cgi?id=45213 To resolve it, we could mangle the `LambdaContextDecl` if it is top level decl. Reposito

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:1518 UsesMap uses; + UsesMap constRefUses; rnk wrote: > If possible, it would be nice to avoid having a second map. I use second map to let the new warning be orthogonal to

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:1518 UsesMap uses; + UsesMap constRefUses; rsmith wrote: > zequanwu wrote: > > rnk wrote: > > > If possible, it would be nice to

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 264976. zequanwu marked 3 inline comments as done. zequanwu added a comment. Fix typo. Diagnose self-init warning if the self-init variable is used as const reference later. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79895/new/ https://reviews.

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added a comment. In D79895#2042992 , @xbolva00 wrote: > Can you provide some compile time data with warning enabled/disabled? I compiled the test case with warning enabled and disabled. Since it is con

[PATCH] D80153: [AST] Mangle LambdaContextDecl for top level decl

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:950-952 // If the context of a closure type is an initializer for a class - // member (static or nonstatic), it is encoded in a qualified n

[PATCH] D80153: [AST] Mangle LambdaContextDecl for top level decl

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:950-952 // If the context of a closure type is an initializer for a class - // member (static or nonstatic), it is encoded in a qualified n

[PATCH] D128830: [Pipelines] Introduce DAE after ArgumentPromotion

2022-08-29 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. It's causing chromium test failure. [ RUN ] PartitionAllocPCScanTest.StackScanning ../../base/allocator/partition_allocator/starscan/pcscan_unittest.cc:682: Failure Value of: IsInFreeList(root().ObjectToSlotStart(dangling_reference)) Actual: true Expect

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-11-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:607 +// compiler has broken. +assert((!StartLoc || StartLoc->isValid()) && "Start location is not valid"); +assert((!EndLoc || EndLoc->isValid()) && "End location is not valid"); ---

[PATCH] D138846: MC/DC in LLVM Source-Based Code Coverage: LLVM back-end and compiler-rt

2023-11-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D138846#4657175 , @hans wrote: > We're seeing crashes in `initializeValueProfRuntimeRecord` that bisects to > this commit. I think Zequan is investigating: > https://bugs.chromium.org/p/chromium/issues/detail?id=1503919 It

[PATCH] D138846: MC/DC in LLVM Source-Based Code Coverage: LLVM back-end and compiler-rt

2023-11-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D138846#4657194 , @alanphipps wrote: > In D138846#4657193 , @zequanwu > wrote: > >> In D138846#4657175 , @hans wrote: >> >>> We're seeing cr

[PATCH] D138846: MC/DC in LLVM Source-Based Code Coverage: LLVM back-end and compiler-rt

2023-11-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D138846#4657195 , @zequanwu wrote: > In D138846#4657194 , @alanphipps > wrote: > >> In D138846#4657193 , @zequanwu >> wrote: >> >>> In D1388

[PATCH] D121736: Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO

2022-03-23 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Herald added a subscriber: pmatos. Hi, this causes crash on Mac building bot. Here is the reduced repro: `opt -lower-global-dtors /tmp/reduced.ll -o /dev/null ` $ cat /tmp/reduced.ll %struct.mach_header = type { i32, i32, i32, i32, i32, i32, i32 } @__dso_handle

[PATCH] D121269: [clang-format] Fix namepsace format when the name is after by a macro

2022-03-08 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: thakis, MyDeveloperDay, owenpan, klimek, sammccall. Herald added a project: All. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Example: $ cat a.cpp namespace my_names

[PATCH] D121269: [clang-format] Fix namespace format when the name is followed by a macro

2022-03-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 414149. zequanwu marked an inline comment as done. zequanwu added a comment. Add a test for `namespace A B {`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121269/new/ https://reviews.llvm.org/D121269 Files:

[PATCH] D121269: [clang-format] Fix namespace format when the name is followed by a macro

2022-03-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp:192 "}")); + EXPECT_EQ("#define M(x) x##x\n" +"namespace A M(x) {\n" zequanwu wrote: > curdeius wrote: > > MyDeveloperDay wrote: > >

[PATCH] D121269: [clang-format] Fix namespace format when the name is followed by a macro

2022-03-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 414222. zequanwu marked 2 inline comments as done. zequanwu added a comment. Refactor. Add a test for `namespace A __attribute__((availability(macos, introduced=10.15))) {`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D121269: [clang-format] Fix namespace format when the name is followed by a macro

2022-03-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 414442. zequanwu marked 7 inline comments as done. zequanwu added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121269/new/ https://reviews.llvm.org/D121269 Files: clang/lib/For

[PATCH] D121269: [clang-format] Fix namespace format when the name is followed by a macro

2022-03-10 Thread Zequan Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd54c4df31470: [clang-format] Fix namespace format when the name is followed by a macro (authored by zequanwu). Changed prior to commit: https://reviews.llvm.org/D121269?vs=414442&id=414506#toc Reposito

[PATCH] D121678: [pseudo] Split greatergreater token.

2022-03-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. This fails on windows bot at https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8819402935494502225/+/u/package_clang/stdout?format=raw. C:\b\s\w\ir\cache\builder\src\third_party\llvm\clang-tools-extra\pseudo\unittests\TokenTest.cpp(190): error: Valu

[PATCH] D130210: [SemaCXX] Set promotion type for enum bool to integer type.

2022-07-20 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: hans, aaron.ballman. Herald added a project: All. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. EnumDecl's promotion type is set either to the parsed type or calculated ty

[PATCH] D130210: [SemaCXX] Set promotion type for enum bool to integer type.

2022-07-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 446551. zequanwu marked 2 inline comments as done. zequanwu added a comment. - Address comment. - Move test to `clang/test/CXX/conv/conv.prom/p4.cpp`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130210/new/

[PATCH] D130210: [SemaCXX] Set promotion type for enum bool to integer type.

2022-07-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. > I am curious that this does not change the test results of > `clang/test/CXX/conv/conv.prom/p4.cpp` The crash only happens when the enum is bool and has no definition. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13021

[PATCH] D130210: [SemaCXX] Set promotion type for enum if its type is promotable to integer type even if it has no definition.

2022-07-21 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd870a575631d: [SemaCXX] Set promotion type for enum if its type is promotable to integer type… (authored by zequanwu). Changed prior to commit: ht

[PATCH] D130210: [SemaCXX] Set promotion type for enum if its type is promotable to integer type even if it has no definition.

2022-07-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D130210#3669464 , @aaron.ballman wrote: > LGTM, though you should add a release note to clang/docs/ReleaseNotes.rst for > the bug fix. Thank you! Added a release note. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D80409: [MS ABI] Add mangled type for auto template parameter whose argument kind is Integeral

2020-09-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 29. zequanwu marked 2 inline comments as done. zequanwu retitled this revision from "[MS ABI] Add mangled type for auto template parameter whose argument kind is Integeral " to "[MS ABI] Add mangled type for auto template parameter whose argument kind is

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291118. zequanwu added a comment. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. - Address comment. - Add cl::opt to disable emitting skipped regions for empty lines and comments (used on test case only), and update test cases under

[PATCH] D80409: [MS ABI] Add mangled type for auto template parameter whose argument kind is Integeral

2020-09-11 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291331. zequanwu added a comment. Add check for MSVC version 19.14 (removed `AutoParmTemplate auto_bool` as its mangled name conflicts with `AutoParmTemplate<0> auto_int` in V19.14). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D80409: [MS ABI] Add mangled type for auto template parameter whose argument kind is Integeral

2020-09-11 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291355. zequanwu added a comment. update comment. add a test case for template function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80409/new/ https://reviews.llvm.org/D80409 Files: clang/include/clang/B

[PATCH] D80409: [MS ABI] Add mangled type for auto template parameter whose argument kind is Integeral

2020-09-11 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu closed this revision. zequanwu added a comment. committed here https://reviews.llvm.org/rG83286a1a8f059d1664b64341854676a36a85cecd. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80409/new/ https://reviews.llvm.org/D80409

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291619. zequanwu added a comment. If the operand of CXXTypeidExpr is already most derived object, no need to look up vtable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87425/new/ https://reviews.llvm.org/D

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D87425#2265523 , @hans wrote: > I'm not sure that changing isPotentiallyEvaluated() is the right thing to do. > The meaning of that corresponds to text in the standard: > https://eel.is/c++draft/expr.typeid#3 so changing it t

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291630. zequanwu added a comment. Rename option EmptyLineCoverage to EmptyLineCommentCoverage and mark it cl::Hidden. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D84988

[PATCH] D87648: [Coverage][NFC] Remove skipped region after added into MappingRegions

2020-09-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added a reviewer: vsk. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. There is no need to scan through all SkippedRegions when some of them are already added into MappingRegions. Reposit

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291988. zequanwu added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87425/new/ https://reviews.llvm.org/D87425 Files: clang/include/clang/AST/ExprCXX.h clang/lib/AST/ExprCXX.c

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked 4 inline comments as done. zequanwu added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx2a.cpp:312 // expected-note@+1 {{typeid applied to object 'extern_b2' whose dynamic type is not constant}} - static_assert(&typeid(extern_b2) == &

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-15 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. zequanwu marked an inline comment as done. Closed by commit rGf975ae4867d1: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time (authored by zequa

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 292017. zequanwu added a comment. reopen the diff and update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-16 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGebf267b87d4b: [Sema][MSVC] warn at dynamic_cast/typeid when /GR- is given (authored by zequanwu). Changed prior to commit: https://reviews.llvm.or

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Friendly ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D84988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D84988#2282849 , @vsk wrote: > @zequanwu FTR, I don't have any outstanding concerns (I understand you might > be asking for a second reviewer to chime in though). Thanks for reviewing. Then, I think it might be ready to land.

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-21 Thread Zequan Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9caa3fbe03f4: [Coverage] Add empty line regions to SkippedRegions (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://r

[PATCH] D87648: [Coverage][NFC] Remove skipped region after added into MappingRegions

2020-09-28 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu abandoned this revision. zequanwu added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:353 +SkippedRanges.erase( +std::remove_if( +SkippedRanges.begin(), SkippedRanges.end(), vsk wrote: > In the worst case,

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 286622. zequanwu added a comment. Add a wrapped segment at location of zero-length segment with last pushed region count. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D849

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:483 bool GapRegion = CR.value().Kind == CounterMappingRegion::GapRegion; if (CR.index() + 1 == Regions.size() || vsk wrote: > zequanwu wrote: > > vsk wro

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 286688. zequanwu added a comment. minor fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D84988 Files: clang/include/clang/Lex/Lexer.h clang/include/clang/Lex/Preproc

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added a reviewer: hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D86369 Files: clang/include/clang/Basic/DiagnosticS

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/SemaCXX/ms_dynamic_cast.cpp:16 +B *b = new D1(); +auto d = dynamic_cast(b); // expected-warning{{should not use dynamic_cast with /GR-}} +} lebedev.ri wrote: > I'm not sure it makes sense to talk abo

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-25 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 287835. zequanwu added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/incl

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-26 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 288062. zequanwu marked 3 inline comments as done. zequanwu added a comment. Address cmments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files: clang/include/cl

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-26 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/SemaCXX/ms_no_dynamic_cast.cpp:1 +// RUN: %clang_cl %s /GR- -fsyntax-only 2>&1 | FileCheck %s + hans wrote: > When using %clang_cl, the source file should always come after a "--", > otherwise if for example

[PATCH] D85176: [Coverage] Enable emitting gap area between macros

2020-08-26 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu reopened this revision. zequanwu added a comment. This revision is now accepted and ready to land. Here is a repro of crash caused by this change. int k, l; #define m(e) e##e void p() { int kk,ll; if (k) m(k); else l = m(l); } `SM.getExpansLoc(AfterLoc)`

[PATCH] D85176: [Coverage] Enable emitting gap area between macros

2020-08-27 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D85176#2241257 , @phosek wrote: > We started seeing assertion failure after rolling a toolchain that contains > this change and `git bisect` identified this change. I have filed a bug with > a reproducer as PR47324. It has b

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-27 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:895 + if (!Self.getLangOpts().RTTIData) { +bool isMSVC = Self.getDiagnostics().getDiagnosticOptions().getFormat() == + DiagnosticOptions::MSVC; hans wrote: > I'm not sur

<    1   2   3   4   5   >