[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp:26 +// of the left and right statements. +const Expr *LHSExpr = llvm::dyn_cast(LHS); +const Expr *RHSExpr = llvm::dyn_cast(RHS); Eugene.Zelenko

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Tests locations were changed recently too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128372/new/ https://reviews.llvm.org/D128372 ___ cfe-commits mailing list

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please add documentation for check. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:121 +- New :doc:`bugprone-standalone-empty + ` check. + Path to documentation was changed recently. Comment at:

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp:26 +// of the left and right statements. +const Expr *LHSExpr = llvm::dyn_cast(LHS); +const Expr *RHSExpr = llvm::dyn_cast(RHS); `auto` could

[PATCH] D128406: clang: Tweak behaviour of warn_empty_while_body and warn_empty_if_body

2022-06-22 Thread Brad Moody via Phabricator via cfe-commits
bmoody created this revision. bmoody added reviewers: rnk, gribozavr. Herald added a project: All. bmoody requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Use the if/while statement right paren location instead of the end of the condition

[PATCH] D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics.

2022-06-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D128328#3603781 , @vsapsai wrote: > From the perspective of handling `err_export_inline_not_defined` error as a > developer what about the following option? > > export inline void fn_e(); // note: function 'fn_e' exported

[PATCH] D128351: [clang] missing outer template levels when checking template constraints

2022-06-22 Thread Sirui Mu via Phabricator via cfe-commits
Lancern updated this revision to Diff 439253. Lancern added a comment. Fix some regression issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128351/new/ https://reviews.llvm.org/D128351 Files: clang/lib/Sema/SemaConcept.cpp

[PATCH] D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics.

2022-06-22 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. From the perspective of handling `err_export_inline_not_defined` error as a developer what about the following option? export inline void fn_e(); // note: function 'fn_e' exported as 'inline' here // ... module :private; void fn_e() {} // error: definition

[PATCH] D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics.

2022-06-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:11155 +def err_export_inline_not_defined : Error< + "exported inline functions must be defined within the module purview" + " and before any private module fragment">;

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. > Supporting the lowering in the backend is sensible in order to support > -fexcess-precision=16, because I agree that the most reasonable IR output in > that configuration is to simply generate half operations. But under > -fexcess-precision=32, I do not want the

[PATCH] D127690: [NFC] clang/Parser: remove dead code

2022-06-22 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 439246. mizvekov added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127690/new/ https://reviews.llvm.org/D127690 Files: clang/lib/Parse/Parser.cpp Index: clang/lib/Parse/Parser.cpp

[PATCH] D128276: clang: perform deduction at the right depth on Sema::AddMethodTemplateCandidate

2022-06-22 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 439245. mizvekov added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128276/new/ https://reviews.llvm.org/D128276 Files: clang/lib/Sema/SemaOverload.cpp

[PATCH] D128095: clang: fix checking parameter packs for expansion

2022-06-22 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 439244. mizvekov added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128095/new/ https://reviews.llvm.org/D128095 Files: clang/include/clang/Sema/Sema.h

[PATCH] D127351: clang: fix early substitution of alias templates

2022-06-22 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 439241. mizvekov added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127351/new/ https://reviews.llvm.org/D127351 Files: clang/include/clang/Sema/Template.h

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-22 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi updated this revision to Diff 439240. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128402/new/ https://reviews.llvm.org/D128402 Files: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp clang-tools-extra/docs/ReleaseNotes.rst

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-22 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi updated this revision to Diff 439239. ishaangandhi added a comment. Include `error: ` in error line CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128402/new/ https://reviews.llvm.org/D128402 Files: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-22 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi updated this revision to Diff 439228. ishaangandhi added a comment. Check for error messages in test case CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128402/new/ https://reviews.llvm.org/D128402 Files: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp

[PATCH] D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`

2022-06-22 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier added a comment. Would it be better if I asked a colleague to finish the review? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112579/new/ https://reviews.llvm.org/D112579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-22 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi updated this revision to Diff 439226. ishaangandhi added a comment. Move test to new file with `-fix-errors` flag CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128402/new/ https://reviews.llvm.org/D128402 Files: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp

[PATCH] D128397: Add handling cases when filter(tid) appears with deafult(none)

2022-06-22 Thread Mike Rice 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 rGa35141d39501: [OpenMP] Add handling cases when filter(tid) appears with default(none) (authored by mdfazlay, committed by mikerice). Herald added a

[clang] a35141d - [OpenMP] Add handling cases when filter(tid) appears with default(none)

2022-06-22 Thread Mike Rice via cfe-commits
Author: Fazlay Rabbi Date: 2022-06-22T17:45:43-07:00 New Revision: a35141d395019c837d16419c6ef57662a6efefc5 URL: https://github.com/llvm/llvm-project/commit/a35141d395019c837d16419c6ef57662a6efefc5 DIFF: https://github.com/llvm/llvm-project/commit/a35141d395019c837d16419c6ef57662a6efefc5.diff

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-22 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi updated this revision to Diff 439221. ishaangandhi added a comment. Rebased CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128402/new/ https://reviews.llvm.org/D128402 Files: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-22 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. ishaangandhi requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. The clang-tidy check `bugprone-branch-clone` has

[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

2022-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:546 +void diagnoseUnwrapCall(const Expr *UnwrapExpr, const Expr *ObjectExpr, +DiagnoseState> ) { I think this should

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D127901#3603467 , @tra wrote: > I'm not sure I follow. WDYM by "go inside the binary itself" ? I assume you > mean the per-GPU offload binaries inside per-TU .o. so that it could be used > when that GPU object gets linked

[PATCH] D128363: [clang][dataflow] Implement functionality for flow condition variable substitution.

2022-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:197 + /// `Substitutions`, it will be substituted with the value it maps to. + BoolValue ( + AtomicBoolValue , Could you elaborate on why do

[PATCH] D128401: [Clang-tidy] Fixing a bug raising false alarms on static local variables in the Infinite Loop Checker

2022-06-22 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 created this revision. ziqingluo-90 added reviewers: NoQ, t-rasmud, usama54321, rsundahl, yln, kubamracek, krispy1994, jkorous, delcypher, chrisdangelo, thetruestblue, aaron.ballman, alexfh, gribozavr, njames93, LegalizeAdulthood. Herald added subscribers: carlosgalvezp,

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-22 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D127901#3603118 , @jhuber6 wrote: > In D127901#3603006 , @tra wrote: > >> Then we do need a knob controlling whether we do want to embed PTX or not. >> The default should be "off" IMO. >>

[PATCH] D128056: [clang][dataflow] Singleton pointer values for null pointers.

2022-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:69 +Res.first->second = +(std::make_unique(PointeeLoc)); + }

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5863 // FIXME: derive from "Target" ? - return WCharTy; + return IntTy; } rsmith wrote: > This change seems surprising. Can you explain what's going on here? Motivated by

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-22 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/Sema/SemaExprMember.cpp:1873-1877 +if (auto *PrivateCopy = +isOpenMPFDCaptureDecl(Field, Base.get(), IsArrow, OpLoc, , + /*TemplateKWLoc=*/SourceLocation(), Field, +

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-22 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 439195. jyu2 marked 7 inline comments as done. jyu2 retitled this revision from "Generate the capture for field when the field is used with implicit default." to "Generate the capture for field when the field is used in openmp region with implicit default in

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 439177. cor3ntin added a comment. - Add a comment referencing the (to be) C++ wording and unicode discussion on replacemet characters - Do not try to skip utf8 checks when the warning is not enabled as checking whether the warning is enabled is more

[PATCH] D117593: [clang-tidy] Change google-explicit-constructor to ignore conversions and operators marked `explicit(false)`

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Herald added a project: All. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into

[PATCH] D118743: [clang-tidy] Add `modernize-use-inline-const-variables-in-headers` check

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs,

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D127901#3603006 , @tra wrote: > Then we do need a knob controlling whether we do want to embed PTX or not. > The default should be "off" IMO. > We currently have `--[no-]cuda-include-ptx=` we may reuse for that purpose. We

[PATCH] D128356: [clang][dataflow] Use NoopLattice in optional model

2022-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. Herald added a subscriber: rnkovacs. Should this PR delete `SourceLocationsLattice`? Are there other users left or do we anticipate new users in the future? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D128357: [clang][dataflow] Store flow condition constraints in a single `FlowConditionConstraints` map.

2022-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. I found a small nit inline, otherwise looks good. Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:76 + if (!Res.second) { +FlowConditionConstraints[] = +(*Res.first->second,

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-22 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM with a nit. Comment at: clang/test/Driver/openmp-offload-gpu-new.c:117 + +// CHECK-LTO-FEATURES: clang-offload-packager{{.*}}feature={{.*}}ptx tra wrote: >

[PATCH] D128142: [MemProf] Memprof profile matching and annotation

2022-06-22 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish added a comment. I'm still going through PGOInstrumentation.cpp ... Comment at: clang/test/CodeGen/memprof.cpp:15 +// # Collect memory profile: +// $ clang++ -fuse-ld=lld -Wl,-no-pie -Wl,--no-rosegment -gmlt \ +// -fdebug-info-for-profiling

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-22 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D127901#3602771 , @jdoerfert wrote: > Do we want/need PTX, I do not, but I don't mind having it. Someone will ask > for it eventually. Fair enough. > However, if we embed bitcode via LTO we can use the > single-linked PTX image

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-22 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1845-1846 + } + if (getCodeGenOpts().EmitOpenCLArgMetadata || + getCodeGenOpts().HIPSaveKernelArgName) Fn->setMetadata("kernel_arg_name", yaxunl wrote: > yaxunl wrote: > > tra

[PATCH] D126097: [clang-tidy] Adds the NSDateFormatter checker to clang-tidy

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs,

[PATCH] D126735: [clang-tidy] Silence modernize-redundant-void-arg in the case of vexing parses

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs,

[PATCH] D119165: [clang-tidy] Add processing lambda captures at bugprone-use-after-move check

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs,

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs,

[PATCH] D127036: [clang-tidy] Warn about arrays in `bugprone-undefined-memory-manipulation`

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs,

[PATCH] D127293: [clang-tidy] Ignore other members in a union if any member of it is initialized in cppcoreguidelines-pro-type-member-init

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs,

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto main:HEAD and: - fold your changes into the appropriate subdirs,

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-22 Thread Vaibhav Yenamandra via Phabricator via cfe-commits
vaibhav.y updated this revision to Diff 439153. vaibhav.y added a comment. Fix formatting in Sarif.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109701/new/ https://reviews.llvm.org/D109701 Files: clang/include/clang/Basic/Sarif.h

[PATCH] D126880: [clang-tidy] Add cppcoreguidelines-avoid-const-or-ref-data-members check

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Tests and docs have moved to subdirectories by module name. Please rebase onto HEAD and: - move

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:61 + "ignoring the result of 'empty()', did you mean 'clear()'? "); + Builder << FixItHint::CreateReplacement(ReplacementRange, "clear"); +}

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D128372#3602881 , @tschuett wrote: > Just for reference: > https://reviews.llvm.org/D128267 Ack. I still think this CL is useful, given that not every library will have `[[nodiscard]]`, and because it can suggest appropriate

[PATCH] D128157: [clang-tidy] cppcoreguidelines-virtual-class-destructor: Fix crash when "virtual" keyword is expanded from a macro

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Please rebase this and folder your changes into `checkers/cppcoreguidelines/virtual-class-destructor.cpp` Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Just for reference: https://reviews.llvm.org/D128267 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128372/new/ https://reviews.llvm.org/D128372 ___ cfe-commits mailing list

[PATCH] D128379: [clangd] Change the url for clang-tidy check documentation

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. Herald added a project: All. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project:

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. A great start, thanks! Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:51-57 +auto Methods = MemberCall->getRecordDecl()->methods(); +auto Clear = llvm::find_if(Methods, [](const CXXMethodDecl *F) { + return

[clang-tools-extra] 165d693 - [clang-tidy][docs] Fix a couple of missed cases from 6e566bc5523

2022-06-22 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2022-06-22T21:37:16+01:00 New Revision: 165d69337a7dbcb88dc054ac8fc3e43f623d4ba7 URL: https://github.com/llvm/llvm-project/commit/165d69337a7dbcb88dc054ac8fc3e43f623d4ba7 DIFF: https://github.com/llvm/llvm-project/commit/165d69337a7dbcb88dc054ac8fc3e43f623d4ba7.diff

[PATCH] D128337: [clang-tidy] Extend spelling for CheckOptions

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 439139. njames93 marked an inline comment as done. njames93 added a comment. Rebased and addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128337/new/ https://reviews.llvm.org/D128337 Files:

[clang-tools-extra] b1cc59f - [clang-tidy][docs] Reorganise release notes

2022-06-22 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2022-06-22T21:21:24+01:00 New Revision: b1cc59fd3a9bad2fbd654011613909ffe90329b0 URL: https://github.com/llvm/llvm-project/commit/b1cc59fd3a9bad2fbd654011613909ffe90329b0 DIFF: https://github.com/llvm/llvm-project/commit/b1cc59fd3a9bad2fbd654011613909ffe90329b0.diff

[PATCH] D128337: [clang-tidy] Extend spelling for CheckOptions

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D128337#3602694 , @aaron.ballman wrote: > I like the changes -- this is a much nicer syntax for specifying > configuration options! > >> The only observable differences are support for the new syntax and >> -dump=config

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2717 +__m128i Bytes = +_mm_loadu_si128(reinterpret_cast(CurPtr)); +int Mask = _mm_movemask_epi8(Bytes); aaron.ballman wrote: > aaron.ballman wrote: > > cor3ntin

[PATCH] D119296: KCFI sanitizer

2022-06-22 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 439137. samitolvanen added a comment. Fixed the debug output in InstCombine to use metadata as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119296/new/ https://reviews.llvm.org/D119296 Files:

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Do we want JIT -> YES, but specalizing LLVM-IR JIT. Do we want/need PTX, I do not, but I don't mind having it. Someone will ask for it eventually. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127901/new/

[PATCH] D123319: Change how we handle auto return types for lambda operator() to be consistent with gcc

2022-06-22 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D123319#3593644 , @aprantl wrote: > In D123319#3517966 , @dblaikie > wrote: > >> In D123319#3506745 , @shafik wrote: >> >>> >> >> What does

[PATCH] D128314: [Clang-tidy] Fixing a bug in clang-tidy infinite-loop checker

2022-06-22 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 439132. ziqingluo-90 retitled this revision from "[Clang-tidy] Fixing bugs in clang-tidy infinite-loop checker" to "[Clang-tidy] Fixing a bug in clang-tidy infinite-loop checker". ziqingluo-90 edited the summary of this revision. ziqingluo-90 added a

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D113107#3602478 , @zahiraam wrote: > Do we want to add an -fexcess-precision option? Well, generally we try to offer the same options GCC does. However, it looks like GCC's `-fexcess-precision` does not line up with the

[PATCH] D128373: [Sema] Check whether `__auto_type` has been deduced before merging

2022-06-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: aaron.ballman. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. This fixes a bug in clang where it emits the following diagnostic when compiling the test case: `argument to

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Abraham Corea Diaz via Phabricator via cfe-commits
abrahamcd created this revision. Herald added subscribers: carlosgalvezp, abrachet, phosek, mgorny. Herald added a project: All. abrahamcd requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project:

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 439130. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https://reviews.llvm.org/D113107 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/Targets/X86.cpp

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2717 +__m128i Bytes = +_mm_loadu_si128(reinterpret_cast(CurPtr)); +int Mask = _mm_movemask_epi8(Bytes); aaron.ballman wrote: > cor3ntin wrote: > > This crashes

[PATCH] D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics.

2022-06-22 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 2 inline comments as done. iains added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:11155 +def err_export_inline_not_defined : Error< + "exported inline functions must be defined within the module purview" + " and before any

[PATCH] D128337: [clang-tidy] Extend spelling for CheckOptions

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I like the changes -- this is a much nicer syntax for specifying configuration options! > The only observable differences are support for the new syntax and > -dump=config will emit using the new syntax. Do you expect the behavior of `-dump` to cause any

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 439128. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https://reviews.llvm.org/D113107 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/Targets/X86.cpp

[PATCH] D127812: [AArch64] Function multiversioning support added.

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D127812#3602645 , @erichkeane wrote: > In D127812#3601476 , @danielkiss > wrote: > >> Your understanding is correct. `target` attribute has two usage model. One >> is just

[PATCH] D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics.

2022-06-22 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 2 inline comments as done. iains added a comment. In D128328#3601080 , @ChuanqiXu wrote: > It looks like we need to handle inline variable as well to match the > intention. can you construct a test-case, where this would apply and which is

[PATCH] D127812: [AArch64] Function multiversioning support added.

2022-06-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D127812#3601476 , @danielkiss wrote: > In D127812#3599530 , @aaron.ballman > wrote: > >> In D127812#3587223 , @ilinpv wrote: >> >>> In

[PATCH] D128368: added clear check functionality

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. A great start, thanks! I understand this CL to have been sent out a few minutes in advance, so as a note to other reviewers: maybe check back in in ~20 minutes please? Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:52-55 +

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2717 +__m128i Bytes = +_mm_loadu_si128(reinterpret_cast(CurPtr)); +int Mask = _mm_movemask_epi8(Bytes); cor3ntin wrote: > This crashes when using

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1845-1846 + } + if (getCodeGenOpts().EmitOpenCLArgMetadata || + getCodeGenOpts().HIPSaveKernelArgName) Fn->setMetadata("kernel_arg_name",

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2405-2406 // Skip over characters in the fast loop. -while (C != 0 &&// Potentially EOF. - C != '\n' && C != '\r') // Newline or DOS-style newline. +// Warn on invalid

[PATCH] D128363: [clang][dataflow] Implement functionality for flow condition variable substitution.

2022-06-22 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:163 +BoolValue , +llvm::DenseMap ) { + auto It = SubstitutionsCache.find(); Could you refactor it into a free function? It does not use 'this',

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-22 Thread Amanieu d'Antras 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 rGd0a4450ecdaf: Rename GCCBuiltin into ClangBuiltin (authored by GuillaumeGomez, committed by Amanieu). Repository: rG LLVM Github Monorepo

[PATCH] D128368: added clear check functionality

2022-06-22 Thread Abraham Corea Diaz via Phabricator via cfe-commits
abrahamcd created this revision. Herald added a subscriber: carlosgalvezp. Herald added a project: All. abrahamcd requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-22 Thread Guillaume Gomez via Phabricator via cfe-commits
GuillaumeGomez updated this revision to Diff 439115. GuillaumeGomez added a comment. - Rename GCCBuiltin into ClangBuiltin - Update #define name as well - Rename `IsGCC` function parameter into `IsClang` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

2022-06-22 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:76 +class UncheckedOptionalAccessDiagnosis { +public: samestep wrote: > sgatev wrote: > > samestep wrote: > > > samestep wrote: > > >

[PATCH] D128182: [NFC] Switch FloatModeKind enum class to use bitmask enums

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a tiny naming nit. Thank you for the cleanup! Comment at: clang/include/clang/Basic/TargetInfo.h:895-896 bool

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 439113. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https://reviews.llvm.org/D113107 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/Targets/X86.cpp

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a subscriber: abrahamcd. cjdb added a comment. I think this CL (which is quite large) might be worth just getting the functionality in, and deferring the in-tree usage to a second CL. That second CL probably should just lift the existing diagnostics so that they're in the message

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127686/new/ https://reviews.llvm.org/D127686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D125723: [MSVC] Add initial support for MSVC pragma optimize

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125723/new/ https://reviews.llvm.org/D125723 ___ cfe-commits mailing list

[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

2022-06-22 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:76 +class UncheckedOptionalAccessDiagnosis { +public: sgatev wrote: > samestep wrote: > > samestep wrote: > > > sgatev wrote: > > > >

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 439110. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https://reviews.llvm.org/D113107 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/Targets/X86.cpp

[PATCH] D127807: [clang-tidy] Properly forward clang-tidy output when running tests

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Thank you for this, it has been annoying me for a while. I'll give a tentative LG, but I'm no expert in this area so see what everyone else says first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127807/new/

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-22 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1845-1846 + } + if (getCodeGenOpts().EmitOpenCLArgMetadata || + getCodeGenOpts().HIPSaveKernelArgName) Fn->setMetadata("kernel_arg_name", Should we consolidate both options

[PATCH] D128072: [clang-tidy] Organize test files into subdirectories by module (NFC)

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Just noticed something nice about this, cmake targets are generated for each module Should speed up development as you now only need to run the lit tests for the module that you are working on `check-clang-extra-clang-tidy-checkers-misc` etc Repository: rG LLVM

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D113107#3601873 , @rjmccall wrote: > Supporting the lowering in the backend is sensible in order to support > `-fexcess-precision=16`, because I agree that the most reasonable IR output > in that configuration is to simply

[PATCH] D128072: [clang-tidy] Organize test files into subdirectories by module (NFC)

2022-06-22 Thread Richard 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 rG89a1d03e2b37: [clang-tidy] Organize test files into subdirectories by module (NFC) (authored by LegalizeAdulthood). Changed prior to commit:

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D127142#3601810 , @yaxunl wrote: > In D127142#3600809 , @MaskRay wrote: > >> Magically deciding a default value for --unwindlib or --rtlib is not nice. >> You may emit a warning if

[PATCH] D128056: [clang][dataflow] Singleton pointer values for null pointers.

2022-06-22 Thread weiyi via Phabricator via cfe-commits
wyt marked an inline comment as done. wyt added a comment. @xazax.hun > Since you always want this function to create a null pointer value, I think > it would be less error prone to ask for the location instead of an arbitrary > value. Currently, a confused caller could put a non-null value

  1   2   3   >