[PATCH] D147876: [clang-tidy] Support specifying checks as a list in the config file

2023-04-10 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D147876#4256182 , @njames93 wrote: > In D147876#4256155 , @carlosgalvezp > wrote: > >> Thanks for the review @njames93 ! Do you think it makes sense that we >> deprecate the

[PATCH] D147989: Fix Attribute Placememt

2023-04-10 Thread Priyanshi Agarwal via Phabricator via cfe-commits
ipriyanshi1708 updated this revision to Diff 512340. ipriyanshi1708 added a comment. 1. Updating D147989 : Fix Attribute Placememt # 2. Enter a brief description of the changes included in this update. Fixes https://github.com/llvm/llvm-project/issues/61660

[PATCH] D147989: Fix Attribute Placememt

2023-04-10 Thread Priyanshi Agarwal via Phabricator via cfe-commits
ipriyanshi1708 created this revision. Herald added a project: All. ipriyanshi1708 added a reviewer: samtebbs. ipriyanshi1708 published this revision for review. Herald added a project: clang. Fixed the error message for attribute placement. Earlier it was showing 'place it after "enum"' but it

[PATCH] D147779: [clang-tidy] Fix hungarian notation failed to indicate the number of asterisks in check-clang-extra-clang-tidy-checkers-readability

2023-04-10 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob added a comment. Hi @PiotrZSL I do not have permission to land the change. Can you please help me to land this change? Another related question is that can I know how you land diffs? Take this diff as an example. Is it correct with `arc land --onto main --revision D147779`?

[PATCH] D147844: Emit warning when implicit cast to bool happens in an conditional operator expression when used inside an overloaded shift operator expression

2023-04-10 Thread NagaChaitanya Vellanki via Phabricator via cfe-commits
chaitanyav added a comment. @aaron.ballman Please review this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147844/new/ https://reviews.llvm.org/D147844 ___ cfe-commits mailing list

[PATCH] D147894: [clang-format] SortIncludes documentation: remove contradiction in its description

2023-04-10 Thread Mike Matthews via Phabricator via cfe-commits
michael-g-matthews added a comment. I am also a little confused by what you mean @MyDeveloperDay. The options that were removed contained incorrect documentation (listing ASCIIbetical as CaseInsensitive). The enum documentation immediately after was however correct, so the documentation was

[PATCH] D146921: [clang-tidy] Implement cppcoreguidelines F.19

2023-04-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 512318. ccotter added a comment. - format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146921/new/ https://reviews.llvm.org/D146921 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt

[PATCH] D141892: Implement modernize-use-constraints

2023-04-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 512315. ccotter added a comment. arc diff properly Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141892/new/ https://reviews.llvm.org/D141892 Files: clang-tools-extra/clang-tidy/modernize/CMakeLists.txt

[PATCH] D141892: Implement modernize-use-constraints

2023-04-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 512314. ccotter added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141892/new/ https://reviews.llvm.org/D141892 Files: clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp

[PATCH] D141892: Implement modernize-use-constraints

2023-04-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 512313. ccotter added a comment. refactor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141892/new/ https://reviews.llvm.org/D141892 Files: clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp

[PATCH] D147986: [RISCV] Print a better error message when a rv32 CPU is used on rv64 and vice versa.

2023-04-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 512312. craig.topper added a comment. Upload the whole patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147986/new/ https://reviews.llvm.org/D147986 Files:

[PATCH] D147986: [RISCV] Print a better error message when a rv32 CPU is used on rv64 and vice versa.

2023-04-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: asb, reames, luismarques, kito-cheng. Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck,

[PATCH] D141892: Implement modernize-use-constraints

2023-04-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. > Would you consider supporting enable_if via parameters I was planning to support those too, but in a subsequent commit / review since this review is rather large. Is that OK? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D141892: Implement modernize-use-constraints

2023-04-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp:157-160 +return std::make_tuple( +matchEnableIfSpecialization( +LastTemplateParam->getTypeSourceInfo()->getTypeLoc()), +LastTemplateParam);

[PATCH] D141892: Implement modernize-use-constraints

2023-04-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 512308. ccotter marked 12 inline comments as done. ccotter added a comment. feedback+rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141892/new/ https://reviews.llvm.org/D141892 Files:

[PATCH] D143813: [ClangFE] Check that __sync builtins are naturally aligned.

