[PATCH] D140814: [clangd] show underlying type in type hint for `decltype(expr)`

2023-01-02 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 485923. v1nh1shungry added a comment. move the comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140814/new/ https://reviews.llvm.org/D140814 Files: clang-tools-extra/clangd/InlayHints.cpp

[clang] 367e618 - [C++20] [Modules] Emit full specialization of variable template as available externally in importers

2023-01-02 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-01-03T14:48:29+08:00 New Revision: 367e618fd605353ad77bb78f884c758948f0d573 URL: https://github.com/llvm/llvm-project/commit/367e618fd605353ad77bb78f884c758948f0d573 DIFF: https://github.com/llvm/llvm-project/commit/367e618fd605353ad77bb78f884c758948f0d573.diff

[PATCH] D140814: [clangd] show underlying type in type hint for `decltype(expr)`

2023-01-02 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks! Comment at: clang-tools-extra/clangd/InlayHints.cpp:665 + // The sugared type is more useful in some cases, and the canonical + // type in other cases. For now,

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2023-01-02 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D140775#4021967 , @tom-anders wrote: > In D140775#4021634 , @nridge wrote: > >> Do you want to add a simple test case for a non-literal expression? >> Something like hovering over the

[PATCH] D140685: [LoongArch] Add intrinsics for MOVFCSR2GR and MOVGR2FCSR instructions

2023-01-02 Thread Xiaodong Liu via Phabricator via cfe-commits
XiaodongLoong updated this revision to Diff 485921. XiaodongLoong added a comment. rebase code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140685/new/ https://reviews.llvm.org/D140685 Files: clang/include/clang/Basic/BuiltinsLoongArch.def

[PATCH] D140817: [Driver] move NetBSD header search path management to the driver

2023-01-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay 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/D140817/new/ https://reviews.llvm.org/D140817

[clang] d0ce367 - [C++20] [Modules] Fix a crash when instantiate hidden friends

2023-01-02 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-01-03T13:37:57+08:00 New Revision: d0ce367a97137e6c2b28f1e18988fd7888bcea0a URL: https://github.com/llvm/llvm-project/commit/d0ce367a97137e6c2b28f1e18988fd7888bcea0a DIFF: https://github.com/llvm/llvm-project/commit/d0ce367a97137e6c2b28f1e18988fd7888bcea0a.diff

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 485912. MaskRay added a comment. use `%itanium_abi_triple`. remove `-S` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140868/new/ https://reviews.llvm.org/D140868 Files: clang/include/clang/AST/ASTContext.h

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: aaron.ballman, mizvekov, rjmccall. Herald added a subscriber: StephenFan. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In C mode, if e1 is

[clang] fbc8697 - [clang-format][NFC] Remove a superfluous semicolon after \version

2023-01-02 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-01-02T18:55:30-08:00 New Revision: fbc86973b58d7fe735596dfbe38884bc9398e52c URL: https://github.com/llvm/llvm-project/commit/fbc86973b58d7fe735596dfbe38884bc9398e52c DIFF: https://github.com/llvm/llvm-project/commit/fbc86973b58d7fe735596dfbe38884bc9398e52c.diff

[PATCH] D140662: [NFC][Clang][RISCV] Reduce boilerplate when determining prototype for segment loads

2023-01-02 Thread Yueh-Ting (eop) Chen 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 rGf2bec8702688: [NFC][Clang][RISCV] Reduce boilerplate when determining prototype for segment… (authored by eopXD). Repository: rG LLVM Github

[clang] f2bec87 - [NFC][Clang][RISCV] Reduce boilerplate when determining prototype for segment loads

2023-01-02 Thread via cfe-commits
Author: eopXD Date: 2023-01-02T18:50:36-08:00 New Revision: f2bec8702688ea034cefcf4e13922aa4d40bd4a0 URL: https://github.com/llvm/llvm-project/commit/f2bec8702688ea034cefcf4e13922aa4d40bd4a0 DIFF: https://github.com/llvm/llvm-project/commit/f2bec8702688ea034cefcf4e13922aa4d40bd4a0.diff LOG:

[PATCH] D140270: MIPS: fix build from IR files, nan2008 and FpAbi

2023-01-02 Thread YunQiang Su via Phabricator via cfe-commits
wzssyqa updated this revision to Diff 485898. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140270/new/ https://reviews.llvm.org/D140270 Files: clang/lib/Driver/ToolChains/Arch/Mips.cpp clang/test/Driver/mips-as.c

[PATCH] D140270: MIPS: fix build from IR files, nan2008 and FpAbi

2023-01-02 Thread YunQiang Su via Phabricator via cfe-commits
wzssyqa updated this revision to Diff 485897. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140270/new/ https://reviews.llvm.org/D140270 Files: clang/lib/Driver/ToolChains/Arch/Mips.cpp clang/test/Driver/mips-as.c

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

2023-01-02 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added a project: clang. Herald added a project: All. hazohelet requested review of this revision. When using the `&&` operator within a `||` operator, both Clang and GCC produce a warning for potentially confusing operator precedence. However, Clang

[PATCH] D140859: [clang][dataflow] Allow analyzing multiple functions in unit tests

2023-01-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr created this revision. Herald added subscribers: martong, xazax.hun. Herald added a project: All. gribozavr requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In unit tests for concrete dataflow analyses we typically use the

[clang-tools-extra] 2c675be - [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC)

2023-01-02 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-01-02T16:17:40-08:00 New Revision: 2c675be9b232c1d0b5c55cbcb196e71036c681ea URL: https://github.com/llvm/llvm-project/commit/2c675be9b232c1d0b5c55cbcb196e71036c681ea DIFF: https://github.com/llvm/llvm-project/commit/2c675be9b232c1d0b5c55cbcb196e71036c681ea.diff

[clang] 9cf4419 - [clang] Use std::optional instead of llvm::Optional (NFC)

2023-01-02 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-01-02T15:54:57-08:00 New Revision: 9cf4419e2451febf09acdf28c7d52ebf436d3a7e URL: https://github.com/llvm/llvm-project/commit/9cf4419e2451febf09acdf28c7d52ebf436d3a7e DIFF: https://github.com/llvm/llvm-project/commit/9cf4419e2451febf09acdf28c7d52ebf436d3a7e.diff

[PATCH] D140857: Fix Fuchsia dyld in asan-ubsan variant

2023-01-02 Thread Shai Barack via Phabricator via cfe-commits
shayba created this revision. shayba added reviewers: phosek, leonardchan. Herald added a subscriber: abrachet. Herald added a project: All. shayba requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. The Clang Fuchsia driver sets

[clang] 5674385 - [clang][dataflow] Remove unused includes

2023-01-02 Thread Dmitri Gribenko via cfe-commits
Author: Dmitri Gribenko Date: 2023-01-02T23:34:24+01:00 New Revision: 5674385577f144db2131278449665994acff035c URL: https://github.com/llvm/llvm-project/commit/5674385577f144db2131278449665994acff035c DIFF:

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2023-01-02 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D140775#4021634 , @nridge wrote: > Do you want to add a simple test case for a non-literal expression? Something > like hovering over the `+` in `2 + 3` should work. Will do! > Also, this is pre-existing, but I noticed

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2023-01-02 Thread Fabian Keßler via Phabricator via cfe-commits
Febbe added a comment. In D137205#4018548 , @ccotter wrote: > @Febbe - Really glad to see this phab up! Not having realized this phab was > in progress, I implemented this a few months back (though, originally not as > a clang-tidy tool and never

[PATCH] D139935: [NFC] [Doc] Fix example for AnnotateTypeDocs

2023-01-02 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. Happy new year and ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139935/new/ https://reviews.llvm.org/D139935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D137790: [clang][analyzer] Remove report of null stream from StreamChecker.

2023-01-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Are you sure that the refactoring made no changes to the results? Could you maybe just run a nightly or something like that to confirm? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137790/new/

