[PATCH] D155858: Add a concept AST node.

2023-08-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a subscriber: aaron.ballman. hokein added a comment. adding @aaron.ballman, who might have opinion on this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155858/new/ https://reviews.llvm.org/D155858 ___

[PATCH] D157434: [include-cleaner] Add a simple heuristic to handle token-pasting symbols.

2023-08-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang-tools-extra. include-cleaner didn't report the usage of token-pasting symbols, as these symbols are spelled in a "scratch space" fil

[PATCH] D157296: [AST][Coroutine] Fix CoyieldExpr missing end loc

2023-08-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Sema/SemaCoroutine.cpp:322 + auto EndLoc = Args.empty() ? Loc : Args.back()->getEndLoc(); + return S.BuildCallExpr(nullptr, Result.get(), Loc, Args, EndLoc, nullptr); } aaron.ballman wrote: > hokein wrote: >

[PATCH] D157296: [AST][Coroutine] Fix CoyieldExpr missing end loc

2023-08-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for exploring all the options. For case 1) > Note that CXXMemberCallExpr 0x55d106716260 > relies on > RParenLoc directly. Coroutine is implemented as member call so I think RParen > is intended and should exist and be correct. Yeah, I think this is because we do

[PATCH] D157296: [AST][Coroutine] Fix CoyieldExpr missing end loc

2023-08-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Sema/SemaCoroutine.cpp:322 + auto EndLoc = Args.empty() ? Loc : Args.back()->getEndLoc(); + return S.BuildCallExpr(nullptr, Result.get(), Loc, Args, EndLoc, nullptr); } Thanks for the fast fix. Reading the s

[PATCH] D157195: [Clang] Fix the do while statement disappearing in AST when an error occurs in the conditional expression of the do while statement

2023-08-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. thanks, looks good. Comment at: clang/test/SemaCXX/constexpr-function-recovery-crash.cpp:81 +constexpr int test13() { do {} while (a < 10); return 0; } // expected-error

[PATCH] D156650: [clangd] Respect IWYU keep pragma for standard headers.

2023-07-31 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D156650#4545867 , @kadircet wrote: > also we should get this cherry-picked too. `keep` pragmas on includes are not > common, but people do have export pragmas often enough to cause some > annoyance here. Filed https://github.

[PATCH] D156648: [Tooling/Inclusion] Add std::range symbols in the mapping.

2023-07-31 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D156648#4545863 , @kadircet wrote: > can you also create a cherry-pick request for this patch once it lands? Filed https://github.com/llvm/llvm-project/issues/64261. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D156650: [clangd] Respect IWYU keep pragma for standard headers.

2023-07-31 Thread Haojian 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 rGdcb28244faa8: [clangd] Respect IWYU keep pragma for standard headers. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D156650: [clangd] Respect IWYU keep pragma for standard headers.

2023-07-31 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 545589. hokein marked an inline comment as done. hokein added a comment. address review comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156650/new/ https://reviews.llvm.org/D156650 Files: clang-tools-ex

[PATCH] D156648: [Tooling/Inclusion] Add std::range symbols in the mapping.

2023-07-31 Thread Haojian 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 rG171868dc2cd6: [Tooling/Inclusion] Add std::range symbols in the mapping. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D156650: [clangd] Respect IWYU keep pragma for standard headers.

2023-07-31 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. see the issue https://github.com

[PATCH] D156648: [Tooling/Inclusion] Add std::range symbols in the mapping.

2023-07-31 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Fixes https://github.com/llvm/llvm-project/issues/64191 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D156648

[PATCH] D155816: [Tooling/Inclusion] Make the Recognizer work for C99 code.

2023-07-25 Thread Haojian 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 rGe93cbd18c112: [Tooling/Inclusion] Make the Recognizer work for C99 code. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D155984: [Sema][ObjC] Invalidate BlockDecl with invalid ParmVarDecl

2023-07-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. thanks, the fix looks reasonable to me Comment at: clang/test/AST/ast-dump-recovery.m:22 +// CHECK-NEXT: `-BlockDecl {{.*}} invalid +int (^a)(int, int) = ^(int, undefine b)

[PATCH] D155985: [clang][ASTDumper] Remove redundant dump of BlockDecl's ParmVarDecl

2023-07-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. thanks for the fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155985/new/ https://reviews.llvm.org/D155985

[PATCH] D155396: [Sema][ObjC] Invalidate BlockDecl with invalid return expr & its parent BlockExpr