2023-04-10 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I think this patch is causing the assertion in `CodeGenFunction::setAddrOfLocalVar` to fail when the following code is compiled: void foo(unsigned long long t) { __sync_bool_compare_and_swap(({int x = 1; }), t, t); } Could you take a look? Repository: rG

[clang] 63c4967 - Use APInt::getOneBitSet (NFC)

2023-04-10 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-04-10T18:19:17-07:00 New Revision: 63c4967352247705b4513ab17b7a4ee66cd6d1ea URL: https://github.com/llvm/llvm-project/commit/63c4967352247705b4513ab17b7a4ee66cd6d1ea DIFF: https://github.com/llvm/llvm-project/commit/63c4967352247705b4513ab17b7a4ee66cd6d1ea.diff

[PATCH] D147839: [clang] Add test for CWG2007

2023-04-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/drs/dr20xx.cpp:20 +// FIXME: the following code shouldn't instantiate A. +// int b = ()->foo; +} Endill wrote: > shafik wrote: > > shafik wrote: > > > It looks like gcc and MSVC also instantiate `A` for

[PATCH] D147920: [clang] Add test for CWG399

2023-04-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/drs/dr3xx.cpp:1492 +// This is technically ill-formed; G is looked up in 'N::' and is not found. +// Rejecting this seems correct, but most compilers accept, so we do also. +f.N::F::~G(); // expected-error

[PATCH] D144510: [clang-tidy] improve readability-identifier-naming hungarian options test

2023-04-10 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob added a comment. In D144510#4256258 , @amurzeau wrote: > In D144510#4254959 , @dougpuob > wrote: > >> Hi @amurzeau >> >> I missed the review before landing. I have a suggestion regarding the >>

[clang-tools-extra] df0c8f2 - [clang-tidy][NFC] Remove redundant allOf matcher calls

2023-04-10 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2023-04-11T00:38:37+01:00 New Revision: df0c8f25145047731fb95b4ce7153ce6fb5b6f5d URL: https://github.com/llvm/llvm-project/commit/df0c8f25145047731fb95b4ce7153ce6fb5b6f5d DIFF: https://github.com/llvm/llvm-project/commit/df0c8f25145047731fb95b4ce7153ce6fb5b6f5d.diff

[PATCH] D147733: Set rounding_mode to tonearest in presence of a #pragma STDC FENV_ACCESS OFF.

2023-04-10 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: clang/test/CodeGen/pragma-fenv_access.c:4 // RUN: %clang_cc1 -fexperimental-strict-floating-point -ffp-exception-behavior=strict -triple %itanium_abi_triple -emit-llvm %s -o - -fms-extensions -DMS | FileCheck

[PATCH] D147969: Add InsertBraces to ChromiumStyle

2023-04-10 Thread Peter Boström via Phabricator via cfe-commits
pbos added a comment. That's reasonable. If I don't hear something else we'll own InsertBraces on our end. Is there anything I can point to regarding the decision to not let clang-format add/rearrange tokens by default so that I can refer to that in a comment saying why it won't be upstreamed?

[PATCH] D147978: [RISCV] Remove getCPUFeaturesExceptStdExt.

2023-04-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: asb, reames, kito-cheng, khchen, jrtc27, luismarques. Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult,

[PATCH] D131319: [clang-tidy] Update llvm-prefer-isa-or-dyn-cast-in-conditionals with new syntax

2023-04-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. @PiotrZSL Thank you for your review, however we tend to only comment on code that has been changed by the patch. You have made some good points about parts of this check, but they can be addressed in an NFC commit. Comment at:

[PATCH] D147969: Add InsertBraces to ChromiumStyle

2023-04-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. These features tend to have an additional performance penalty that not all may want to pay, even if they did base their style on your style. I.E. chromium isn’t likely the only ones using chromium style Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D147969: Add InsertBraces to ChromiumStyle

2023-04-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. This was the agreement reached when we pushed for clang format to start being allowed to add or rearrange tokens, I.E. in this case we add {} as such we could, as you saw yourselves make mistakes if our assumptions are not 100% correct and break code, we prefer

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-04-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D147357#4256636 , @PiotrZSL wrote: > As for `takeOptionalValue(std::move(*param));`, it could be added as an > configuration option for PassthroughFunctions or UtilityFunctions. I can > thing about that, that should be easy

[PATCH] D147969: Add InsertBraces to ChromiumStyle