[PATCH] D140395: [clang][analyzer] Extend StreamChecker with some new functions.

2023-01-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Does this patch fix any false positives from before, or is this just all new stuff? I ask, because I wonder whats the shortest path towards popping these checkers out of alpha, and fix what we already have. By no means am I saying that we should postpone landing

[PATCH] D140339: [clang-format] Remove special logic for parsing concept definitions.

2023-01-02 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:23946-23947 - verifyFormat("template \n" - "concept C =\n" - "class X;"); owenpan wrote: > Just want to make sure that the line break didn't matter.

[PATCH] D140845: [clang][Interp] Fix left-/right-shifting more than sizeof(unsigned)

2023-01-02 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. We were just casting to `unsigned` before, so

[PATCH] D140387: [clang][analyzer] Add stream related functions to StdLibraryFunctionsChecker.

2023-01-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ErrnoModeling.cpp:310 + const MemRegion *ErrnoR = State->get(); + if (!ErrnoR) +return State; Szelethus wrote: > When can this occur? Maybe we can turn this early return to an

[PATCH] D140843: [clang-format] fix template closer followed by >

2023-01-02 Thread Zhikai Zeng via Phabricator via cfe-commits
Backl1ght created this revision. Backl1ght added reviewers: HazardyKnusperkeks, MyDeveloperDay. Backl1ght added a project: clang-format. Herald added a project: All. Backl1ght requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch is

[PATCH] D112680: [OpenMP] Lower printf to __llvm_omp_vprintf

2023-01-02 Thread Ron Lieberman via Phabricator via cfe-commits
ronlieb added a comment. Herald added subscribers: kosarev, mattd. Herald added a project: All. @JonChesterfield i am seeing the testcase bug50022.cpp occasionally randomly failing in amdgpu bbot most recently: https://lab.llvm.org/buildbot/#/builders/193/builds/24230 the same bbot in

[PATCH] D140757: [Hexagon][VE][WebAssembly] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros

2023-01-02 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz accepted this revision. kparzysz added a comment. This revision is now accepted and ready to land. All of Hexagon's atomics are implemented using load-locked/store-conditional. If that meets the expectations of these macros, then this is fine with me. Repository: rG LLVM Github

[PATCH] D140387: [clang][analyzer] Add stream related functions to StdLibraryFunctionsChecker.

2023-01-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Would be possible to test the errno specific changes as well? Comment at: clang/lib/StaticAnalyzer/Checkers/ErrnoModeling.cpp:310 + const MemRegion *ErrnoR = State->get(); + if (!ErrnoR) +return State; When can this occur?

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2023-01-02 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked 4 inline comments as done. ccotter added a comment. In D140793#4021694 , @carlosgalvezp wrote: > LGTM, thanks for the patch! Maybe wait a couple days before landing to give > some extra time for other reviewers. You might also want to

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-02 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 485858. fpetrogalli added a comment. Fix pre-merge check at https://buildkite.com/llvm-project/premerge-checks/builds/128468#0185724f-5ade-4603-99ce-f417efb546e8 (missing header inclusion):

[PATCH] D136554: Implement CWG2631

2023-01-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D136554#4020387 , @MaskRay wrote: > @rupprecht You may consider contributing some interesting tests (which work > before this patch) in a separate patch:) Well, all the failures reported have been reduced and added as test

[PATCH] D140532: .clang-tidy: disable misc-use-anonymous-namespace check.

2023-01-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D140532#4012879 , @sammccall wrote: > Yeah, good call. Do you mind if I first use this as a trigger to start a > thread about this style rule on discourse, though? I've been meaning to, it > came up in a review recently.

[PATCH] D140018: [clang-tidy] Support std::string_view in readability-redundant-string-cstr

2023-01-02 Thread Tamas Berghammer via Phabricator via cfe-commits
tberghammer added a comment. Sorry, I was away during the holidays but just pushed the change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140018/new/ https://reviews.llvm.org/D140018 ___ cfe-commits