2023-07-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. thanks, looks good to me. Comment at: clang/test/AST/ast-dump-recovery.m:24 +// CHECK-NEXT: | `-BlockDecl {{.*}} invalid +int (^a)() = ^() { + return c;

[PATCH] D155396: [Sema][ObjC] Propagating value-dependent errors into BlockExpr

2023-07-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. thanks! Comment at: clang/lib/Sema/SemaStmt.cpp:3736 +BlockDecl *BD = CurBlock->TheDecl; +if (!BD->isInvalidDecl() && RetValExp && RetValExp->containsErrors()) + BD->setInvalidDecl(); nit: the `isInvalidDecl` check is not ne

[PATCH] D154471: [clang] Add serialization support for the DynamicAllocLValue variant of APValue::LValueBase::Ptr

2023-07-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Thanks, looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154471/new/ https://reviews.llvm.org/D154471 __

[PATCH] D155421: [clangd] Add BlockEnd comments for control flow statements

2023-07-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Thanks, this looks like in a good shape. I left comments with some thoughts and nits, but they're not blockers, feel free to land it. Comment at: clang-tools-extra/clangd/In

[PATCH] D155816: [Tooling/Inclusion] Make the Recognizer work for C99 code.

2023-07-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. C99 is the the earliest C version provided by the language opt. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D

[PATCH] D155396: [Sema][ObjC] Propagating value-dependent errors into BlockExpr

2023-07-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Comment at: clang/lib/Sema/SemaExpr.cpp:16749-16753 + bool ContainsError = llvm::any_of(BSI->Returns, [](const ReturnStmt *Return) { +const auto *RetValExpr = Return->getRetValue(); +return RetValExpr && RetValExpr->containsErrors(); + }); +

[PATCH] D155173: [clangd] Refine the workflow for diagnostic Fixits.

2023-07-18 Thread Haojian 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 rGf4f6c229bde8: [clangd] Refine the workflow for diagnostic Fixits. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D155173: [clangd] Refine the workflow for diagnostic Fixits.

2023-07-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 541546. hokein marked 2 inline comments as done. hokein added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155173/new/ https://reviews.llvm.org/D155173 Files: clang-tools-extra/cl

[PATCH] D155173: [clangd] Refine the workflow for diagnostic Fixits.

2023-07-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 541481. hokein added a comment. more cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155173/new/ https://reviews.llvm.org/D155173 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-tools-extra/

[PATCH] D155173: [clangd] Refine the workflow for diagnostic Fixits.

2023-07-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 541480. hokein marked an inline comment as done. hokein added a comment. address comments - introduce `DiagKey` for the caching map - get rid of extra index conversion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D155195: [include-cleaner] Avoid a caching issue when running --edit mode on multiple files.