2023-04-10 Thread Peter Boström via Phabricator via cfe-commits
pbos added a comment. What defines a code-modifying feature? This shouldn't change control flow, so are superfluous {}s seen as code-modifying while additional spaces/tabs/whatnot are not? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147969/new/

[PATCH] D147969: Add InsertBraces to ChromiumStyle

2023-04-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Format/Format.cpp:1699 ChromiumStyle.DerivePointerAlignment = false; +ChromiumStyle.InsertBraces = true; if

[PATCH] D131319: [clang-tidy] Update llvm-prefer-isa-or-dyn-cast-in-conditionals with new syntax

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.cpp:39 varDecl(hasInitializer( callExpr(allOf(unless(isMacroID()), unless(cxxMemberCallExpr()),

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to X3

2023-04-10 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 512277. paulkirth added a comment. Remove dead declaration. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146463/new/ https://reviews.llvm.org/D146463 Files: clang/docs/ShadowCallStack.rst

[PATCH] D147955: [clang-tidy] Extend CheckOptions to support grouping checks options

2023-04-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D147955#4256649 , @PiotrZSL wrote: > There are so many ways of defining check configurations, and I never heard of > them. > Maybe some separate section in documentation is needed for them. The current documentation only

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to X3

2023-04-10 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added inline comments. Comment at: clang/lib/Driver/SanitizerArgs.cpp:573 + Kinds & SanitizerKind::ShadowCallStack) + << "-msmall-data-limit=0"; +} jrtc27 wrote: > jrtc27 wrote: > > paulkirth wrote: > > >

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to X3

2023-04-10 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 512276. paulkirth marked 7 inline comments as done. paulkirth added a comment. Remove `-msmall-data-limit` related changes. There was a misunderstanding on my part about default linker behavior. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D147955: [clang-tidy] Extend CheckOptions to support grouping checks options

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. There are so many ways of defining check configurations, and I never heard of them. Maybe some separate section in documentation is needed for them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147955/new/

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-04-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. As for `takeOptionalValue(std::move(*param));`, it could be added as an configuration option for PassthroughFunctions or UtilityFunctions. I can thing about that, that should be easy to implement. Comment at:

[PATCH] D147909: [clang] Implement CWG 2397

2023-04-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. This looks good but I will let at least one more reviewer take a look Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147909/new/ https://reviews.llvm.org/D147909 ___ cfe-commits

[PATCH] D131319: [clang-tidy] Update llvm-prefer-isa-or-dyn-cast-in-conditionals with new syntax

2023-04-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 512269. njames93 added a comment. Herald added a subscriber: ChuanqiXu. Fix wrong patch upload Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131319/new/ https://reviews.llvm.org/D131319 Files:

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to X3

2023-04-10 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/lib/Driver/SanitizerArgs.cpp:573 + Kinds & SanitizerKind::ShadowCallStack) + << "-msmall-data-limit=0"; +} jrtc27 wrote: > paulkirth wrote: > > jrtc27 wrote: > > > Why

[PATCH] D131319: [clang-tidy] Update llvm-prefer-isa-or-dyn-cast-in-conditionals with new syntax

2023-04-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 512267. njames93 added a comment. Added dynamic checking for existence of isa_and_present before suggesting it as a replacement Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131319/new/

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to X3

2023-04-10 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/lib/Driver/SanitizerArgs.cpp:573 + Kinds & SanitizerKind::ShadowCallStack) + << "-msmall-data-limit=0"; +} paulkirth wrote: > jrtc27 wrote: > > Why is this an error? It

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to X3