[PATCH] D140018: [clang-tidy] Support std::string_view in readability-redundant-string-cstr

2023-01-02 Thread Tamas Berghammer 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 rGf325b5b8cb1d: [clang-tidy] Support std::string_view in readability-redundant-string-cstr (authored by tberghammer). Repository: rG LLVM Github

[clang-tools-extra] f325b5b - [clang-tidy] Support std::string_view in readability-redundant-string-cstr

2023-01-02 Thread Tamas Berghammer via cfe-commits
Author: Tamas Berghammer Date: 2023-01-02T06:24:00-05:00 New Revision: f325b5b8cb1d6c16dd04c88380caea7b0a7750eb URL: https://github.com/llvm/llvm-project/commit/f325b5b8cb1d6c16dd04c88380caea7b0a7750eb DIFF:

[PATCH] D139534: [analyzer] Don't escape local static memregions on bind

2023-01-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Let me know if you have further concerns. @xazax.hun @NoQ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139534/new/ https://reviews.llvm.org/D139534 ___ cfe-commits mailing

[PATCH] D140814: [clangd] show underlying type in type hint for `decltype(expr)`

2023-01-02 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry marked an inline comment as done. v1nh1shungry added a comment. Thanks for reviewing and giving suggestions! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140814/new/ https://reviews.llvm.org/D140814

[PATCH] D140814: [clangd] show underlying type in type hint for `decltype(expr)`

2023-01-02 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 485854. v1nh1shungry added a comment. apply comment's suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140814/new/ https://reviews.llvm.org/D140814 Files:

[PATCH] D140018: [clang-tidy] Support std::string_view in readability-redundant-string-cstr

2023-01-02 Thread Tamas Berghammer via Phabricator via cfe-commits
tberghammer updated this revision to Diff 485853. tberghammer added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140018/new/ https://reviews.llvm.org/D140018 Files:

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-02 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 485852. fpetrogalli added a comment. NFC - just an update on top of current `main`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/D137517 Files:

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

2023-01-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseInlineConstVariablesInHeadersCheck.cpp:21-23 +AST_MATCHER(NamedDecl, isInAnonymousNamespace) { + return Node.isInAnonymousNamespace(); +} I recently added this matcher

[PATCH] D139458: [clangd] Full support for #import insertions

2023-01-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ASTSignals.h:39 + + static Symbol::IncludeDirective preferredIncludeDirective( + llvm::StringRef Filename, const LangOptions , could you rather move this to `AST.h`, with some comments

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2023-01-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp accepted this revision. carlosgalvezp added a comment. This revision is now accepted and ready to land. LGTM, thanks for the patch! Maybe wait a couple days before landing to give some extra time for other reviewers. You might also want to mark the comments as "Done", so reviewers

[PATCH] D140000: [clangd] Compute the unused includes in the check mode.

2023-01-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. what's the motivating reason behind the change? we'll soon change the implementation to use include-cleaner instead, and can run the tool directly to verify the findings (rather than clangd). hence i feel like this will just turn into not-so-useful extra output for

[PATCH] D140814: [clangd] show underlying type in type hint for `decltype(expr)`

2023-01-02 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks, I think this behaviour change is reasonable. Comment at: clang-tools-extra/clangd/InlayHints.cpp:667 +// print the underlying type for `decltype(expr)` +if (T->isDecltypeType()) + TypeHintPolicy.PrintCanonicalTypes = true;

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2023-01-02 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Do you want to add a simple test case for a non-literal expression? Something like hovering over the `+` in `2 + 3` should work. Also, this is pre-existing, but I noticed that in a case like this: void bar(int); void func() { int x = 42; bar(x); } the

[PATCH] D140339: [clang-format] Remove special logic for parsing concept definitions.

2023-01-02 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:23593-23594 - "template \n" - "concept DelayedCheck = static_cast(0) ||\n" - " requires(T t) { t.bar(); } && sizeof(T) <= 8;");