2023-07-18 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbe861b64d941: [include-cleaner] Avoid a caching issue when running --edit mode on multiple… (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D155195?vs=539988&id=541449#toc Repos

[PATCH] D155173: [clangd] Refine the workflow for diagnostic Fixits.

2023-07-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 541391. hokein added a comment. cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155173/new/ https://reviews.llvm.org/D155173 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-tools-extra/clang

[PATCH] D155173: [clangd] Refine the workflow for diagnostic Fixits.

2023-07-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 541389. hokein marked 2 inline comments as done. hokein added a comment. add LSPServer cache back and repurpose for lsp <=> naive diagnostic mapping, per offline discussion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D155173: [clangd] Refine the workflow for diagnostic Fixits.

2023-07-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:671 + // FIMXE: this is tricky + llvm::StringRef(LSPDiag.Message) + .starts_with_insensitive(Diag.Message)) hokein wrote: > kadircet wro

[PATCH] D155173: [clangd] Refine the workflow for diagnostic Fixits.

2023-07-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 541129. hokein added a comment. Use the mainMessage to find the corresponding ClangdServer diagnostics. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155173/new/ https://reviews.llvm.org/D155173 Files: clang-

[PATCH] D155173: [clangd] Refine the workflow for diagnostic Fixits.

2023-07-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:671 + // FIMXE: this is tricky + llvm::StringRef(LSPDiag.Message) + .starts_with_insensitive(Diag.Message)) kadircet wrote: > this is tr

[PATCH] D155173: [clangd] Refine the workflow for diagnostic Fixits.

2023-07-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 541009. hokein marked an inline comment as done. hokein added a comment. address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155173/new/ https://reviews.llvm.org/D155173 Files: clang-tools-

[PATCH] D153617: [clangd] Fix an assertion failure in NamedDecl::getName during the prepareRename

2023-07-14 Thread Haojian 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 rG5649b24c48ab: [clangd] Fix an assertion failure in NamedDecl::getName during the prepareRename (authored by hokein). Repository: rG LLVM Github Mo

[PATCH] D155195: [include-cleaner] Avoid a caching issue when running --edit mode on multiple files.

2023-07-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang-tools-extra. Snapshot all analysing files before running the tool, this makes sure that we analyse all files statelessly and avoid t

[PATCH] D155173: [clangd] Refine the workflow for diagnostic Fixits.

2023-07-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. - Remove the diagnostic fixits m

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-13 Thread Haojian 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. hokein marked an inline comment as done. Closed by commit rG85c6d57eb304: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header. (authored by ho

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang/lib/Tooling/Inclusions/HeaderIncludes.cpp:369-370 + QuotedName, /*CheckMainHeader=*/!MainIncludeFound); + if (Priority == 0) +MainIncludeFound = true; auto CatOffset = CategoryEn

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 539506. hokein added a comment. Make the MainFileFound stateless. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154963/new/ https://reviews.llvm.org/D154963 Files: clang-tools-extra/clangd/unittests/IncludeCl

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 539481. hokein marked 2 inline comments as done. hokein added a comment. Herald added a subscriber: arphaman. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154963/new/ https://reviews.llvm.org/D

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: sammccall, kadircet. Herald added a project: All. hokein requested review of this revision. Herald added projects: clang, clang-tools-extra. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D154963 Files: clang-tools-extra/inc

[PATCH] D154950: [include-cleaner] Fix the `fixIncludes` API not respect main-file header.

2023-07-11 Thread Haojian 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 rG7f3d2cd7ec25: [include-cleaner] Fix the `fixIncludes` API not respect main-file header. (authored by hokein). Repository: rG LLVM Github Monorepo

[PATCH] D154950: [include-cleaner] Fix the `fixIncludes` API not respect main-file header.

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp:303 - EXPECT_EQ(fixIncludes(Results, Code, format::getLLVMStyle()), R"cpp( + EXPECT_EQ(fixIncludes(Results, "d.cc", Code, format::getLLVMStyle()), +R"cpp(#include "d.h"

[PATCH] D154950: [include-cleaner] Fix the `fixIncludes` API not respect main-file header.

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 539045. hokein added a comment. add a testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154950/new/ https://reviews.llvm.org/D154950 Files: clang-tools-extra/include-cleaner/include/clang-include-cleane

[PATCH] D154950: [include-cleaner] Fix the `fixIncludes` API not respect main-file header.

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang-tools-extra. The fixIncludes was using the `input` as the main file path, this will results in inserting header at wrong places. We

[PATCH] D154471: [clang] Add serialization support for the DynamicAllocLValue variant of APValue::LValueBase::Ptr

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I gave it a try, here is a testcase that triggers the crash // clang -cc1 -emit-pch -o /tmp/t.pch /tmp/t.cpp #ifndef HEADER #define HEADER struct A { int *p; }; const A &w = A{ new int(10) }; #endif Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D154471: [clang] Add serialization support for the DynamicAllocLValue variant of APValue::LValueBase::Ptr

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I believe the fix is correct. Though the fix has been verified by a real-world example, I think it would be nice to get a reproducible testcase. Looking at the stacktrace: - the crash occurs during the pch deserialization - and we miss handling the case where LValue base

[PATCH] D154861: [clang][AST] Propagate the contains-errors bit to DeclRefExpr from VarDecl's initializer.

2023-07-11 Thread Haojian 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 rG9ca395b5ade1: [clang][AST] Propagate the contains-errors bit to DeclRefExpr from VarDecl's… (authored by hokein). Changed prior to commit: https:/

[PATCH] D154861: [clang][AST] Propagate the contains-errors bit to DeclRefExpr from VarDecl's initializer.

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 538929. hokein marked 2 inline comments as done. hokein added a comment. address comments and add release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154861/new/ https://reviews.llvm.org/D154861 Files:

[PATCH] D154861: [clang][AST] Propagate the contains-errors bit to DeclRefExpr from VarDecl's initializer.

2023-07-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: aaron.ballman, shafik, sammccall. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Similar to the https://reviews.llvm.org/D86048 (it only sets the bit for C++ code), we propagate the contain

[PATCH] D153296: [AST] Stop evaluate constant expression if the condition expression which in switch statement contains errors

2023-07-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D153296#4480141 , @yronglin wrote: > In D153296#4479718 , @hokein wrote: > >> Thanks, this looks good. > > Thanks for your review! I don't know why the reversion status still `Needs > R

[PATCH] D153296: [AST] Stop evaluate constant expression if the condition expression which in switch statement contains errors

2023-07-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. Thanks, this looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153296/new/ https://reviews.llvm.org/D153296 ___ cfe-commits mailing list cfe

[PATCH] D153740: [llvm][Support] Deprecate llvm::writeFileAtomically API

2023-07-06 Thread Haojian 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. hokein marked an inline comment as done. Closed by commit rG7aafea001282: [llvm][Support] Deprecate llvm::writeFileAtomically API (authored by hokein). Repository: r

[PATCH] D153340: [include-cleaner] Add an IgnoreHeaders flag to the command-line tool.

2023-07-06 Thread Haojian 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 rG507d766d76d8: [include-cleaner] Add an IgnoreHeaders flag to the command-line tool. (authored by hokein). Changed prior to commit: https://reviews

[PATCH] D153340: [include-cleaner] Add an IgnoreHeaders flag to the command-line tool.

2023-07-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:231 + } + return [FilterRegs](llvm::StringRef Path) { +llvm::errs() << "Path: " << Path << "\n"; kadircet wrote: > `FilterRegs=std::move(FilterRegs)` and dro

[PATCH] D153340: [include-cleaner] Add an IgnoreHeaders flag to the command-line tool.

2023-07-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 537631. hokein marked 5 inline comments as done. hokein added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153340/new/ https://reviews.llvm.org/D153340 Files: clang-tools-extra/cl

[PATCH] D153296: [AST] Stop evaluate constant expression if the condition expression which in switch statement contains errors

2023-07-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4921 + // value is. + if (isa(E)) +return false; aaron.ballman wrote: > hokein wrote: > > hokein wrote: > > > hokein wrote: > > > > yronglin wrote: > > > > > yronglin wrote: > > > > >

[PATCH] D154349: [include-cleaner] Add a signal to down-rank exporting headers

2023-07-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154349/new/ https://reviews.llvm.org/D154349

[PATCH] D154477: [include-cleaner] Ignore the layering-violation errors for the standalone tool

2023-07-05 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG67e94c9dc8ff: [include-cleaner] Ignore the layering-violation errors for the standalone tool (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D154477?vs=537240&id=537292#toc Repo

[PATCH] D153296: [AST] Stop evaluate constant expression if the condition expression which in switch statement contains errors

2023-07-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4921 + // value is. + if (isa(E)) +return false; yronglin wrote: > yronglin wrote: > > aaron.ballman wrote: > > > yronglin wrote: > > > > hokein wrote: > > > > > The constant evaluator

[PATCH] D154477: [include-cleaner] Ignore the layering-violation errors for the standalone tool

2023-07-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang-tools-extra. If the source code is compilable-but-layzering-violation, we still want the tool to be functional on it (rather than ba

[PATCH] D154473: [clang][Tooling] Add mapping for make_error_code

2023-07-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc:353 +// type. +SYMBOL(make_error_code, std::, /*no headers*/) nit: maybe add `m

[PATCH] D154434: [clang-tidy] Don't emit the whole spelling include header in include-cleaner diagnostic message

2023-07-04 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2444fb96435e: [clang-tidy] Don't emit the whole spelling include header in include-cleaner… (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D154434: [clang-tidy] Don't emit the whole spelling include header in include-cleaner diagnostic message

2023-07-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. hokein requested review of this revision. Herald added a subscriber: ilya-biryukov. Herald added a project:

[PATCH] D153340: [include-cleaner] Add an IgnoreHeaders flag to the command-line tool.

2023-07-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/include-cleaner/test/tool.cpp:17 +//RUN: clang-include-cleaner -print=changes %s --ignore-headers="foobar\.h,foo\.h" -- -I%S/Inputs/ | FileCheck --match-full-lines --allow-empty --check-prefix=IGNORE %s +// I

[PATCH] D153340: [include-cleaner] Add an IgnoreHeaders flag to the command-line tool.

2023-07-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 536998. hokein marked 10 inline comments as done. hokein added a comment. address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153340/new/ https://reviews.llvm.org/D153340 Files: clang-tools

[PATCH] D153296: [AST] Stop evaluate constant expression if the condition expression which in switch statement contains errors

2023-07-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the fix. Sorry for being late (I was looking through the emails and found this patch). Comment at: clang/lib/AST/ExprConstant.cpp:4921 + // value is. + if (isa(E)) +return false; The constant evaluator is not aware of t

[PATCH] D154329: [lldb] Replace llvm::writeFileAtomically with llvm::writeToOutput API.

2023-07-03 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2a579db32a7a: [lldb] Replace llvm::writeFileAtomically with llvm::writeToOutput API. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1543

[PATCH] D154329: [lldb] Replace llvm::writeFileAtomically with llvm::writeToOutput API.

2023-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154329/new/ https://reviews.llvm.org/D154329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[PATCH] D154329: [lldb] Replace llvm::writeFileAtomically with llvm::writeToOutput API.

2023-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: lldb/tools/lldb-server/lldb-platform.cpp:112 return Status("Failed to atomically write file %s", file_spec.GetPath().c_str()); return status; avl wrote: > probably, it would be better to add err

[PATCH] D154329: [lldb] Replace llvm::writeFileAtomically with llvm::writeToOutput API.

2023-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 536735. hokein marked an inline comment as done. hokein added a comment. address a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154329/new/ https://reviews.llvm.org/D154329 Files: lldb/tools/lldb-se

[PATCH] D153740: [llvm][Support] Deprecate llvm::writeFileAtomically API

2023-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added a comment. Now this patch only contains the removal part of the API (I have cleaned all usages of `writeFileAtomically` API, except a remaining one in lldb https://reviews.llvm.org/D154329). Comment at: lldb/tools/lldb-ser

[PATCH] D153740: [llvm][Support] Deprecate llvm::writeFileAtomically API

2023-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 536698. hokein added a comment. Restrict the patch to only remove the writeFileAtomically API Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153740/new/ https://reviews.llvm.org/D153740 Files: llvm/include/llv

[PATCH] D154329: [lldb] Replace llvm::writeFileAtomically with llvm::writeToOutput API.

2023-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: avl, JDevlieghere. Herald added a project: All. hokein requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D154329 Files: l

[PATCH] D153741: [Tooling][Rewriter] Remove the redundant AtomicallyMovedFile Implementation.

2023-07-03 Thread Haojian 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 rG653920cb158b: [Tooling][Rewriter] Remove the redundant AtomicallyMovedFile Implementation. (authored by hokein). Repository: rG LLVM Github Monore

[PATCH] D153741: [Tooling][Rewriter] Remove the redundant AtomicallyMovedFile Implementation.

2023-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153741/new/ https://reviews.llvm.org/D153741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[PATCH] D153741: [Tooling][Rewriter] Remove the redundant AtomicallyMovedFile Implementation.

2023-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 536679. hokein added a comment. rebase and update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153741/new/ https://reviews.llvm.org/D153741 Files: clang/lib/Rewrite/Rewriter.cpp Index: clang/lib/Rewrite/Re

[PATCH] D154191: [LTO] Replace llvm::writeFileAtomically with llvm::writeToOutput API.

2023-06-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein closed this revision. hokein added a comment. committed in 6ecc6b1250b253816703cbca18af432b95fb4089 and dc6c8b8d1e357acf6440824afaf6b6547b34aeeb .

[PATCH] D154191: [LTO] Replace llvm::writeFileAtomically with llvm::writeToOutput API.

2023-06-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added a comment. Thanks for the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154191/new/ https://reviews.llvm.org/D154191 ___ cfe-commits mailing

[PATCH] D154191: [LTO] Replace llvm::writeFileAtomically with llvm::writeToOutput API.

2023-06-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. This is a patch split out from https://reviews.llvm.org/D153740. Comment at: llvm/lib/LTO/ThinLTOCodeGenerator.cpp:433 - if (E.Error == - llvm::atomic_write_error::failed_to_create_uniq_file) { -errs() << "Er

[PATCH] D154191: [LTO] Replace llvm::writeFileAtomically with llvm::writeToOutput API.

2023-06-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: jkorous, avl. Herald added subscribers: ormris, steven_wu, hiraditya, inglorion. Herald added a project: All. hokein requested review of this revision. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rG LLVM

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-30 Thread Haojian 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 rG1233e2e66831: [Support] Don't set "all_exe" mode by default for file written by llvm… (authored by hokein). Repository: rG LLVM Github Monorepo C

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D153652#4459489 , @jhenderson wrote: > The new test LGTM, albeit with one query: I assume `umask` sets some global > state. When the lit unit tests are running, do the tests within the same > process run sequentially, or are

[PATCH] D154068: [clangd] Don't show header for namespace decl in Hover

2023-06-29 Thread Haojian 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 rG21b6da35f1d5: [clangd] Don't show header for namespace decl in Hover (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D1540

[PATCH] D154068: [clangd] Don't show header for namespace decl in Hover

2023-06-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: VitaNuo. Herald added subscribers: kadircet, arphaman. Herald added a project: All. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. The header for namespace

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: llvm/unittests/Support/raw_ostream_test.cpp:525 + ASSERT_TRUE(Perms) << "should be able to get permissions"; + // Verify that writeToOutput doesn't set exe bit. + EXPECT_EQ(Perms.get(), llvm::sys::fs::all_read | llvm::sys::fs::all_writ

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 535712. hokein marked an inline comment as done. hokein added a comment. address the comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153652/new/ https://reviews.llvm.org/D153652 Files: llvm/lib/Support

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: llvm/unittests/Support/raw_ostream_test.cpp:500 + ASSERT_TRUE(!!Perms); + EXPECT_EQ(0, *Perms & llvm::sys::fs::all_exe); + jhenderson wrote: > hokein wrote: > > jhenderson wrote: > > > Here and below, rather than just c

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 535309. hokein added a comment. compare the file-permission bits in unittest Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153652/new/ https://reviews.llvm.org/D153652 Files: llvm/lib/Support/raw_ostream.cpp

[PATCH] D153882: [clangd] Always allow diagnostics from stale preambles

2023-06-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/ConfigYAML.cpp:137 Dict.handle("ClangTidy", [&](Node &N) { parse(F.ClangTidy, N); }); -Dict.handle("AllowStalePreamble", [&]

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D153652#4451292 , @jhenderson wrote: > The updated unit test is failing on Windows in the pre-merge checks. Please > investigate and fix as appropriate. Good catch, thanks. I have restricted the unittest to linux only, I thin

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 534917. hokein marked 2 inline comments as done. hokein added a comment. fix the test failures on windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153652/new/ https://reviews.llvm.org/D153652 Files: llvm

[PATCH] D153740: [llvm][Support] Deprecate llvm::writeFileAtomically API

2023-06-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D153740#4448408 , @avl wrote: > added @jkorous who originally added llvm::writeFileAtomically. > >> Let me know what you think about it -- I considered keeping the >> llvm::writeFileAtomically and migrating its underlying imple

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the comment. > unit test which checks llvm::writeOutput may be added to > raw_ostream_test.cpp. Let`s this test check the case when "all_exec" is not > set. i.e. that after default usage of llvm::writeOutput the resulting file > does not have "all_exec", whic

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 534507. hokein added a comment. address comments: - add unittest for llvm::writeToOutput API - refine the llvm-dwarfutil tool lit test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153652/new/ https://reviews.l

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the comments. In D153652#4447976 , @jhenderson wrote: > Is there anything that can be done to use gtest unit tests for this? The two > lit tests are useful, but the problem with them is that if they switch to > using

[PATCH] D153652: [llvm][Support] Don'tt set "all_exe" mode by default for file written by llvm::writeToOutput.

2023-06-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 534473. hokein added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153652/new/ https://reviews.llvm.org/D153652 Files: llvm/lib/Support/raw_ostream.cpp llvm/test/tools/llvm-dwarf

[PATCH] D153741: [Tooling][Rewriter] Remove the redundant AtomicallyMovedFile Implementation.

2023-06-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: avl. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Replace it with llvm::writeToOutput. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D153741 Files: clang/lib/Rewri

[PATCH] D153740: [llvm][Support] Deprecate llvm::writeFileAtomically API

2023-06-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Herald added a subscriber: JDevlieghere. Let me know what you think about it -- I considered keeping the `llvm::writeFileAtomically` and migrating its underlying implementation to `llvm::writeToOutput`, but it doesn't seem to worth, there are only 4 in-tree usages of thi

[PATCH] D153740: [llvm][Support] Deprecate llvm::writeFileAtomically API

2023-06-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: avl. Herald added subscribers: ormris, kadircet, arphaman, steven_wu, hiraditya. Herald added a project: All. hokein requested review of this revision. Herald added projects: clang, LLDB, LLVM, clang-tools-extra. Herald added subscribers: llvm-

  1   2   3   4   5   6   7   8   9   10   >