2023-04-10 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added inline comments. Comment at: clang/lib/Driver/SanitizerArgs.cpp:307 +bool shadowCallStackDSLConflicts(const llvm::opt::ArgList , + const llvm::Triple ) { mcgrathr wrote: > I'm guessing that "DSL" stands for "data

[PATCH] D147904: [Clang] Fix cast to BigIntType in hasUniqueObjectRepresentations

2023-04-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Thank you for this quick fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147904/new/ https://reviews.llvm.org/D147904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libunwind] a2ef896 - [libcxxabi, libunwind] [test] Place output from tests under a 'test' subdir

2023-04-10 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2023-04-11T00:13:33+03:00 New Revision: a2ef896a961c0180314acfde635f2b2f1e3625d4 URL: https://github.com/llvm/llvm-project/commit/a2ef896a961c0180314acfde635f2b2f1e3625d4 DIFF:

[libunwind] 11ed806 - [libunwind] [test] Mark the signal_frame test as unsupported on Windows

2023-04-10 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2023-04-11T00:00:30+03:00 New Revision: 11ed806e7fdb1df74bba727165e68d675bbaa5e1 URL: https://github.com/llvm/llvm-project/commit/11ed806e7fdb1df74bba727165e68d675bbaa5e1 DIFF:

[libunwind] 66632e8 - [libunwind] [SEH] Handle ExceptionContinueExecution in forced unwinding

2023-04-10 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2023-04-11T00:00:30+03:00 New Revision: 66632e8798148b351ba2971a0a380a47352afc8d URL: https://github.com/llvm/llvm-project/commit/66632e8798148b351ba2971a0a380a47352afc8d DIFF:

[libunwind] 87ca040 - [libunwind] [SEH] Sync LSDA and handler between unw_proc_info_t and DISPATCHER_CONTEXT

2023-04-10 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2023-04-11T00:00:30+03:00 New Revision: 87ca04033c1bf79f4de964505dd8818cbbc2bdf4 URL: https://github.com/llvm/llvm-project/commit/87ca04033c1bf79f4de964505dd8818cbbc2bdf4 DIFF:

[libunwind] 55abdef - [libunwind] Increase the external value of _LIBUNWIND_CURSOR_SIZE for SEH/x86_64

2023-04-10 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2023-04-11T00:00:30+03:00 New Revision: 55abdef3dac681866503ab286c3be6b4e8be3a9a URL: https://github.com/llvm/llvm-project/commit/55abdef3dac681866503ab286c3be6b4e8be3a9a DIFF:

[PATCH] D147848: [clang] Add test for CWG2370

2023-04-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/drs/dr23xx.cpp:182 + typedef N::type N_type; + // FIXME: `type` should be searched for in N + // friend void N::g(type); The implementation seems to all accept this example:

[PATCH] D147962: [RFC][clang] Pull experimental targets' info out of TargetInfo.cpp (NFC)

2023-04-10 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm accepted this revision. arsenm added a comment. This revision is now accepted and ready to land. Herald added a subscriber: wdng. Seems like an obvious organizational improvement Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147962/new/

[PATCH] D141775: [Clang] Export CanPassInRegisters as a type trait

2023-04-10 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D141775#4255923 , @philnik wrote: > Is this essentially "is_trivial_for_the_purposes_of_abi"? I'd say so. Are you asking for a potential libc++ use case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to X3

2023-04-10 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/docs/ShadowCallStack.rst:157 +linker. This can be done with the ``--no-relax-gp`` flag in GNU ld. It may also +be useful to compile with ``-msmall-data-limit=0``. This doesn't really achieve anything other than

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to X3

2023-04-10 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. lgtm with some nits and a few more test cases. Comment at: clang/docs/ShadowCallStack.rst:61 +The instrumentation makes use of the platform register ``x18`` on AArch64 and +``x3`` on RISC-V. For simplicity we will

[PATCH] D147962: [RFC][clang] Pull experimental targets' info out of TargetInfo.cpp (NFC)

2023-04-10 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 512243. barannikov88 edited the summary of this revision. barannikov88 added a comment. clang-format and comment fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147962/new/

[PATCH] D122573: [TBAA] Emit distinct TBAA tags for pointers with different depths,types.

2023-04-10 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D122573#4125641 , @bipmis wrote: > @fhahn We are also observing scenarios where this maybe necessary. A couple > of points on where it may be missing > > 1. createScalarTypeNode(OutName, AnyPtr, Size) -> This will generate >

[PATCH] D147969: Add InsertBraces to ChromiumStyle

2023-04-10 Thread Peter Boström via Phabricator via cfe-commits
pbos added a comment. Does this need additional testing besides clang/unittests/Format/BracesInserterTest.cpp ? I haven't seen tests that EXPECT_TRUE(getChromiumStyle(lang).InsertBraces); Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147969/new/

[PATCH] D147969: Add InsertBraces to ChromiumStyle

2023-04-10 Thread Peter Boström via Phabricator via cfe-commits
pbos created this revision. pbos added a reviewer: hans. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. pbos requested review of this revision. Herald added a comment. NOTE:

[PATCH] D144510: [clang-tidy] improve readability-identifier-naming hungarian options test

2023-04-10 Thread Alexis Murzeau via Phabricator via cfe-commits
amurzeau added a comment. In D144510#4254959 , @dougpuob wrote: > Hi @amurzeau > > I missed the review before landing. I have a suggestion regarding the > customized prefix "cust" because it confused me when I found the Hungarian > notation patterns in

[PATCH] D147779: [clang-tidy] Fix hungarian notation failed to indicate the number of asterisks in check-clang-extra-clang-tidy-checkers-readability

2023-04-10 Thread Alexis Murzeau via Phabricator via cfe-commits
amurzeau accepted this revision. amurzeau added a comment. Thanks ! LGTM, nothing to add. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147779/new/ https://reviews.llvm.org/D147779 ___ cfe-commits

[PATCH] D147946: [clang-tidy] support nested inline namespace in c++20 for modernize-concat-nested-namespaces

2023-04-10 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 512231. HerrCai0907 added a comment. fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147946/new/ https://reviews.llvm.org/D147946 Files:

[PATCH] D144064: [-Wunsafe-buffer-usage] Match unsafe pointers being casted to bool or participating in pointer subtractions

2023-04-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. LGTM! Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:188-191 + allOf(hasLHS(hasPointerType()), + hasRHS(hasPointerType())), + eachOf(hasLHS(InnerMatcher), +

[PATCH] D141451: [clang] report inlining decisions with -Wattribute-{warning|error}

2023-04-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 512230. nickdesaulniers added a comment. - rebase, in response to https://discourse.llvm.org/t/rfc-improving-clangs-middle-and-back-end-diagnostics/69261/11?u=nickdesaulniers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D147876: [clang-tidy] Support specifying checks as a list in the config file

2023-04-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D147876#4256155 , @carlosgalvezp wrote: > Thanks for the review @njames93 ! Do you think it makes sense that we > deprecate the string format, so that we only support the list format? To be > fully removed in clang-tidy

[PATCH] D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state

2023-04-10 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp:77 + +void escape(char C, llvm::raw_ostream ) { + switch (C) { We already sort of have a way to escape HTML here:

[PATCH] D147876: [clang-tidy] Support specifying checks as a list in the config file

2023-04-10 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks for the review @njames93 ! Do you think it makes sense that we deprecate the string format, so that we only support the list format? To be fully removed in clang-tidy 19. Only for config file, for `--checks` we can still support string. This would allow us

[PATCH] D147823: [clang-repl] Reduce dynamic-library.cpp test to only load shared library

2023-04-10 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Could we disable the test on that platform? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147823/new/ https://reviews.llvm.org/D147823 ___ cfe-commits mailing list

[PATCH] D147823: [clang-repl] Reduce dynamic-library.cpp test to only load shared library

2023-04-10 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. This doesn't work. The test would fail with error: libdynamic-library-test.so: ELF load command address/offset not properly aligned I first used obj2yaml to convert `libdynamic-library-test.so` to YAML, and then the test uses yaml2obj to convert it back. But it

[PATCH] D147876: [clang-tidy] Support specifying checks as a list in the config file

2023-04-10 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG132f1d31fd66: [clang-tidy] Support specifying checks as a list in the config file (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] 132f1d3 - [clang-tidy] Support specifying checks as a list in the config file

2023-04-10 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-04-10T19:31:33Z New Revision: 132f1d31fd66c30baf9773bf8f37b36a40fa7039 URL: https://github.com/llvm/llvm-project/commit/132f1d31fd66c30baf9773bf8f37b36a40fa7039 DIFF: https://github.com/llvm/llvm-project/commit/132f1d31fd66c30baf9773bf8f37b36a40fa7039.diff

[PATCH] D147823: [clang-repl] Reduce dynamic-library.cpp test to only load shared library

2023-04-10 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 updated this revision to Diff 512223. zhuhan0 added a comment. Remove .so file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147823/new/ https://reviews.llvm.org/D147823 Files: clang/test/Interpreter/Inputs/dynamic-library-test.cpp

[PATCH] D147823: [clang-repl] Reduce dynamic-library.cpp test to only load shared library

2023-04-10 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 updated this revision to Diff 51. zhuhan0 added a comment. Try with yaml2obj. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147823/new/ https://reviews.llvm.org/D147823 Files: clang/test/Interpreter/Inputs/dynamic-library-test.cpp

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-04-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Have you thought of the possibility of handling this case takeOptionalValue(std::move(*param)); Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/optional-value-conversion.rst:34 +Value extraction using ``operator *`` is matched by

[PATCH] D147962: [RFC][clang] Pull experimental targets' info out of TargetInfo.cpp (NFC)

2023-04-10 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 created this revision. Herald added a project: All. barannikov88 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D147962 Files: clang/lib/CodeGen/ABIInfoImpl.h

[PATCH] D147904: [Clang] Fix cast to BigIntType in hasUniqueObjectRepresentations

2023-04-10 Thread Roy Jacobson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG016970d079c4: [Clang] Fix cast to BigIntType in hasUniqueObjectRepresentations (authored by royjacobson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 016970d - [Clang] Fix cast to BigIntType in hasUniqueObjectRepresentations

2023-04-10 Thread Roy Jacobson via cfe-commits
Author: Roy Jacobson Date: 2023-04-10T22:11:57+03:00 New Revision: 016970d079c40b99c28c6973df8f7a98e8b8d536 URL: https://github.com/llvm/llvm-project/commit/016970d079c40b99c28c6973df8f7a98e8b8d536 DIFF: https://github.com/llvm/llvm-project/commit/016970d079c40b99c28c6973df8f7a98e8b8d536.diff

[PATCH] D143680: [-Wunsafe-buffer-usage] Improve fix-its for local variable declarations with null pointer initializers

2023-04-10 Thread Ziqing Luo 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 rG63413015099b: [-Wunsafe-buffer-usage] Improve fix-its for local variable declarations with… (authored by ziqingluo-90). Changed prior to commit:

[clang] 6341301 - [-Wunsafe-buffer-usage] Improve fix-its for local variable declarations with null pointer initializers

2023-04-10 Thread via cfe-commits
Author: ziqingluo-90 Date: 2023-04-10T12:08:30-07:00 New Revision: 63413015099bc8aaa45cba7551e8fe432b2b795f URL: https://github.com/llvm/llvm-project/commit/63413015099bc8aaa45cba7551e8fe432b2b795f DIFF: https://github.com/llvm/llvm-project/commit/63413015099bc8aaa45cba7551e8fe432b2b795f.diff

[PATCH] D147894: [clang-format] SortIncludes documentation: remove contradiction in its description

2023-04-10 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. In D147894#4254941 , @MyDeveloperDay wrote: > Sorry I don’t get how this change helps. Removing the option values does make > it clearer IMHO What options? CHANGES SINCE

[PATCH] D147895: [clang-format] Handle Verilog assertions and loops

2023-04-10 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:844 "};"); - ASSERT_EQ(Tokens.size(), 44u); +

[PATCH] D93240: [clang-format] Add SpaceBeforeCaseColon option

2023-04-10 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D93240#4254439 , @sstwcw wrote: > A goto label isn't affected by this option. Is it intentional? Of course, because it's only for `case`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to X3

2023-04-10 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. In D146463#4255927 , @paulkirth wrote: > @asb Are we happy with the state of consensus w.r.t. using `x3`? I think the > lingering concerns from the psABI discussion have been resolved. Yes, all LGTM

[PATCH] D147839: [clang] Add test for CWG2007

2023-04-10 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill added inline comments. Comment at: clang/test/CXX/drs/dr20xx.cpp:20 +// FIXME: the following code shouldn't instantiate A. +// int b = ()->foo; +} shafik wrote: > shafik wrote: > > It looks like gcc and MSVC also instantiate `A` for this case: > >

[PATCH] D147955: [clang-tidy] Extend CheckOptions to support grouping checks options

2023-04-10 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: carlosgalvezp, LegalizeAdulthood, aaron.ballman. Herald added subscribers: arphaman, mgrang, xazax.hun. Herald added a project: All. njames93 requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a

[PATCH] D147733: Set rounding_mode to tonearest in presence of a #pragma STDC FENV_ACCESS OFF.

2023-04-10 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/test/CodeGen/pragma-fenv_access.c:239 +// CHECK-LABEL: @func_20 +// STRICT: call float @llvm.experimental.constrained.fadd.f32(float {{.*}}, float {{.*}}, metadata !"round.tonearest", metadata !"fpexcept.strict") +// DEFAULT:

[PATCH] D147733: Set rounding_mode to tonearest in presence of a #pragma STDC FENV_ACCESS OFF.

2023-04-10 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 512203. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147733/new/ https://reviews.llvm.org/D147733 Files: clang/lib/Sema/SemaAttr.cpp clang/test/CodeGen/pragma-fenv_access.c Index: clang/test/CodeGen/pragma-fenv_access.c

[PATCH] D147839: [clang] Add test for CWG2007

2023-04-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/drs/dr20xx.cpp:20 +// FIXME: the following code shouldn't instantiate A. +// int b = ()->foo; +} shafik wrote: > It looks like gcc and MSVC also instantiate `A` for this case: >

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-10 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added inline comments. Comment at: libcxx/include/__type_traits/is_equality_comparable.h:46 template -struct __is_trivially_equality_comparable +struct __libcpp_is_trivially_equality_comparable : integral_constant philnik wrote: > > Mordante wrote: > > > This does

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-10 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik updated this revision to Diff 512201. philnik marked 3 inline comments as done. philnik added a comment. - Moved libc++ changes into it's own PR - Rebased - Fixed `enum` false-positive Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to X3

2023-04-10 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. @asb Are we happy with the state of consensus w.r.t. using `x3`? I think the lingering concerns from the psABI discussion have been resolved. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146463/new/

[PATCH] D141775: [Clang] Export CanPassInRegisters as a type trait

2023-04-10 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. Is this essentially "is_trivial_for_the_purposes_of_abi"? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141775/new/ https://reviews.llvm.org/D141775 ___ cfe-commits mailing list

[PATCH] D147839: [clang] Add test for CWG2007

2023-04-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/drs/dr20xx.cpp:20 +// FIXME: the following code shouldn't instantiate A. +// int b = ()->foo; +} It looks like gcc and MSVC also instantiate `A` for this case: https://godbolt.org/z/8W8eYoa38 I have to

[PATCH] D146595: [clang] Add "debug_trampoline" attribute

2023-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The Clang attribute bits generally LG, but I don't know enough on the debug info bits to say. In terms of behavior in PDB files, I'd still like for this attribute to be supported across all debug info formats. If we know this attribute is going to be ignored for

[PATCH] D147834: [clang][driver] Pass `-femulated-tls` through to the linker in LTO mode

2023-04-10 Thread Paul Kirth 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 rGa78816a6b6de: [clang][driver] Pass `-femulated-tls` through to the linker in LTO mode (authored by paulkirth). Repository: rG LLVM Github

[clang] a78816a - [clang][driver] Pass `-femulated-tls` through to the linker in LTO mode

2023-04-10 Thread Paul Kirth via cfe-commits
Author: Paul Kirth Date: 2023-04-10T17:43:49Z New Revision: a78816a6b6debb548efbf1717aeeb490df42f401 URL: https://github.com/llvm/llvm-project/commit/a78816a6b6debb548efbf1717aeeb490df42f401 DIFF: https://github.com/llvm/llvm-project/commit/a78816a6b6debb548efbf1717aeeb490df42f401.diff LOG:

[PATCH] D147714: [Attr] Introduce [[clang::nonportable_musttail]] as less strict version of [[clang::musttail]]

2023-04-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D147714#4253247 , @xbolva00 wrote: >>> I'm curious if folks have pursued @efriedma 's suggestion #2 from >>> https://github.com/llvm/llvm-project/issues/54964#issuecomment-1101612886? > > This is something we

[PATCH] D147834: [clang][driver] Pass `-femulated-tls` through to the linker in LTO mode

2023-04-10 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147834/new/ https://reviews.llvm.org/D147834 ___ cfe-commits mailing list

[PATCH] D147904: [Clang] Fix cast to BigIntType in hasUniqueObjectRepresentations

2023-04-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb accepted this revision. cjdb added a comment. This revision is now accepted and ready to land. LGTM, thanks for such a quick fix on a weekend :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147904/new/ https://reviews.llvm.org/D147904

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:263 + if (SubstitutedAtomicExpr.get()->isValueDependent()) +return SubstitutedAtomicExpr; erichkeane wrote: > alexander-shaposhnikov wrote: > > erichkeane wrote: > >

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:773 + // ConstrExpr for the inner template will properly adjust the depths. + if (isa(ND) && isa(OtherND)) +ForConstraintInstantiation = true; erichkeane wrote: >

  1   2   3   >