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

2020-08-27 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 288380. zequanwu marked an inline comment as done. 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/c

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

2020-08-28 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: > zequanwu wr

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

2020-08-31 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: > zequanwu wr

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

2020-08-31 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-08-31 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289047. zequanwu added a comment. update. 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/Preprocess

[PATCH] D85778: More accurately compute the ranges of possible values for +, -, *, &, %.

2020-09-01 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Hi, this change hits a false positive case in chromium build: https://bugs.chromium.org/p/chromium/issues/detail?id=1124085 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85778/new/ https://reviews.llvm.org/D85778 ___

[PATCH] D85778: More accurately compute the ranges of possible values for +, -, *, &, %.

2020-09-01 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D85778#2251173 , @rsmith wrote: > In D85778#2251160 , @zequanwu wrote: > >> Hi, this change seems like hits a false positive case in chromium build: >> https://bugs.chromium.org/p/chrom

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

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289582. zequanwu added a comment. Emit second segment as wrapped segment only when first segment is RegionEntry Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D84988 Files:

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

2020-09-02 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] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289603. zequanwu added a comment. warn at dynamic_cast like MSVC in clang-cl, but not in clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files: clang/include/

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

2020-09-02 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: > zequanwu wr

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

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289617. zequanwu added a comment. address comment. emit second segment when first segment is skipped and activeregions is not empty. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.ll

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

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:597 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] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:897 + DiagnosticOptions::MSVC; +if (isMSVC || !DestPointee->isVoidType()) + Self.Diag(OpRange.getBegin(), hans wrote: > I don't think the if-statement is necessary.

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

2020-09-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289769. 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/D86369/new/ https://reviews.llvm.org/D86369 Files: clang/include/cl

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

2020-09-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289802. zequanwu added a comment. address comment. 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/inclu

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

2020-09-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 rG3e782bf8090c: [Sema][MSVC] warn at dynamic_cast when /GR- is given (authored by zequanwu). Changed prior to commit: https://reviews.llvm.org/D8636

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

2020-09-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Thanks for reviewing. One last thing I need to resolve is to handle the coverage test case as skipped regions are emitted for empty lines, and haven't thought a good way other than adding checks for those new skipped regions. Repository: rG LLVM Github Monorepo CHA

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

2020-09-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: rsmith, hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. Bug: https://bugs.llvm.org/show_bug.cgi?id=47467 Repository: rG LLVM Github Monorepo https://reviews.llvm.

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

2020-09-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 290846. zequanwu added a comment. Remove unused field. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87425/new/ https://reviews.llvm.org/D87425 Files: clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-12-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 310619. zequanwu added a comment. Herald added a subscriber: steven_wu. - fix existing failed testcase. - add new testcases for npm and lpm. - add comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91673/n

[PATCH] D92800: [Clang] Add disable-merge function attribute which generates nomerge function attribute in IR

2020-12-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 310760. zequanwu added a comment. start a new diff to make nomerge attribute a function attribute as well as a statement attribute. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92800/new/ https://reviews.llv

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-12-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 rGb5216b295049: [PGO] Enable preinline and cleanup when optimize for size (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 311042. zequanwu marked an inline comment as done. zequanwu added a comment. Add test for virutal function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92800/new/ https://reviews.llvm.org/D92800 Files: cl

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/CodeGen/attr-nomerge.cpp:8 + [[clang::nomerge]] void f(); + [[clang::nomerge]] virtual void g(); + [[clang::nomerge]] static void f1(); rnk wrote: > Hm, virtual functions, there's something worth thinking

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/CodeGen/attr-nomerge.cpp:17 + +[[clang::nomerge]] bool bar() { + return true; rnk wrote: > I would leave this declaration as it was, so that all the statement attribute > test cases you wrote below remain a

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 311062. zequanwu marked an inline comment as done. zequanwu added a comment. Add docs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92800/new/ https://reviews.llvm.org/D92800 Files: clang/include/clang/AST

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/CodeGen/attr-nomerge.cpp:17 + +[[clang::nomerge]] bool bar() { + return true; rnk wrote: > zequanwu wrote: > > rnk wrote: > > > I would leave this declaration as it was, so that all the statement > > > attr

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 312078. zequanwu marked 4 inline comments as done. zequanwu added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92800/new/ https://reviews.llvm.org/D92800 Files: clang/include/c

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/CodeGen/attr-nomerge.cpp:73 +// CHECK-DAG: attributes #[[ATTR2]] = {{{.*}}nomerge{{.*}}} +// CHECK-DAG: attributes #[[ATTR3]] = {{{.*}}nomerge{{.*}}} aaron.ballman wrote: > Can you also add a test case to dem

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-16 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 312348. zequanwu marked 2 inline comments as done. zequanwu added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92800/new/ https://reviews.llvm.org/D92800 Files: clang/include/c

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-16 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:3438-3439 } + if (DeclOrStmt) +DiagList.push_back("statements"); } aaron.ballman wrote: > I think this will do the wrong thing when the subject list has

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-17 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 rGfb0f7288051e: [Clang] Make nomerge attribute a function attribute as well as a statement… (authored by zequanwu). Repository: rG LLVM Github Monor

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-11-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: xur, davidxl, rnk. Herald added subscribers: cfe-commits, wenlei. Herald added a project: clang. zequanwu requested review of this revision. This is intended to reduce the binary size of both phase 1 and phase 2 builds. By compiling chrome

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-11-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 305948. zequanwu added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. update wrong diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91673/new/ https://reviews.ll

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: EricWF, rnk, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. According to https://eel.is/c++draft/cpp.predefined#2.6, `__STDCPP_THREADS__` is a predefined macro.

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 306561. zequanwu added a comment. Add a test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/ https://reviews.llvm.org/D91747 Files: clang/include/clang/Frontend/FrontendOptions.h clang/lib/

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-20 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 306724. zequanwu added a comment. Herald added a subscriber: dexonsmith. Add ThreadModel to LangOptions and remove it from CodegenOption. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/ https://review

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-20 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 306777. zequanwu added a comment. Update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/ https://reviews.llvm.org/D91747 Files: clang/include/clang/Basic/CodeGenOptions.h clang/include/cla

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-20 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: clang/test/CXX/cpp/cpp.predefined/p2.cpp:1 +// RUN: %clang_cc1 %s -verify +// expected-no-diagnostics rnk wrote: > Let's expand on this: > - test that we don't set the macro wh

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-22 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 rG15a3ae1ab1a6: [Clang] Add __STDCPP_THREADS__ to standard predefine macros (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D91747#2423960 , @rnk wrote: > If we believe the standard says that the compiler is supposed to set > `__STDCPP_THREADS__`, then I think the libc++ #error needs to be adjusted. > libcxxabi, or any other client, should be able

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-11-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D91673#2401578 , @xur wrote: > This is probably OK for -Os (SizeLevel == 1), but we need to be careful with > Oz (SizeLevel == 2). > We already know that enabling preinliner in general will reduce size -- as > the preinliner

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-12-01 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 308810. zequanwu added a comment. - sync NPM with LPM. - use PreInlineThreshold flag value instead of hardcode number. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91673/new/ https://reviews.llvm.org/D91673

[PATCH] D92800: [Clang] Add disable-merge function attribute which generates nomerge function attribute in IR

2020-12-07 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: aaron.ballman, rnk. Herald added subscribers: dexonsmith, jdoerfert. zequanwu requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This adds `disable-merge` function att

[PATCH] D103293: [clang-cl] Bump default -fms-compatibility-version to 19.14

2021-05-27 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: mstorsjo, rnk. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. MSVC required version is 19.14 now (https://reviews.llvm.org/D92515). Update the default -fms-compatibility-ve

[PATCH] D103293: [clang-cl] Bump default -fms-compatibility-version to 19.14

2021-05-27 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 348438. zequanwu added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103293/new/ https://reviews.llvm.org/D103293 Files: clang/docs/ReleaseNotes.rst clang/lib/Driver/ToolChains/

[PATCH] D103293: [clang-cl] Bump default -fms-compatibility-version to 19.14

2021-05-27 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 rG59b8afe50274: [clang-cl] Bump default -fms-compatibility-version to 19.14 (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D91913: Suppress non-conforming GNU paste extension in all standard-conforming modes

2021-01-25 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. This change also breaks many chrome ToT bots(not just windows bot), example build: https://ci.chromium.org/ui/p/chrome/builders/ci/ToTLinuxOfficial/10524/steps?succeeded=true&debug=false Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D91913: Suppress non-conforming GNU paste extension in all standard-conforming modes

2021-01-25 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D91913#2520414 , @hvdijk wrote: > In D91913#2520399 , @zequanwu wrote: > >> This change also breaks many chrome ToT bots(not just windows bot), example >> build: >> https://ci.chromium

[PATCH] D95918: [Coverage] Propogate counter to condition of conditional operator

2021-02-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: vsk, rnk. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang usually propagates counter mapping region for conditions of `if`, `while`, `for`, etc from parent counter. We

[PATCH] D95918: [Coverage] Propogate counter to condition of conditional operator

2021-02-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. I tested it locally. They are all passed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95918/new/ https://reviews.llvm.org/D95918 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D95918: [Coverage] Propogate counter to condition of conditional operator

2021-02-03 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 rG4dc08cc3aa41: [Coverage] Propogate counter to condition of conditional operator (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D95918: [Coverage] Propogate counter to condition of conditional operator

2021-02-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D95918#2540367 , @vsk wrote: > How was the issue spotted? If there was a crash or an incorrect coverage bug > that's not triggered by one of the existing frontend tests, it'd be worth > adding a regression test. If the proble

[PATCH] D96092: [AST] Update LVal before evaluating lambda decl fields.

2021-02-04 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: rsmith, rnk. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. PR48582 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D96092 Files: clang/lib/AST/ExprCon

[PATCH] D96092: [AST] Update LVal before evaluating lambda decl fields.

2021-02-04 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 321617. zequanwu marked an inline comment as done. zequanwu added a comment. Remove comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96092/new/ https://reviews.llvm.org/D96092 Files: clang/lib/AST/Exp

[PATCH] D96092: [AST] Update LVal before evaluating lambda decl fields.

2021-02-04 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:10032-10033 + +// FIXME: Diagnostics here should point to the end of the initializer +// list, not the start. +if (!HandleLValueMember(Info, E, Subobject, Field, &Layout)) rsmi

[PATCH] D96092: [AST] Update LVal before evaluating lambda decl fields.

2021-02-04 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 rG96fb49c3ff8e: [AST] Update LVal before evaluating lambda decl fields. (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D110780: [clang] do not emit note for bad conversion when destination type qualifiers are not compatibly include source type qualifiers

2021-09-29 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: rsmith, hans. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. llvm.org/PR52014 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D110780 Files: clang/lib/

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

2021-09-29 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D85390#3031104 , @rsmith wrote: > Please see llvm.org/PR52014 -- this patch is not properly handling > cv-qualifiers. We should not produce the new note if the destination type has > qualifiers that the source type does not p

[PATCH] D110780: [clang] do not emit note for bad conversion when destination type qualifiers don't compatibly include source type qualifiers

2021-09-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 376299. zequanwu added a comment. Add a testcase that from and to type are differ and qualification are incompatible. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110780/new/ https://reviews.llvm.org/D110780

[PATCH] D110780: [clang] do not emit note for bad conversion when destination type qualifiers don't compatibly include source type qualifiers

2021-09-30 Thread Zequan Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdbaa40833693: [clang] do not emit note for bad conversion when destination type qualifiers… (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D96832: [Clang][Attributes] Allow not_tail_called attribute to be applied to virtual function.

2021-02-16 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: ahatanak, aaron.ballman, rnk. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. It would be beneficial to allow not_tail_called attribute to be applied to virtual functions. I

[PATCH] D96832: [Clang][Attributes] Allow not_tail_called attribute to be applied to virtual function.

2021-02-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D96832#2568257 , @aaron.ballman wrote: > It was explicitly disallowed in the initial patch: > https://reviews.llvm.org/D12922 and the original author said "I'm still > trying to figure out the best way to handle c++ virtual

[PATCH] D96832: [Clang][Attributes] Allow not_tail_called attribute to be applied to virtual function.

2021-02-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D96832#2569987 , @ahatanak wrote: > In D96832#2569481 , @zequanwu wrote: > >> In D96832#2568257 , @aaron.ballman >> wrote: >> >>> It was explici

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

2021-02-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 324695. zequanwu added a comment. Tested on clange stage2 build. 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 cl

[PATCH] D85176: [Coverage] Emit gap region after conditions when macro is present.

2021-02-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 324710. zequanwu marked 2 inline comments as done. zequanwu added a comment. - Added regression test. - Assert `getIncludeOrExpansionLoc(AfterLoc)` is valid. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85176/

[PATCH] D85176: [Coverage] Emit gap region after conditions when macro is present.

2021-02-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/CoverageMapping/if.cpp:10 +void foo() {// CHECK-NEXT: Gap,File 0, [[@LINE+1]]:21 -> [[@LINE+1]]:22 = #2 if (int j = true ? nop() // CHECK-NEXT: [[@LINE]]:22 -> [[@LINE]]:27 = #2

[PATCH] D85176: [Coverage] Emit gap region after conditions when macro is present.

2021-02-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Landed at https://github.com/llvm/llvm-project/commit/d83511dd26ca8d0dd5be6302ad7b55de05cedab2 (forgot to add the differential revision line). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85176/new/ https://reviews.llvm

[PATCH] D85176: [Coverage] Emit gap region after conditions when macro is present.

2021-02-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D85176#2572661 , @saugustine wrote: > This commit introduced an unused variable warning when built without asserts. > (CoverageMappingGen.cpp:984) I have fixed it with rG4544a63b7705 >

[PATCH] D97098: [Utils] Add an option to specify number of cores to use in creduce-clang-crash.py

2021-02-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: akhuang, thakis, rnk. zequanwu 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/D97098 Files: clang/utils/creduce-cl

[PATCH] D97101: [Coverage] Emit zero count gap region between statements if first statements contains return, throw, goto, co_return

2021-02-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: vsk, efriedma, rnk, pirama. Herald added a subscriber: lxfind. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This solves the problems that D85036

[PATCH] D97101: [Coverage] Emit zero count gap region between statements if first statements contains return, throw, goto, co_return

2021-02-22 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 325516. zequanwu added a comment. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. Rebase and fix runtime-counter-relocation.c > Do we have to revert D85036 in the same > patch in order to keep the

[PATCH] D97098: [Utils] Add an option to specify number of cores to use in creduce-clang-crash.py

2021-02-22 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 325520. zequanwu added a comment. Address comment, using `max(4, multiprocessing.cpu_count() / 2)` because `os.cpu_count` is not available in python2. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97098/new/

[PATCH] D97098: [Utils] Add an option to specify number of cores to use in creduce-clang-crash.py

2021-02-22 Thread Zequan Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb380699416d8: [Utils] Add an option to specify number of cores to use in creduce-clang-crash. (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D97101: [Coverage] Emit zero count gap region between statements if first statements contains return, throw, goto, co_return

2021-02-23 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 325947. zequanwu marked an inline comment as done. zequanwu added a comment. - Revert the deletion of completeDeferred in pushRegion. - Emit zero gap region only if OutCounter is different from parentCounter in whil, for statements. - Update test cases. Re

[PATCH] D97101: [Coverage] Emit zero count gap region between statements if first statements contains return, throw, goto, co_return

2021-02-23 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:593 MostRecentLocation = *StartLoc; - completeDeferred(Count, MostRecentLocation); } vsk wrote: > Does this mean a deferred gap region following a `break;` sta

[PATCH] D96832: [Clang][Attributes] Allow not_tail_called attribute to be applied to virtual function.

2021-02-24 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 326222. zequanwu marked 2 inline comments as done. zequanwu added a comment. Add a doc example and CodeGen testcase about `not_tail_called` being applied to method override in a derived class. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D104082: [CodeGen] Don't create a fake FunctionDecl when generating block/block_byref copy/dispose helper functions

2021-06-22 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Hi, this caused compiler crash on error "!dbg attachment points at wrong subprogram for function". So, I reverted it. I'm working on a reduced repro. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104082/new/ https://revi

[PATCH] D104082: [CodeGen] Don't create a fake FunctionDecl when generating block/block_byref copy/dispose helper functions

2021-06-23 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D104082#2835496 , @fhahn wrote: > In D104082#2835080 , @zequanwu > wrote: > >> Hi, this caused compiler crash with error "Assertion >> `cast(Scope)->describes(&MF->getFunction())' fa

[PATCH] D104058: ThinLTO: Fix inline assembly references to static functions with CFI

2021-06-23 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Hi, this caused compiler crash: "Assertion `materialized_use_empty() && "Uses remain when a value is destroyed!"'" on chromium build https://ci.chromium.org/ui/p/chromium/builders/try/linux-official/151/overview. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D104871: [Docs] use -fprofile-generate for IR PGO and -fprofile-instr-generate for code coverage

2021-06-24 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: rnk, vsk, davidxl, arphaman. Herald added a subscriber: wenlei. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add docs to specify `-fprofile-generate` for IR PGO and `-fp

[PATCH] D104871: [Docs] use -fprofile-generate for IR PGO and -fprofile-instr-generate for code coverage

2021-06-25 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 354615. zequanwu marked an inline comment as done. zequanwu added a comment. Update wording. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104871/new/ https://reviews.llvm.org/D104871 Files: clang/docs/Clan

[PATCH] D104871: [Docs] use -fprofile-generate for IR PGO and -fprofile-instr-generate for code coverage

2021-06-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 355718. zequanwu marked 4 inline comments as done. zequanwu added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104871/new/ https://reviews.llvm.org/D104871 Files: clang/docs/Cl

[PATCH] D96832: [Clang][Attributes] Allow not_tail_called attribute to be applied to virtual function.

2021-02-25 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 326484. zequanwu added a comment. Adopt Quuxplusone's phrasing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96832/new/ https://reviews.llvm.org/D96832 Files: clang/include/clang/Basic/AttrDocs.td clang/

[PATCH] D96832: [Clang][Attributes] Allow not_tail_called attribute to be applied to virtual function.

2021-02-25 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 rG4500f0a7321d: [Clang][Attributes] Allow not_tail_called attribute to be applied to virtual… (authored by z

[PATCH] D97101: [Coverage] Emit zero count gap region between statements if first statements contains return, throw, goto, co_return

2021-03-01 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:942 pushRegion(Counter::getZero()); -auto &ZeroRegion = getRegion(); -ZeroRegion.setDeferred(true); -LastTerminatedRegion = {EndLoc, RegionStack.size()}; +if (!HasTerminateSt

[PATCH] D97101: [Coverage] Emit zero count gap region between statements if first statements contains return, throw, goto, co_return

2021-03-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 327661. zequanwu marked an inline comment as done. zequanwu added a comment. - Deprecate deferred region. Use the notion of gap region inserted in VisitStmt to replace deferred region. - Emit gap region with OutCounter from last statement if exists. - Move t

[PATCH] D97101: [Coverage] Emit zero count gap region between statements if first statements contains return, throw, goto, co_return

2021-03-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/CoverageMapping/deferred-region.cpp:43 if (true) -return; // CHECK: Gap,File 0, [[@LINE]]:11 +return; else vsk wrote: > I'm confused by this change. Do we lose the gap here? I assumed it was nee

[PATCH] D97101: [Coverage] Emit gap region between statements if first statements contains terminate statements.

2021-03-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 327859. zequanwu added a comment. use itanium abi in terminate-statements.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97101/new/ https://reviews.llvm.org/D97101 Files: clang/lib/CodeGen/CoverageMappin

[PATCH] D97101: [Coverage] Emit gap region between statements if first statements contains terminate statements.

2021-03-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Thanks for reviewing. Comment at: clang/test/CoverageMapping/switch.cpp:62 default: // CHECK-NEXT: File 0, [[@LINE]]:3 -> [[@LINE+1]]:10 = #4 break; // CHECK-NEXT: Branch,File 0, [[@LINE-1]]:3 -> [[@LINE-1]]:10 = #4, (#0 - #4

[PATCH] D97101: [Coverage] Emit gap region between statements if first statements contains terminate statements.

2021-03-03 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 rG2d7374a0c680: [Coverage] Emit gap region between statements if first statements contains… (authored by zequanwu). Repository: rG LLVM Github Monor

[PATCH] D97101: [Coverage] Emit gap region between statements if first statements contains terminate statements.

2021-03-04 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D97101#2603321 , @thakis wrote: > This broke ContinuousSyncMode/basic.c in check-profile on macOS (see e.g. end > of > https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8853690069583264896/+/steps

[PATCH] D98295: [Clang] Add addrsig attribute to mark global functions/variables as address significant.

2021-03-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: pcc, aaron.ballman, rnk, rsmith. Herald added subscribers: dexonsmith, jdoerfert, hiraditya. zequanwu requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Functions or v

[PATCH] D98295: [Clang] Add addrsig attribute to mark global functions/variables as address significant.

2021-03-11 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 330099. zequanwu added a comment. Split clang change and IR change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98295/new/ https://reviews.llvm.org/D98295 Files: clang/include/clang/Basic/Attr.td clang/

[PATCH] D135340: [PGO] Make emitted symbols hidden

2022-10-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. This causing instrprof-darwin-dead-strip.c failed on mac. FAIL: Profile-x86_64 :: instrprof-darwin-dead-strip.c (1 of 238) TEST 'Profile-x86_64 :: instrprof-darwin-dead-strip.c' FAILED Script: -- : 'RUN: at line 4';

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-01 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: rnk, tejohnson, mehdi_amini. Herald added subscribers: pmatos, asb, ormris, steven_wu, hiraditya, arichardson, inglorion, sbc100, emaste. Herald added a reviewer: MaskRay. Herald added projects: lld-macho, All. Herald added a reviewer: lld-

[PATCH] D137287: [Test] Fix CHECK typo.

2022-11-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. Herald added subscribers: Moerafaat, zero9178, bzcheeseman, pmatos, asb, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, ThomasRaoux, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauhe

[PATCH] D137287: [Test] Fix CHECK typo.

2022-11-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 472833. zequanwu added a comment. Herald added subscribers: lldb-commits, nemanjai. Herald added projects: LLDB, clang-tools-extra, Flang. Fix more typos. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137287/ne

[PATCH] D137287: [Test] Fix CHECK typo.

2022-11-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D137287#3905474 , @probinson wrote: > Nice work! > have you verified that all the modified tests pass? naively it looks like > you'd need at least 3 different targets to run them all (windows, > webassembly, powerpc) Those

<    1   2   3   4   5   >