[PATCH] D131708: [RISCV] Change how mtune aliases are implemented.

2022-08-15 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added inline comments. Comment at: clang/test/Driver/riscv-cpus.c:27 // RUN: %clang --target=riscv64 -### -c %s 2>&1 -mtune=rocket | FileCheck -check-prefix=MTUNE-ROCKET-64 %s -// MTUNE-ROCKET-64: "-tune-cpu" "rocket-rv64" - -// RUN: %clang --target=riscv32 -### -c %

[PATCH] D131687: [AArch64] Replace aarch64_sve_ldN intrinsic by aarch64_sve_ldN.sret

2022-08-15 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/test/CodeGen/AArch64/sve-calling-convention-mixed.ll:22 +; CHECK-NEXT:mov z4.d, z8.d +; CHECK-NEXT:bl llvm.aarch64.vector.insert.nxv8f64.nx2f64 +; CHECK-NEXT:mov w0, #2 There is something going wrong h

[PATCH] D131874: [Clang] Tighten restrictions on enum out of range diagnostic to avoid constant initialization

2022-08-15 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Thanks! With this, I think all my cases (that built before D131307 ) now build successfully again! (Can't say much about the code change itself, but I think it looks reasonable.) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D131879: [clang][analyzer] Errno modeling code refactor (NFC).

2022-08-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a reviewer: NoQ. Herald added a project:

[PATCH] D131678: hicpp-signed-bitwise - Return location of the operand (and not of the operator beginning)

2022-08-15 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun updated this revision to Diff 452605. vladimir.plyashkun added a comment. - Executed clang-format after changes - Return operator location (in additional range) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131678/new/ https://re

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 452610. ChuanqiXu marked an inline comment as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388 Files: clang/docs/CPlusPlus20Modules.rst clang/docs/in

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 452612. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388 Files: clang/docs/CPlusPlus20Modules.rst clang/docs/index.rst Index: clang/docs/index.rst ===

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131388#3719794 , @dblaikie wrote: > Actually, when it comes to diagrams - maybe what'd be good is a diagram of > classic compilation and a diagram of modules and header modules > > src1.cpp -+> clang++ src1.cpp --> src1.o

[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:1415 def int_threadlocal_address : DefaultAttrsIntrinsic<[llvm_anyptr_ty], [LLVMMatchType<0>], - [IntrNoMem, IntrSpeculatable, IntrWillReturn]>; +

[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 452615. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131872/new/ https://reviews.llvm.org/D131872 Files: clang/test/CodeGenCXX/threadl

[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/CodeGenCXX/threadlocal_address.cpp:27 // CHECK-O1-NEXT: entry: -// CHECK-O1-NEXT: %[[I_ADDR:.+]] = {{.*}}call ptr @llvm.threadlocal.address.p0(ptr nonnull @i) +// CHECK-O1-NEXT: %[[I_ADDR:.+]] = {{.*}}call ptr @llvm.t

[PATCH] D131808: [clang,flang] Add missing options fsyntax-only in help

2022-08-15 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof added a comment. I can't merge the changes(( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131808/new/ https://reviews.llvm.org/D131808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

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

2022-08-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 452617. iains added a comment. rebased, addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128328/new/ https://reviews.llvm.org/D128328 Files: clang/include/clang/Basic/DiagnosticSemaKinds

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

2022-08-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked an inline comment 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 private

[PATCH] D131687: [AArch64] Replace aarch64_sve_ldN intrinsic by aarch64_sve_ldN.sret

2022-08-15 Thread Caroline via Phabricator via cfe-commits
CarolineConcatto added inline comments. Comment at: llvm/test/CodeGen/AArch64/sve-calling-convention-mixed.ll:22 +; CHECK-NEXT:mov z4.d, z8.d +; CHECK-NEXT:bl llvm.aarch64.vector.insert.nxv8f64.nx2f64 +; CHECK-NEXT:mov w0, #2 sdesmalen wrote: > There

[PATCH] D127403: [clangd] Implement semantic token modifier "definition"

2022-08-15 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127403/new/ https://reviews.llvm.org/D127403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D131687: [AArch64] Replace aarch64_sve_ldN intrinsic by aarch64_sve_ldN.sret

2022-08-15 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/test/CodeGen/AArch64/sve-calling-convention-mixed.ll:127 ; CHECK-NEXT:ptrue p0.d -; CHECK-NEXT:st1d { z16.d }, p0, [sp] -; CHECK-NEXT:st1d { z17.d }, p0, [sp, #1, mul vl] -; CHECK-NEXT:st1d { z18.d }, p0, [sp, #2,

[PATCH] D131879: [clang][analyzer] Errno modeling code refactor (NFC).

2022-08-15 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. Approved with nits. Thanks! Comment at: clang/lib/StaticAnalyzer/Checkers/ErrnoModeling.cpp:267 +const char *describeErrnoCheckState(errno_modeling::ErrnoCheckState CS)

[PATCH] D131526: [OMPIRBuilder] Add support for safelen clause

2022-08-15 Thread Shraiysh via Phabricator via cfe-commits
shraiysh added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:625 + void applySimd(CanonicalLoopInfo *Loop, Value *IfCond, ConstantInt *Simdlen, + ConstantInt *Safelen); psoni2628 wrote: > shraiysh wrote: > > [nit

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. We leave formatting decisions in clang-tidy to clang-format and I don't think we should deviate from that policy here without a very clear understanding of when we should relax that restriction. That said, I'm personally not certain we should have such an option (

[PATCH] D3976: -Wcomma, a new warning for questionable uses of the comma operator

2022-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D3976#3721421 , @gpakosz wrote: > Hello, > > As of today, `-Wcomma` is not really documented: > https://clang.llvm.org/docs/DiagnosticsReference.html#wcomma > >> The current whitelisted expressions are increments, decremen

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-15 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, only nits left that can be fixed when landing (no need for additional review). Comment at: clang/include/clang/Basic/AttrDocs.td:6557-6560 +.. code-block

[PATCH] D131707: [analyzer][NFC] Cache the result of getLocationType in TypedValueRegion

2022-08-15 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Please measure the performance implications/gains of this patch to justify this change. Preferably test it on multiple kinds of projects ranging from old-school C and even some modern C++ projects. Let me know your findings and if you need some help setting it up. ==

[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield

2022-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:13069 - // therefore don't strictly fit into a signed bitfield of width 1. - if (FieldWidth == 1 && Value == 1) -return false; ShawnZhong wrote: > aaron.ballman wrote: > > aaro

[PATCH] D131808: [clang,flang] Add missing options fsyntax-only in help

2022-08-15 Thread Alexander Malkov via Phabricator via cfe-commits
alexiprof added a comment. Could someone land this patch please? Alexander Malkov Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131808/new/ https://reviews.llvm.org/D131808 ___ cfe-commits mailing list

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added a reviewer: Mordante. njames93 added a comment. In D131386#3722749 , @aaron.ballman wrote: > We leave formatting decisions in clang-tidy to clang-format and I don't think > we should deviate from that policy here without a very clear unde

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 452630. njames93 marked an inline comment as done. njames93 added a comment. Remove unneeded include and add Release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131386/new/ https://reviews.llvm.org/D1

[PATCH] D131802: [clang] fix missing initialization of original number of expansions

2022-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This looks reasonable to me, but I leave it to others to do the final sign-off. Please be sure to add a release note for the fix though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131802/new/ https://reviews.llvm.

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131386#3722822 , @njames93 wrote: > In D131386#3722749 , @aaron.ballman > wrote: > >> We leave formatting decisions in clang-tidy to clang-format and I don't >> think we should

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131386#3722849 , @aaron.ballman wrote: > In D131386#3722822 , @njames93 > wrote: > >> In D131386#3722749 , >> @aaron.ballman wrote: >

[PATCH] D3976: -Wcomma, a new warning for questionable uses of the comma operator

2022-08-15 Thread Gregory PAKOSZ via Phabricator via cfe-commits
gpakosz added a comment. >> Should I open a bug? > > I think opening a bug is appropriate, good catch! Thanks for the reply Aaron. Here's the report: https://github.com/llvm/llvm-project/issues/57151 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D3976/new/ https:/

[PATCH] D131874: [Clang] Tighten restrictions on enum out of range diagnostic to avoid constant initialization

2022-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:13547-13551 + if (auto ValD = Info.EvaluatingDecl.dyn_cast()) { +const VarDecl *VD = dyn_cast_or_null(ValD); +if (VD && !VD->isConstexpr()) + NotConstexprVar = true; +

[PATCH] D119051: Extend the C++03 definition of POD to include defaulted functions

2022-08-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/AST/DeclCXX.cpp:892 + LangOptions::ClangABI::Ver15)) { + // C++03 [class]p4: + // A POD-struct is an aggregate class that has [...] no user-defined dblaikie wrote: > erichkea

[PATCH] D119051: Extend the C++03 definition of POD to include defaulted functions

2022-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Do we need to gate this on use of `-fms-compatibility` as well? I'm not certain how cygwin factors in where it's sort of gcc and sort of msvc (perhaps the triple is sufficient for that?). Comment at: clang/lib/AST/DeclCXX.cpp:892 +if ((!

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-15 Thread Daniel Ruoso via Phabricator via cfe-commits
ruoso added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:338-339 + +If we want to create libraries for the BMIs, we can't wrap these BMIs directly. +We must compile these BMIs(``*.pcm``) into object files(``*.o``) and wrap these object files. +

[PATCH] D131888: [Clang][Interp] Add some basic functionality to the experimental new constant interpreter

2022-08-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, shafik, erichkeane, MaskRay, rsmith, nand, nandor. Herald added a subscriber: StephenFan. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-com

[PATCH] D131888: [Clang][Interp] Add some basic functionality to the experimental new constant interpreter

2022-08-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. So you're right, we haven't seen much work on this interpreter in a while, and I have no real experience with reviewing it at all, which I'm sure is the experience of most of my co-reviewers. At the same time, I believe there is good potential in this interpreter, so

[PATCH] D131888: [Clang][Interp] Add some basic functionality to the experimental new constant interpreter

2022-08-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Thanks for the fast reply, Erich! In D131888#3723017 , @erichkeane wrote: > So you're right, we haven't seen much work on this interpreter in a while, > and I have no real experience with reviewing it at all, which I'm sure is

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

2022-08-15 Thread Tobias Hieta via Phabricator via cfe-commits
thieta added a comment. Hi @Sockke - this seems to be ready to land. Is there something holding it back? We ran into the same issue recently. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127293/new/ https://reviews.llvm.org/D127293 ___ cfe-

[PATCH] D127641: [clang-cl][MSVC] Enable /Zc:alignedNew for C++17 and /Zc:sizedDealloc by default

2022-08-15 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 452655. steplong added a comment. - Update unit test to see if this regex works Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127641/new/ https://reviews.llvm.org/D127641 Files: clang-tools-extra/test/clang

[PATCH] D131687: [AArch64] Replace aarch64_sve_ldN intrinsic by aarch64_sve_ldN.sret

2022-08-15 Thread Caroline via Phabricator via cfe-commits
CarolineConcatto marked an inline comment as done. CarolineConcatto added inline comments. Comment at: llvm/test/CodeGen/AArch64/sve-calling-convention-mixed.ll:127 ; CHECK-NEXT:ptrue p0.d -; CHECK-NEXT:st1d { z16.d }, p0, [sp] -; CHECK-NEXT:st1d { z17.d }, p0, [sp,

[PATCH] D131547: [Clang][AArch64] Use generic extract/insert vector for svget/svset/svcreate tuples

2022-08-15 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. I think we usually try to do the same, if the intrinsics have been in released compilers. There is an example in https://reviews.llvm.org/D98487#change-tOTTgECYYAO5, hopefully these would be equally simple. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-08-15 Thread Thomas Etter via Phabricator via cfe-commits
thomasetter added a comment. Is there anything else you would like me to change? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130130/new/ https://reviews.llvm.org/D130130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D131891: [clang][dataflow] Debug string for value kinds.

2022-08-15 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.l

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. > but removing those options can break people's .clang-tidy config files Aren't there deprecation mechanisms? I think trying to be backwards compatible across all possible versions can lead to suboptimal solutions and make the tool harder to use and hard/slow to a

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131386#3723144 , @carlosgalvezp wrote: >> but removing those options can break people's .clang-tidy config files > > Aren't there deprecation mechanisms? I think trying to be backwards > compatible across all possible

[PATCH] D131809: [clang][dataflow] Add an option for context-sensitive depth

2022-08-15 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:395 // `DeclContext` of the block being analysed if provided. - const DeclContext *DeclCtx = nullptr; + std::vector CallString; C

[PATCH] D131818: [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks! Can you add a test for non-constexpr unreachable code within the constexpr if and test that that still warns? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131818/new/ https://reviews.llvm.org/D131818

[PATCH] D131528: [Clang] Restrict non fixed enum to a value outside the range of the enumeration values warning to context requiring a constant expression

2022-08-15 Thread Alexander Yermolovich via Phabricator via cfe-commits
ayermolo added a comment. In D131528#3722395 , @shafik wrote: > In D131528#3719430 , @ayermolo > wrote: > >> Was this and previous change intended to capture this case? >> const enum NumberType neg_one = (enum N

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D131386#3723164 , @aaron.ballman wrote: > In D131386#3723144 , @carlosgalvezp > wrote: > >>> but removing those options can break people's .clang-tidy config files >> >> Aren't

[PATCH] D127641: [clang-cl][MSVC] Enable /Zc:alignedNew for C++17 and /Zc:sizedDealloc by default

2022-08-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6649 + } else if (IsCPP17Onwards) { +CmdArgs.push_back("-faligned-allocation"); } Do we want to do this in the driver? From what I understand, we already do this (MSVC or not

[PATCH] D131809: [clang][dataflow] Add an option for context-sensitive depth

2022-08-15 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. Once the Stanislav's comments are resolved, it looks good to me. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:665 +if (!(Options.ContextSensitiveOpts &

[PATCH] D131891: [clang][dataflow] Debug string for value kinds.

2022-08-15 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DebugSupport.cpp:34 +std::string debugString(Value::Kind Kind) { + switch (Kind) { I think all of these `debugString` functions could return a `llvm::StringRef` or an `std::string_v

[PATCH] D131755: [CMake] Explicit bootstrap options override any passthrough ones.

2022-08-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. Looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131755/new/ https://reviews.llvm.org/D131755

[PATCH] D131892: [Sema] fix false -Wcomma being emited from void returning functions

2022-08-15 Thread YingChi Long via Phabricator via cfe-commits
inclyc created this revision. Herald added a project: All. inclyc updated this revision to Diff 452665. inclyc added a comment. inclyc added reviewers: aaron.ballman, rtrieu. inclyc published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. comments

[PATCH] D131707: [analyzer][NFC] Cache the result of getLocationType in TypedValueRegion

2022-08-15 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @steakhal Thank you for the review. Could you please do testing for me, since I'm on Windows and have no prepared testing environment as I know you are. I'll add an assertion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[clang] b8a1b69 - [clang] fix missing initialization of original number of expansions

2022-08-15 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2022-08-15T17:39:38+02:00 New Revision: b8a1b698afb2fc84819c7596090aabf4d826b436 URL: https://github.com/llvm/llvm-project/commit/b8a1b698afb2fc84819c7596090aabf4d826b436 DIFF: https://github.com/llvm/llvm-project/commit/b8a1b698afb2fc84819c7596090aabf4d826b436.dif

[PATCH] D131802: [clang] fix missing initialization of original number of expansions

2022-08-15 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb8a1b698afb2: [clang] fix missing initialization of original number of expansions (authored by mizvekov). Changed prior to commit: https://reviews.llvm.org/D131802?vs=452281&id=452688#toc Repository:

[PATCH] D131707: [analyzer][NFC] Cache the result of getLocationType in TypedValueRegion

2022-08-15 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 452689. ASDenysPetrov added a comment. Add assertion accroding to the remark. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131707/new/ https://reviews.llvm.org/D131707 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.

[PATCH] D131707: [analyzer][NFC] Cache the result of getLocationType in TypedValueRegion

2022-08-15 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D131707#3723403 , @ASDenysPetrov wrote: > @steakhal > Thank you for the review. > Could you please do testing for me, since I'm on Windows and have no prepared > testing environment as I know you do. > I'll add an asser

[PATCH] D131892: [Sema] fix false -Wcomma being emited from void returning functions

2022-08-15 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 452691. inclyc added a comment. Sync comments of function `IgnoreCommaOperand` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131892/new/ https://reviews.llvm.org/D131892 Files: clang/lib/Sema/SemaExpr.cpp c

[PATCH] D131892: [Sema] fix false -Wcomma being emited from void returning functions

2022-08-15 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 452692. inclyc added a comment. typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131892/new/ https://reviews.llvm.org/D131892 Files: clang/lib/Sema/SemaExpr.cpp clang/test/SemaCXX/warn-comma-operator.cpp

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 452693. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128095/new/ https://reviews.llvm.org/D128095 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Sema/S

[PATCH] D131707: [analyzer][NFC] Cache the result of getLocationType in TypedValueRegion

2022-08-15 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a subscriber: balazske. steakhal added a comment. In D131707#3723403 , @ASDenysPetrov wrote: > @steakhal > Thank you for the review. > Could you please do testing for me, since I'm on Windows and have no prepared > testing environment as

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D131386#3722749 , @aaron.ballman wrote: > We leave formatting decisions in clang-tidy to clang-format and I don't think > we should deviate from that policy here without a very clear understanding of > when we should relax

[PATCH] D131678: hicpp-signed-bitwise - Return location of the operand (and not of the operator beginning)

2022-08-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/hicpp/SignedBitwiseCheck.cpp:100 + "%select{binary|unary}0 bitwise operator") + << IsUnary << OperatorLoc; } We still need the source range of the o

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

2022-08-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 added a comment. FYI, had an offline chat with @dblaikie and we decided that the best way forward would be to try stop emitting auto return types in DWARF, instead of relying on lambda/member-function specific hacks. Not sure what the timeline on this will be but tracking it internal

[PATCH] D131818: [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 452721. ayzhao added a comment. Add tests for nested non-constexpr if Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131818/new/ https://reviews.llvm.org/D131818 Files: clang/lib/Analysis/ReachableCode.cpp c

[PATCH] D131818: [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D131818#3723227 , @thakis wrote: > Thanks! > > Can you add a test for non-constexpr unreachable code within the constexpr if > and test that that still warns? Done Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/resource_binding_attr_error.hlsl:15 +// expected-error@+1 {{invalid space specifier 's2' used; expected 'space' followed by an integer, like space1}} +cbuffer a : register(b0, s2) { + aaron.ballman wro

[PATCH] D127641: [clang-cl][MSVC] Enable /Zc:alignedNew for C++17 and /Zc:sizedDealloc by default

2022-08-15 Thread Stephen Long via Phabricator via cfe-commits
steplong added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6649 + } else if (IsCPP17Onwards) { +CmdArgs.push_back("-faligned-allocation"); } thakis wrote: > Do we want to do this in the driver? From what I understand, we already do

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452739. python3kgae added a comment. Fix format in AttrDocs.td and avoid name conflict in test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: clang/inc

[PATCH] D129016: [PowerPC] implemented @llvm.ppc.kill.canary to corrupt stack guard

2022-08-15 Thread Paul Scoropan via Phabricator via cfe-commits
pscoro updated this revision to Diff 452740. pscoro added a comment. chain input fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129016/new/ https://reviews.llvm.org/D129016 Files: clang/include/clang/Basic/BuiltinsPPC.def clang/lib/Basic/Ta

[clang] f37b285 - Removing an unused function; NFC

2022-08-15 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-08-15T13:35:16-04:00 New Revision: f37b2852999c695af03c6d809816793d8d345538 URL: https://github.com/llvm/llvm-project/commit/f37b2852999c695af03c6d809816793d8d345538 DIFF: https://github.com/llvm/llvm-project/commit/f37b2852999c695af03c6d809816793d8d345538.diff

[clang] 465d908 - [test][clang] Opaquify pragma-init_seg.cpp

2022-08-15 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-08-15T10:45:24-07:00 New Revision: 465d9084ece1626335bc41eac96c56428faed7e9 URL: https://github.com/llvm/llvm-project/commit/465d9084ece1626335bc41eac96c56428faed7e9 DIFF: https://github.com/llvm/llvm-project/commit/465d9084ece1626335bc41eac96c56428faed7e9.diff

[PATCH] D128133: [Driver] Support linking to compiler-rt for target AVR

2022-08-15 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. We started seeing test failures after this change on our bots. Would it be possible to revert the change and address these issues before relanding? In `Clang :: Driver/avr-ld.c`: Script: -- : 'RUN: at line 1'; /b/s/w/ir/x/w/staging/llvm_build/bin/clang -### --ta

[PATCH] D131892: [Sema] fix false -Wcomma being emitted from void returning functions

2022-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this fix! I think it's quite close to finished, but it needs some additional test coverage. Also, please add a release note about the fix so users know what's going on. Comment at: clang/lib/Sema/SemaExpr.cpp:13978-13980

[PATCH] D105255: [MLIR][OpenMP] Added target data, exit data, and enter data operation definition for MLIR.

2022-08-15 Thread Abid via Phabricator via cfe-commits
abidmalikwaterloo updated this revision to Diff 452743. abidmalikwaterloo added a comment. [MLIR][OpenMP] Added target data, exit data, and enter data operation definition for MLIR Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105255/new/ https://

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: owenpan, MyDeveloperDay. aaron.ballman added a comment. In D131386#3723490 , @Mordante wrote: > In D131386#3722749 , @aaron.ballman > wrote: > >> We leave formatting decisions in

[PATCH] D105255: [MLIR][OpenMP] Added target data, exit data, and enter data operation definition for MLIR.

2022-08-15 Thread Valentin Clement via Phabricator via cfe-commits
clementval added a comment. In D105255#3723865 , @abidmalikwaterloo wrote: > [MLIR][OpenMP] Added target data, exit data, and enter data operation > definition for MLIR Looks like it's not the complete revision. There are almost no diffs anymore. Rep

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-15 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127233/new/ https://reviews.llvm.org/D127233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D105255: [MLIR][OpenMP] Added target data, exit data, and enter data operation definition for MLIR.

2022-08-15 Thread Abid via Phabricator via cfe-commits
abidmalikwaterloo added a comment. In D105255#3723940 , @clementval wrote: > In D105255#3723865 , > @abidmalikwaterloo wrote: > >> [MLIR][OpenMP] Added target data, exit data, and enter data operation >> defini

[PATCH] D131910: [Windows] Put init_seg(compiler/lib) in llvm.global_ctors

2022-08-15 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added reviewers: rnk, hans. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. aeubanks requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Currently we treat in

[PATCH] D129464: [Clang][CodeGen] Set FP options of builder at entry to compound statement

2022-08-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. As specific interaction of FP pragmas and template instantiation was not supported, this patch is actual without additional changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129464/new/ https://reviews.llvm.org/D129

[PATCH] D131789: [clang-tools-extra][NFC] Rewrite prints in python3 compatible way

2022-08-15 Thread Danil Sidoruk via Phabricator via cfe-commits
eoanermine added a comment. Please, commit this patch for me I don't have an access to commit the patch by myself. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131789/new/ https://reviews.llvm.org/D131789

[PATCH] D131818: [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-15 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis 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/D131818/new/ https://reviews.llvm.org/D131818

[PATCH] D127641: [clang-cl][MSVC] Enable /Zc:alignedNew for C++17 and /Zc:sizedDealloc by default

2022-08-15 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 452757. steplong added a comment. - Clang-format test The regex isn't optimal since it will still accept strings that aren't "Num Args: 1\n" or "Num Args: 2\n" such as "Num Args: \n2\n" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-08-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452761. python3kgae marked 3 inline comments as done. python3kgae added a comment. Add more comment about no name conflict for cbuffer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://revi

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/SemaHLSL/resource_binding_attr_error.hlsl:15 +// expected-error@+1 {{invalid space specifier 's2' used; expected 'space' followed by an integer, like space1}} +cbuffer a : register(b0, s2) { + beanz wrote

[PATCH] D131892: [Sema] fix false -Wcomma being emitted from void returning functions

2022-08-15 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 452767. inclyc added a comment. Address comments. Thanks a lot for your suggestion, I noticed that the regression test tested both C and C++, so I split the test mentioned in the comment into two parts. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D131892: [Sema] fix false -Wcomma being emitted from void returning functions

2022-08-15 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/docs/ReleaseNotes.rst:74 number of arguments cause an assertion fault. +- Fix `#57151 `_. + ``-Wcomma`` is emitted for void returning functions. Do we need an N

[PATCH] D119051: Extend the C++03 definition of POD to include defaulted functions

2022-08-15 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: hans. rnk added a comment. Regarding the usage of isPOD in the MSVC ABI code, we should have a routine similar to `isTrivialForAArch64MSVC` that works for the other MSVC architectures that we support (x86, x64, and arm32). I don't think we should try to rely on definitio

[PATCH] D131874: [Clang] Tighten restrictions on enum out of range diagnostic to avoid constant initialization

2022-08-15 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 452775. shafik marked an inline comment as done. shafik added a comment. - Changed `NotConstexprVar` to `ConstExprVar` - Moved checking of `ConstexprVar` up so that we do the less expensive check first CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13

[PATCH] D131874: [Clang] Tighten restrictions on enum out of range diagnostic to avoid constant initialization

2022-08-15 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:13547-13551 + if (auto ValD = Info.EvaluatingDecl.dyn_cast()) { +const VarDecl *VD = dyn_cast_or_null(ValD); +if (VD && !VD->isConstexpr()) + NotConstexprVar = true; + } --

[clang] ff8aadf - [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-15 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2022-08-15T15:24:39-04:00 New Revision: ff8aadf58d1a0ea7d8fa2b9a7a17ff0c6059baa5 URL: https://github.com/llvm/llvm-project/commit/ff8aadf58d1a0ea7d8fa2b9a7a17ff0c6059baa5 DIFF: https://github.com/llvm/llvm-project/commit/ff8aadf58d1a0ea7d8fa2b9a7a17ff0c6059baa5.diff LOG

[PATCH] D131818: [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-15 Thread Alan Zhao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGff8aadf58d1a: [clang][diagnostics] Don't warn about unreachable code in constexpr if (authored by ayzhao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1318

[PATCH] D131809: [clang][dataflow] Add an option for context-sensitive depth

2022-08-15 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:210 + const DeclContext *Callee) const { + return CallString.size() <= MaxDepth && + std::find(CallString.begin(), CallString.end(), Callee) =

[PATCH] D131809: [clang][dataflow] Add an option for context-sensitive depth

2022-08-15 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:665 +if (!(Options.ContextSensitiveOpts && + Env.canDescend(Options.ContextSensitiveOpts->Depth, F))) return; samestep wrote: > xazax.hun wrote: > > Alte

[PATCH] D131809: [clang][dataflow] Add an option for context-sensitive depth

2022-08-15 Thread Sam Estep via Phabricator via cfe-commits
samestep updated this revision to Diff 452783. samestep added a comment. Address Stanislav's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131809/new/ https://reviews.llvm.org/D131809 Files: clang/include/clang/Analysis/FlowSensitive/Da

[clang] 2efc8f8 - [clang][dataflow] Add an option for context-sensitive depth

2022-08-15 Thread Sam Estep via cfe-commits
Author: Sam Estep Date: 2022-08-15T19:58:40Z New Revision: 2efc8f8d6561421c3f47de2f27a365ddfb734425 URL: https://github.com/llvm/llvm-project/commit/2efc8f8d6561421c3f47de2f27a365ddfb734425 DIFF: https://github.com/llvm/llvm-project/commit/2efc8f8d6561421c3f47de2f27a365ddfb734425.diff LOG: [cl

  1   2   >