[PATCH] D139926: [clangd] Add semantic tokens for angle brackets

2023-01-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D139926#4032473 , @ckandeler wrote: > In D139926#4030782 , @nridge wrote: > >> It's true that there is an ambiguity between `<` and `>` as operators, vs. >> template arg/param list deli

[PATCH] D141092: Optionally install clang-tblgen to aid cross-compiling

2023-01-07 Thread James Le Cuirot via Phabricator via cfe-commits
chewi updated this revision to Diff 487073. chewi edited the summary of this revision. chewi added a reviewer: nikic. chewi added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Reworked and retested against the main branch. Thankfully, it is simpler now. CHANGE

[PATCH] D141092: Optionally install clang-tblgen to aid cross-compiling

2023-01-07 Thread James Le Cuirot via Phabricator via cfe-commits
chewi added a comment. I forgot to add: I notice you no longer need llvm-tblgen already present when cross-compiling LLVM, but sadly, that still isn't the case for clang-tblgen. I tried leveraging CrossCompile.cmake to perform a "NATIVE" Clang build, but I think a lot more work would be needed

[PATCH] D141192: [Clang] Add warnings on bad shifts inside enums.

2023-01-07 Thread Dmitriy Chestnykh via Phabricator via cfe-commits
chestnykh created this revision. chestnykh added a reviewer: MaskRay. Herald added a subscriber: StephenFan. Herald added a project: All. chestnykh requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Those warnings were gone because DiagRuntime

[PATCH] D141193: [clang][Interp] Implement __builtin_assume

2023-01-07 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Just ignore it. As part of this, move the Re

[PATCH] D141194: [clang][Interp] Implement bitcasts

2023-01-07 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I really don't know much about these, so limited te

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487081. ccotter added a comment. - Use "capture default" consistently and update diagnostic message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-to

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487082. ccotter added a comment. oops, bad 'arc diff' again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/A

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487084. ccotter added a comment. - typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureThisWithC

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked an inline comment as done. ccotter added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-capture-this-with-capture-default.cpp:9 +auto explicit_this_capture = [=, this]() { }; +// CHECK-MESSAGES: :[[@LINE-1]]

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked an inline comment as done and an inline comment as not done. ccotter added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-capture-this-with-capture-default.cpp:9 +auto explicit_this_capture = [=, this]() { }; +

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-07 Thread Fabian Keßler via Phabricator via cfe-commits
Febbe added a comment. In D141058#4028768 , @v1nh1shungry wrote: > Sorry, I don't know how to add tests for such fixes. Could anyone please give > me some hints? Thanks! It seems like the tests for this check do not contain checks for the fixups itsel

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-capture-this-with-capture-default.cpp:9 +auto explicit_this_capture = [=, this]() { }; +// CHECK-MESSAGES: :[[@LINE-1]]:35: warning: lambdas that capture t

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-capture-this-with-capture-default.cpp:9 +auto explicit_this_capture = [=, this]() { }; +// CHECK-MESSAGES: :[[@LINE-1]]:35: warning: lambdas that capture this s

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-07 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thank you for reviewing and giving suggestions! @Febbe Please take a look at my reply. Sorry if I misunderstood anything! Comment at: clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.cpp:215 (Tw

[PATCH] D141198: [NFC][Clang][RISCV] Reorganize test case for rvv intrinsics

2023-01-07 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD created this revision. eopXD added reviewers: craig.topper, kito-cheng, frasercrmck, reames, jrtc27. Herald added subscribers: sunshaoce, VincentWu, StephenFan, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, arphaman, the_o, brucehoult, Mar

[PATCH] D141198: [Clang][RISCV][NFC] Reorganize test case for rvv intrinsics

2023-01-07 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 487094. eopXD added a comment. Rebase to latest main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141198/new/ https://reviews.llvm.org/D141198 Files: clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/no

[PATCH] D141198: [Clang][RISCV][NFC] Reorganize test case for rvv intrinsics

2023-01-07 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD added a comment. The testing time difference is shown below. I personally think 3 more minutes in testing is tolerable when considering `check-all`. The testing time increase comes from full test coverage to the intrinsics. Before this patch, some test cases only includes parts of the {SE

[PATCH] D140860: [Diagnostics][NFC] Fix -Wlogical-op-parentheses warning inconsistency for const and constexpr values

2023-01-07 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. I have yet to do thorough checks using this patched clang to build significant code bases. It will likely take quite a bit of time as I am not used to editing build tool files. Instead, I used `grep` to find potentially newly-warned codes. The `grep` command is shown

[PATCH] D141198: [Clang][RISCV][NFC] Reorganize test case for rvv intrinsics

2023-01-07 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD added a comment. The patch application failure probably is due to the large amount of changes in this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141198/new/ https://reviews.llvm.org/D141198

[PATCH] D141198: [Clang][RISCV][NFC] Reorganize test case for rvv intrinsics

2023-01-07 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD added a comment. I have created a branch under my forked repo. for people to checkout this commit conveniently. https://github.com/eopXD/llvm-project/tree/reorganize-testcase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141198/new/ https:/

[PATCH] D140795: [Flang] Add user option -funderscoring/-fnounderscoring to enable/disable ExternalNameConversionPass

2023-01-07 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D140795#4031392 , @kkwli0 wrote: > The purpose of this option is to control the trailing underscore being > appended to external names (e.g. procedure names, common block names). The > option in gfortran is documented in

[PATCH] D127812: [AArch64] FMV support and necessary target features dependencies.

2023-01-07 Thread Pavel Iliin via Phabricator via cfe-commits
ilinpv added a comment. In D127812#4031994 , @smeenai wrote: > You're right that it conceptually makes sense for this to be in `cpu_model.c` > though. An alternative would be providing an option for compiler-rt to be > built without the multiversioning

[PATCH] D140925: [CMake] Use Clang to infer the target triple

2023-01-07 Thread Tamás Szelei via Phabricator via cfe-commits
tamas added inline comments. Comment at: runtimes/CMakeLists.txt:168 +if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + set(CXX_TARGET_TRIPLE ${CMAKE_CXX_COMPILER} --target=${LLVM_RUNTIME_TRIPLE} -print-target-triple) + execute_process(COMMAND ${CXX_TARGET_TRIPLE} ---

[clang] b712aef - [llvm-driver] Mark some tests unsupported

2023-01-07 Thread Alex Brachet via cfe-commits
Author: Alex Brachet Date: 2023-01-07T17:45:26Z New Revision: b712aef5b37e4e98fcc7bd1a6cfc3bac2d7af0d0 URL: https://github.com/llvm/llvm-project/commit/b712aef5b37e4e98fcc7bd1a6cfc3bac2d7af0d0 DIFF: https://github.com/llvm/llvm-project/commit/b712aef5b37e4e98fcc7bd1a6cfc3bac2d7af0d0.diff LOG:

[PATCH] D141177: [Clang] Don't tell people to place _Alignas on a struct in diagnostics

2023-01-07 Thread Theodore Luo Wang via Phabricator via cfe-commits
theo-lw updated this revision to Diff 487103. theo-lw added a comment. Accidentally deleted a line causing this to not compile :( CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141177/new/ https://reviews.llvm.org/D141177 Files: clang/lib/Sema/SemaDecl.cpp clang/test/Parser/c1x-alig

[PATCH] D141192: [Clang] Add warnings on bad shifts inside enums.

2023-01-07 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. So it looks like in `handleIntIntBinOp` we do hit this code: unsigned SA = (unsigned) RHS.getLimitedValue(LHS.getBitWidth()-1); if (SA != RHS) { Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth(); So maybe we sho

[PATCH] D141192: [Clang] Add warnings on bad shifts inside enums.

2023-01-07 Thread Dmitriy Chestnykh via Phabricator via cfe-commits
chestnykh added a comment. In D141192#4033591 , @shafik wrote: > So it looks like in `handleIntIntBinOp` we do hit this code: > > unsigned SA = (unsigned) RHS.getLimitedValue(LHS.getBitWidth()-1); >if (SA != RHS) { > Info.CCEDiag(E, diag::note_

[clang] 6fe70cb - clang/AMDGPU: Force disable block enqueue arguments for HIP

2023-01-07 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2023-01-07T13:39:05-05:00 New Revision: 6fe70cb465654eafafd272231e23762adeab4290 URL: https://github.com/llvm/llvm-project/commit/6fe70cb465654eafafd272231e23762adeab4290 DIFF: https://github.com/llvm/llvm-project/commit/6fe70cb465654eafafd272231e23762adeab4290.diff

[PATCH] D140059: [APSInt] Fix bug in APSInt mentioned in https://github.com/llvm/llvm-project/issues/59515

2023-01-07 Thread Peter Rong via Phabricator via cfe-commits
Peter updated this revision to Diff 487118. Peter added a comment. [DebugInfo] update clang to match semantics changes in APSInt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140059/new/ https://reviews.llvm.org/D140059 Files: clang/lib/CodeGen/

[PATCH] D140059: [APSInt] Fix bug in APSInt mentioned in https://github.com/llvm/llvm-project/issues/59515

2023-01-07 Thread Peter Rong via Phabricator via cfe-commits
Peter marked an inline comment as done. Peter added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:5386 + if (InitInt) +InitExpr = DBuilder.createConstantValueExpression(InitInt.value()); +} else if (Init.isFloat()) efriedma wrote

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureThisWithCaptureDefaultCheck.cpp:35 +Capture.getLocation(), SourceMgr, Context.getLangOpts(), tok::amp); +llvm::errs() << "FOR REF capture loc= " +

[PATCH] D141177: [Clang] Don't tell people to place _Alignas on a struct in diagnostics

2023-01-07 Thread Theodore Luo Wang via Phabricator via cfe-commits
theo-lw updated this revision to Diff 487119. theo-lw added a comment. Didn't realize this test was failing so I've updated it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141177/new/ https://reviews.llvm.org/D141177 Files: clang/lib/Sema/SemaDecl.cpp clang/test/C/drs/dr4xx.c c

[PATCH] D141098: [clang-format][NFC] Set DeriveLineEnding to false in config files

2023-01-07 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D141098#4032951 , @rymiel wrote: >> I think we should combine `DeriveLineEnding` and `UseCRLF` > > Do you mean a single `LineEnding` options which is an enum with `LF`, `CRLF` > and `Derive`, or similar? Yep. Repository:

[PATCH] D141206: [clang] [MinGW] Avoid adding /include and /lib when cross compiling

2023-01-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: mati865, alvinhochun. Herald added a subscriber: pengfei. Herald added a project: All. mstorsjo requested review of this revision. Herald added a subscriber: MaskRay. Herald added a project: clang. The MinGW compiler driver first tries to d

[PATCH] D141206: [clang] [MinGW] Avoid adding /include and /lib when cross compiling

2023-01-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Also, this patch is lacking tests for now - mostly bringing it up for discussion first - I can add tests if others agree that it seems like a reasonable path forward. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141206/n

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487130. ccotter added a comment. - rm trace; tidy docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidC

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-07 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked 2 inline comments as done. ccotter added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureThisWithCaptureDefaultCheck.cpp:35 +Capture.getLocation(), SourceMgr, Context.getLangOpts(), tok::amp); +llvm::errs

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2023-01-07 Thread H. Vetinari via Phabricator via cfe-commits
h-vetinari added a comment. Without undue haste, I just wanted to comment from the peanut gallery that it would be amazing if the patches that are necessary for CMake + Clang to use C++ modules would make the cut-off for LLVM 16 that's coming up around the 24th of January. CHANGES SINCE LAST

[clang-tools-extra] 71f5573 - [clang-tools-extra] Add #include (NFC)

2023-01-07 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-01-07T20:02:20-08:00 New Revision: 71f557355ddaea358c43b151de3a0e045aaa0863 URL: https://github.com/llvm/llvm-project/commit/71f557355ddaea358c43b151de3a0e045aaa0863 DIFF: https://github.com/llvm/llvm-project/commit/71f557355ddaea358c43b151de3a0e045aaa0863.diff L

[clang-tools-extra] 29ffafb - [clang-tools-extra] Remove remaining uses of llvm::Optional (NFC)

2023-01-07 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-01-07T20:34:53-08:00 New Revision: 29ffafb5754100502da70171b47ee8a0f722c994 URL: https://github.com/llvm/llvm-project/commit/29ffafb5754100502da70171b47ee8a0f722c994 DIFF: https://github.com/llvm/llvm-project/commit/29ffafb5754100502da70171b47ee8a0f722c994.diff L

[PATCH] D141215: [clang-repl][WIP] Implement pretty printing

2023-01-07 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch implements the initial value pretty printing for clang-repl. In general, when clang-repl finds something need to

[PATCH] D141192: [Clang] Add warnings on bad shifts inside enums.

2023-01-07 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D141192#4033591 , @shafik wrote: > So it looks like in `handleIntIntBinOp` we do hit this code: > > unsigned SA = (unsigned) RHS.getLimitedValue(LHS.getBitWidth()-1); >if (SA != RHS) { > Info.CCEDiag(E, diag::note_co