[PATCH] D138429: [clang][RISCV][NFC] Prevent data race in RVVType::computeType

2022-11-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/include/clang/Support/RISCVVIntrinsicUtils.h:289 + + static uint64_t computeRVVTypeHashValue(BasicType BT, int Log2LMUL, + PrototypeDescriptor Proto); khchen wrote: >

[PATCH] D138474: [clang] Speedup LineOffsetMapping::get

2022-11-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: aaron.ballman, nikic, lattner. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. LineOffsetMapping::get is a critical

[PATCH] D108230: [analyzer] Ignore single element arrays in getStaticSize() conditionally

2022-11-21 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D108230#3942374 , @xazax.hun wrote: > I am a bit conflicted. It is unfortunate that C and C++ compilers regarded > single element array members as flexible array members. On the other hand, > looking at GCC, it recently

[PATCH] D138472: clang/cmake: Use installed gtest libraries for stand-alone builds

2022-11-21 Thread Tom Stellard via Phabricator via cfe-commits
tstellar created this revision. tstellar added reviewers: mgorny, phosek, Ericson2314. Herald added a project: All. tstellar requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D138472 Files: clang/CMakeLists.txt

[PATCH] D136806: [Pipelines] Introduce SROA after (final, full) loop unrolling

2022-11-21 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. Hi @lebedev.ri, we recently noticed a failure in one of our internal tests which I bisected back to your change. I have filed the details in Issue #59122 . Can you take a look? Repository: rG LLVM Github Monorepo

[PATCH] D138247: PR58819: Correct linkage and mangling of lambdas in inline static member initializers

2022-11-21 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. From Gentoo perspective, correct is better, correct and matching GCC is the best (we support mixing compilers to some degree). I think it'd be best to wait for confirmation on GCC end. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138109: [clang] Fix -fp-model={strict|precise} to disable -fapprox-func

2022-11-21 Thread KAWASHIMA Takahiro via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. kawashima-fj marked an inline comment as done. Closed by commit rG3a95d7d0983a: [clang] Fix -fp-model={strict|precise} to disable -fapprox-func (authored by kawashima-fj). Changed prior to commit:

[clang] 3a95d7d - [clang] Fix -fp-model={strict|precise} to disable -fapprox-func

2022-11-21 Thread KAWASHIMA Takahiro via cfe-commits
Author: KAWASHIMA Takahiro Date: 2022-11-22T13:04:26+09:00 New Revision: 3a95d7d0983af26811e72d238d94f11c25f1851a URL: https://github.com/llvm/llvm-project/commit/3a95d7d0983af26811e72d238d94f11c25f1851a DIFF:

[PATCH] D138464: Return None instead of Optional() (NFC)

2022-11-21 Thread Kazu Hirata 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 rG6ba4b62af8df: Return None instead of OptionalT() (NFC) (authored by kazu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 6ba4b62 - Return None instead of Optional() (NFC)

2022-11-21 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-11-21T19:06:42-08:00 New Revision: 6ba4b62af8df00edb7e1cc0c473f6770fb1cfe3b URL: https://github.com/llvm/llvm-project/commit/6ba4b62af8df00edb7e1cc0c473f6770fb1cfe3b DIFF: https://github.com/llvm/llvm-project/commit/6ba4b62af8df00edb7e1cc0c473f6770fb1cfe3b.diff

[PATCH] D138466: Don't use Optional::getPointer (NFC)

2022-11-21 Thread Kazu Hirata 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 rG1f914944b6c9: Dont use Optional::getPointer (NFC) (authored by kazu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 1f91494 - Don't use Optional::getPointer (NFC)

2022-11-21 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-11-21T19:03:40-08:00 New Revision: 1f914944b6c9a5e4229ceb9f06140fdf178c5ea0 URL: https://github.com/llvm/llvm-project/commit/1f914944b6c9a5e4229ceb9f06140fdf178c5ea0 DIFF: https://github.com/llvm/llvm-project/commit/1f914944b6c9a5e4229ceb9f06140fdf178c5ea0.diff

[PATCH] D138466: Don't use Optional::getPointer (NFC)

2022-11-21 Thread Kazu Hirata via Phabricator via cfe-commits
kazu added a comment. Thanks for the review! In D138466#3942622 , @MaskRay wrote: > `getPointer` asserts `hasValue`, so `&*` is safe, Yes. `operator*` also asserts `hasVal` via `value()`, so we maintain the same level of safety. Repository: rG

[PATCH] D138464: Return None instead of Optional() (NFC)

2022-11-21 Thread Kazu Hirata via Phabricator via cfe-commits
kazu added a comment. Thanks for the review! In D138464#3942626 , @MaskRay wrote: > We have `return llvm::None;` and `return None;`. Shall we always prefer > `llvm::None`? Either one is OK (to me). I can deprecate `None` in my personal tree, and get

[PATCH] D138464: Return None instead of Optional() (NFC)

2022-11-21 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. We have `return llvm::None;` and `return None;`. Shall we always prefer `llvm::None`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138466: Don't use Optional::getPointer (NFC)

2022-11-21 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. `getPointer` asserts `hasValue`, so `&*` is safe, Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138466/new/ https://reviews.llvm.org/D138466

[PATCH] D138458: [Clang][Driver] Add KCFI to SupportsCoverage

2022-11-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/sanitize-coverage.c:94 + // CHECK-NOT: call void @__sanitizer_cov_trace_const_cmp + // KCFI-NOT: call void %{{.}}() [ "kcfi"(i32 {{.*}}) ] + f(); samitolvanen wrote: > MaskRay wrote: > > `%c()` > >

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-21 Thread WangWei via Phabricator via cfe-commits
lightmelodies added a comment. In D131295#3935759 , @Trass3r wrote: > Yeah quite complex: https://godbolt.org/z/8T5Pqadro Not very hard with a track of visited decls. It should also reslove other duplicate codelens.

[PATCH] D138466: Don't use Optional::getPointer (NFC)

2022-11-21 Thread Kazu Hirata via Phabricator via cfe-commits
kazu created this revision. Herald added subscribers: kadircet, arphaman, javed.absar, hiraditya. Herald added a project: All. kazu requested review of this revision. Herald added projects: clang, LLVM, clang-tools-extra. Herald added subscribers: cfe-commits, llvm-commits. Since std::optional

[PATCH] D138425: [clangd] Parameter hints for template specialization

2022-11-21 Thread v1nh1shungry via Phabricator via cfe-commits
v1nh1shungry abandoned this revision. v1nh1shungry added a comment. Sorry for the delay. I'd say I was convinced and about to abandon this patch. Sincere apologies for wasting everyone's time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138464: Return None instead of Optional() (NFC)

2022-11-21 Thread Kazu Hirata via Phabricator via cfe-commits
kazu created this revision. Herald added subscribers: Moerafaat, zero9178, bzcheeseman, ThomasRaoux, pmatos, asb, sdasgup3, wenzhicui, wrengr, jsetoain, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst,

[PATCH] D138088: [clang][docs] Use `option` directive in User's Manual

2022-11-21 Thread KAWASHIMA Takahiro via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG799b6b9f3193: [clang][docs] Use `option` directive in Users Manual (authored by kawashima-fj). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138088/new/

[PATCH] D138429: [clang][RISCV][NFC] Prevent data race in RVVType::computeType

2022-11-21 Thread Zakk Chen via Phabricator via cfe-commits
khchen added inline comments. Comment at: clang/include/clang/Support/RISCVVIntrinsicUtils.h:284 + +class RVVTypeCache { +private: nit: maybe we could add some comments to said the motivation for `RVVTypeCache`. Comment at:

[clang] 9359185 - [clang][docs] Correct indent of option explanation

2022-11-21 Thread KAWASHIMA Takahiro via cfe-commits
Author: KAWASHIMA Takahiro Date: 2022-11-22T10:40:56+09:00 New Revision: 93591851d8416b64ee756a87508add76da2395aa URL: https://github.com/llvm/llvm-project/commit/93591851d8416b64ee756a87508add76da2395aa DIFF:

[clang] 2a0919b - [clang][docs] Remove an unnecessary space

2022-11-21 Thread KAWASHIMA Takahiro via cfe-commits
Author: KAWASHIMA Takahiro Date: 2022-11-22T10:40:55+09:00 New Revision: 2a0919b965b88080ef67fdffe57d3fa8d865d885 URL: https://github.com/llvm/llvm-project/commit/2a0919b965b88080ef67fdffe57d3fa8d865d885 DIFF:

[clang] 799b6b9 - [clang][docs] Use `option` directive in User's Manual

2022-11-21 Thread KAWASHIMA Takahiro via cfe-commits
Author: KAWASHIMA Takahiro Date: 2022-11-22T10:40:54+09:00 New Revision: 799b6b9f3193bd8a4499da063dc7f74cfccadefd URL: https://github.com/llvm/llvm-project/commit/799b6b9f3193bd8a4499da063dc7f74cfccadefd DIFF:

[clang] 9df8ba6 - pr59000: Clarify packed-non-pod warning that it's pod-for-the-purposes-of-layout

2022-11-21 Thread David Blaikie via cfe-commits
Author: David Blaikie Date: 2022-11-22T00:02:09Z New Revision: 9df8ba631d4612eb8f930c9fe7c6cf39e5deb3af URL: https://github.com/llvm/llvm-project/commit/9df8ba631d4612eb8f930c9fe7c6cf39e5deb3af DIFF: https://github.com/llvm/llvm-project/commit/9df8ba631d4612eb8f930c9fe7c6cf39e5deb3af.diff

[PATCH] D108230: [analyzer] Ignore single element arrays in getStaticSize() conditionally

2022-11-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I am a bit conflicted. It is unfortunate that C and C++ compilers regarded single element array members as flexible array members. On the other hand, looking at GCC, it recently added -fstrict-flex-arrays=2

[PATCH] D138326: [CodeView] Don't generate dummy unnamed strcut/class/union type.

2022-11-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk resigned from this revision. rnk added a comment. Seems right to me, but I would prefer if someone else can review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138326/new/ https://reviews.llvm.org/D138326

[PATCH] D138458: [Clang][Driver] Add KCFI to SupportsCoverage

2022-11-21 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen added inline comments. Comment at: clang/test/CodeGen/sanitize-coverage.c:94 + // CHECK-NOT: call void @__sanitizer_cov_trace_const_cmp + // KCFI-NOT: call void %{{.}}() [ "kcfi"(i32 {{.*}}) ] + f(); MaskRay wrote: > `%c()` > > `{{.}}` matches

[PATCH] D138458: [Clang][Driver] Add KCFI to SupportsCoverage

2022-11-21 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 477017. samitolvanen marked an inline comment as done. samitolvanen added a comment. Addressed feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138458/new/ https://reviews.llvm.org/D138458 Files:

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 477014. zequanwu added a comment. Update `Twine` argument to `const Twine&`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137217/new/ https://reviews.llvm.org/D137217 Files:

[PATCH] D137979: parse: process GNU and standard attributes on top-level decls

2022-11-21 Thread Saleem Abdulrasool 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 rGb78d5380da11: parse: process GNU and standard attributes on top-level decls (authored by compnerd). Changed prior to commit:

[clang] b78d538 - parse: process GNU and standard attributes on top-level decls

2022-11-21 Thread Saleem Abdulrasool via cfe-commits
Author: Saleem Abdulrasool Date: 2022-11-21T22:34:50Z New Revision: b78d5380da1184a4df0e3c31146bf50c3dadd5e0 URL: https://github.com/llvm/llvm-project/commit/b78d5380da1184a4df0e3c31146bf50c3dadd5e0 DIFF: https://github.com/llvm/llvm-project/commit/b78d5380da1184a4df0e3c31146bf50c3dadd5e0.diff

[PATCH] D138387: [Clang] Implement static operator[]

2022-11-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:14462-14467 + RLoc, CurFPFeatureOverrides()); +else + TheCall = + CallExpr::Create(Context, FnExpr.get(), MethodArgs, ResultTy, VK, +

[PATCH] D136554: Implement CWG2631

2022-11-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 477003. cor3ntin added a comment. Properly mark default members initializers as ODR-used. default members initializers were marked as maybe odr-used but never actually odr-used. We fix that by checking that an initializer consitutes a full expression at

[PATCH] D138378: [clang-format][NFC] Skip unneeded calculations

2022-11-21 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/WhitespaceManager.cpp:1434-1436 + if (Style.UseTab == FormatStyle::UT_Never) { +ReplacementText.append(Spaces, ' '); + } else { HazardyKnusperkeks wrote: > owenpan wrote: > > Doing

[PATCH] D138402: [clang-format] Correctly count a tab's width in a comment

2022-11-21 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/unittests/Format/FormatTestComments.cpp:736 + "//* 0.2)", + "//\t\t\t\tofMap(message.velocity, 0, 127, 0, ofGetWidth() * 0.2)"); } ``` error: reference to type 'const clang::format::FormatStyle' could

[PATCH] D138426: Fix #58958 on github

2022-11-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Sema/SemaFixItUtils.cpp:135-140 +// Do no take address of const pointer to get void* +const PointerType *FromPtrTy = dyn_cast(FromQTy); +const PointerType *ToPtrTy = dyn_cast(ToQTy); +if (FromPtrTy &&

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D138221#3942095 , @MaskRay wrote: > In D138221#3941173 , @yaxunl wrote: > >> In D138221#3939384 ,

[PATCH] D136594: [clangd] Add support for semantic token type "operator"

2022-11-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.h:76 ConstructorOrDestructor, + UserProvided, ckandeler wrote: > ckandeler wrote: > > sammccall wrote: > > > sammccall wrote: > > > > sammccall wrote: > > > > > Can you

[PATCH] D136594: [clangd] Add support for semantic token type "operator"

2022-11-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D136594#3940482 , @sammccall wrote: > I think since LSP specifies an `operator` SemanticTokenType, we should use it > unless there's a *really* strong reason not to. My bad, I completely overlooked that LSP has a standard

[PATCH] D138425: [clangd] Parameter hints for template specialization

2022-11-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. FWIW, in codebases/components where I do code reviews, I tend to insist on template parameters having meaningful (and longer-than-one-character) names, and would find this quite useful. I agree that while template parameters are technically a kind of parameter, they're

[PATCH] D138458: [Clang][Driver] Add KCFI to SupportsCoverage

2022-11-21 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. > with -fsanitize=trace-{pc,cmp}. `-fsanitize-coverage=` modes such as `trace-{pc,cmp}`. (a) It's `-fsanitize-coverage=`, not `-fsanitize-coverage=trace-{pc,cmp}`. (b) `

[PATCH] D138426: Fix #58958 on github

2022-11-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaFixItUtils.cpp:136-137 +// Do no take address of const pointer to get void* +const PointerType *FromPtrTy = dyn_cast(FromQTy); +const PointerType *ToPtrTy = dyn_cast(ToQTy); +if (FromPtrTy &&

[PATCH] D138426: Fix #58958 on github

2022-11-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaFixItUtils.cpp:136-137 +// Do no take address of const pointer to get void* +const PointerType *FromPtrTy = dyn_cast(FromQTy); +const PointerType *ToPtrTy = dyn_cast(ToQTy); +if (FromPtrTy &&

[PATCH] D138458: [Clang][Driver] Add KCFI to SupportsCoverage

2022-11-21 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen created this revision. Herald added a project: All. samitolvanen requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Allow -fsanitize=kcfi to be enabled with -fsanitize=trace-{pc,cmp}. Link:

[PATCH] D138234: [clang-format] Support new file formatting with vim

2022-11-21 Thread Jinsong Ji 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 rG86278114085b: [clang-format] Support new file formatting with vim (authored by jsji). Changed prior to commit:

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D138221#3941173 , @yaxunl wrote: > In D138221#3939384 , @MaskRay wrote: > >>> Some host relocatable objects may not contain device relocatable objects, >>> where an empty file is

[clang] 8627811 - [clang-format] Support new file formatting with vim

2022-11-21 Thread via cfe-commits
Author: Ji, Jinsong Date: 2022-11-21T13:12:31-08:00 New Revision: 86278114085bdce39b9cf1895447070454bb5fe3 URL: https://github.com/llvm/llvm-project/commit/86278114085bdce39b9cf1895447070454bb5fe3 DIFF: https://github.com/llvm/llvm-project/commit/86278114085bdce39b9cf1895447070454bb5fe3.diff

[PATCH] D138425: [clangd] Parameter hints for template specialization

2022-11-21 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D138425#3941206 , @sammccall wrote: > In D138425#3941183 , @v1nh1shungry > wrote: > >> Yes, there is a common situation where people use a meaningless template >> parameter name,

[PATCH] D138426: Fix #58958 on github

2022-11-21 Thread Alexey Kreshchuk via Phabricator via cfe-commits
krsch added inline comments. Comment at: clang/lib/Sema/SemaFixItUtils.cpp:135-140 +// Do no take address of const pointer to get void* +const PointerType *FromPtrTy = dyn_cast(FromQTy); +const PointerType *ToPtrTy = dyn_cast(ToQTy); +if (FromPtrTy &&

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-21 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. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138221/new/ https://reviews.llvm.org/D138221 ___ cfe-commits mailing list

[PATCH] D137943: [clangd] Mark "override" and "final" as modifiers

2022-11-21 Thread Christian Kandeler 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 rG699a59aa5865: [clangd] Mark override and final as modifiers (authored by ckandeler). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang-tools-extra] 699a59a - [clangd] Mark "override" and "final" as modifiers

2022-11-21 Thread Christian Kandeler via cfe-commits
Author: Christian Kandeler Date: 2022-11-21T22:01:12+01:00 New Revision: 699a59aa5865d8b10f42284f68c424a9123cb8b2 URL: https://github.com/llvm/llvm-project/commit/699a59aa5865d8b10f42284f68c424a9123cb8b2 DIFF:

[PATCH] D135273: [Clang][ObjC] Add optionality to property attribute strings.

2022-11-21 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. In D135273#3936297 , @al45tair wrote: > @theraven Any chance you could glance over this and reassure us that it isn't > going to break the GNU runtime if we do this? (We're adding an extra > attribute in the property attribute

[PATCH] D138426: Fix #58958 on github

2022-11-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Sema/SemaFixItUtils.cpp:135-140 +// Do no take address of const pointer to get void* +const PointerType *FromPtrTy = dyn_cast(FromQTy); +const PointerType *ToPtrTy = dyn_cast(ToQTy); +if (FromPtrTy &&

[PATCH] D138446: [clang-format][docs] Add ability to link to specific config options

2022-11-21 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel added a comment. I consulted a little bit with a friend who has a little bit of experience with sphinx and they suggested making a simple custom extension for this. But given that there is no custom sphinx logic right now at all, I don't feel great adding something that novel to the

[PATCH] D138249: [WebAssembly] Update relaxed-simd instruction names

2022-11-21 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGae96b5bd2dd0: [WebAssembly] Update relaxed-simd instruction names (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138249/new/

[clang] ae96b5b - [WebAssembly] Update relaxed-simd instruction names

2022-11-21 Thread Thomas Lively via cfe-commits
Author: Thomas Lively Date: 2022-11-21T12:40:15-08:00 New Revision: ae96b5bd2dd0c5f7317724f4977b4ff489afe7f3 URL: https://github.com/llvm/llvm-project/commit/ae96b5bd2dd0c5f7317724f4977b4ff489afe7f3 DIFF: https://github.com/llvm/llvm-project/commit/ae96b5bd2dd0c5f7317724f4977b4ff489afe7f3.diff

[PATCH] D138387: [Clang] Implement static operator[]

2022-11-21 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9111-9115 def ext_operator_overload_static : ExtWarn< "declaring overloaded %0 as 'static' is a C++2b extension">, InGroup, DefaultIgnore; -def

[PATCH] D138387: [Clang] Implement static operator[]

2022-11-21 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 476975. royjacobson added a comment. 1. Update warnings according to Corentin's comment 2. Somehow I missed the CodeGen was completely broken. Made a few necessary follow up changes in SemaOverload and ran the tests this time... Repository: rG LLVM

[PATCH] D138371: [clang-format] Fix a crash due to dereferencing null MatchingParen

2022-11-21 Thread Owen Pan 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 rG4daeb8c73354: [clang-format] Fix a crash due to dereferencing null MatchingParen (authored by owenpan). Repository: rG LLVM Github Monorepo

[clang] 4daeb8c - [clang-format] Fix a crash due to dereferencing null MatchingParen

2022-11-21 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-11-21T12:33:51-08:00 New Revision: 4daeb8c7335439e2ab43d66acfed087c417a7314 URL: https://github.com/llvm/llvm-project/commit/4daeb8c7335439e2ab43d66acfed087c417a7314 DIFF: https://github.com/llvm/llvm-project/commit/4daeb8c7335439e2ab43d66acfed087c417a7314.diff

[PATCH] D138224: WIP: AST{Reader,Writer} alternative

2022-11-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. ("Simple" tends to be an over used/overly vague term and may become less correct over time - if there's some more descriptive term that explains the difference between the old and newer one it'd be awesome to use - but yeah, sometimes "Simple", "New", etc, is just the

[PATCH] D138234: [clang-format] Support new file formatting with vim

2022-11-21 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138234/new/ https://reviews.llvm.org/D138234

[PATCH] D138446: [clang-format][docs] Add ability to link to specific config options

2022-11-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Another point, when looking at that code: All options have the version badge, and any new option should have it too. Maybe the script should just fail if `self.version` is not `true`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138446: [clang-format][docs] Add ability to link to specific config options

2022-11-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Full disclaimer: I have no idea what sphinx really is or how any of this stuff works, I still generate HTML from doxygen. But I think the solution looks nice in code.

[PATCH] D138402: [clang-format] Correctly count a tab's width in a comment

2022-11-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D138402#3940981 , @rymiel wrote: > The behaviour of tabs still doesn't match that of spaces, but at least this > makes it idempotent. I did initially looked into that, but then asked do we want to treat tabs

[PATCH] D137872: Try to implement lambdas with inalloca parameters by forwarding without use of inallocas.

2022-11-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/include/clang/CodeGen/CGFunctionInfo.h:571 + /// Whether this function should avoid inalloca arguments. + unsigned DontInAlloca: 1; + This is an amusing name, but we should try to find something better. :) Can we

[PATCH] D137642: [X86][CodeGen] Fix crash in hotpatch

2022-11-21 Thread Sylvain Audi via Phabricator via cfe-commits
saudi updated this revision to Diff 476960. saudi added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Added support for empty MBB: ensures 2-byte nop is inserted, to make the function patchable. This should also support the requirement for the functions not to

[clang] eff9d72 - [clang] NFC: Robustify sret test regex

2022-11-21 Thread Nathan Sidwell via cfe-commits
Author: Nathan Sidwell Date: 2022-11-21T14:20:47-05:00 New Revision: eff9d72b9b63b5c2f506581180db34df3b70bec9 URL: https://github.com/llvm/llvm-project/commit/eff9d72b9b63b5c2f506581180db34df3b70bec9 DIFF:

[PATCH] D137941: [clang] NFC: Robustify test regex

2022-11-21 Thread Nathan Sidwell 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 rGeff9d72b9b63: [clang] NFC: Robustify sret test regex (authored by urnathan). Herald added a project: clang. Herald added a subscriber: cfe-commits.

[PATCH] D138037: [analyzer] Remove unjustified assertion from EQClass::simplify

2022-11-21 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D138037#3941777 , @xazax.hun wrote: > I guess there are some more options. We could try keeping representatives > alive no matter what. It could be a good exercise to see if doing that makes > any difference in the analysis

[PATCH] D138073: [clang-doc] Move file layout to the generators.

2022-11-21 Thread Brett Wilson via Phabricator via cfe-commits
brettw added inline comments. Comment at: clang-tools-extra/clang-doc/HTMLGenerator.cpp:890-892 +// TODO If there are multiple Infos for this file name (for example, +// template specializations), this will generate multiple complete web pages +// (with and , etc.)

[PATCH] D138073: [clang-doc] Move file layout to the generators.

2022-11-21 Thread Brett Wilson via Phabricator via cfe-commits
brettw updated this revision to Diff 476955. brettw marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138073/new/ https://reviews.llvm.org/D138073 Files: clang-tools-extra/clang-doc/Generators.h

[PATCH] D138037: [analyzer] Remove unjustified assertion from EQClass::simplify

2022-11-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I guess there are some more options. We could try keeping representatives alive no matter what. It could be a good exercise to see if doing that makes any difference in the analysis results. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138037: [analyzer] Remove unjustified assertion from EQClass::simplify

2022-11-21 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a subscriber: vsavchenko. steakhal added a comment. In D138037#3941632 , @xazax.hun wrote: > I did not spend too much time thinking about this yet, but this sounds scary. > I wonder if we should target the underlying problem instead,

[PATCH] D137979: parse: process GNU and standard attributes on top-level decls

2022-11-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM aside from the question about whether we want to add an assert or not (I don't insist on adding one) and adding a release note (which doesn't need further review unless you want it). Thank you for these changes! CHANGES

[PATCH] D137979: parse: process GNU and standard attributes on top-level decls

2022-11-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/Parser.cpp:1096-1097 +ParsingDeclSpec , AccessSpecifier AS) { + DS.SetRangeStart(DeclSpecAttrs.Range.getBegin()); + DS.SetRangeEnd(DeclSpecAttrs.Range.getEnd()); + DS.takeAttributesFrom(DeclSpecAttrs);

[PATCH] D137979: parse: process GNU and standard attributes on top-level decls

2022-11-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 476949. compnerd marked an inline comment as done. compnerd added a comment. Address review feedback CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137979/new/ https://reviews.llvm.org/D137979 Files: clang/include/clang/Parse/Parser.h

[PATCH] D137979: parse: process GNU and standard attributes on top-level decls

2022-11-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 5 inline comments as done. compnerd added inline comments. Comment at: clang/include/clang/Parse/Parser.h:1605-1606 // C99 6.9: External Definitions. DeclGroupPtrTy ParseExternalDeclaration(ParsedAttributes , +

[PATCH] D138289: [clang][Parse] Remove constant expression from if condition

2022-11-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Precommit CI found that this change breaks clang/test/Sema/PR28181.c which was introduced to fix https://bugs.llvm.org/show_bug.cgi?id=28181 which was a regression caused by https://github.com/llvm/llvm-project/commit/5a5319062300166a747807339349766341a2c2b2

[PATCH] D137379: [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array subscript operations

2022-11-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:168-169 + static Matcher matcher() { +// FIXME: What if the index is integer literal 0? Should this be +// a safe gadget in this case? +return stmt( xazax.hun

[PATCH] D137348: [-Wunsafe-buffer-usage] Introduce an abstraction for fixable code patterns.

2022-11-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Analysis/Analyses/UnsafeBufferUsageGadgets.def:1 +//=- UnsafeBufferUsageGadgets.def - List of ways to use a buffer --*- C++ -*-=// +// Is this file named properly if it is also going to handle

[PATCH] D137346: [-Wunsafe-buffer-usage] Initial commit - Transition away from raw buffer accesses.

2022-11-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: njames93, sammccall, LegalizeAdulthood, klimek. aaron.ballman added inline comments. Comment at: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h:34 +// through the handler class. +void checkUnsafeBufferUsage(const Decl *D,

[PATCH] D138037: [analyzer] Remove unjustified assertion from EQClass::simplify

2022-11-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I did not spend too much time thinking about this yet, but this sounds scary. I wonder if we should target the underlying problem instead, i.e., making sure we never have dead symbols as representatives for eq. classes. What do you think? Repository: rG LLVM

[PATCH] D136603: [analyzer] getBinding should auto-detect type only if it was not given

2022-11-21 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. Sounds reasonable to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136603/new/ https://reviews.llvm.org/D136603

[PATCH] D137818: Add support for querying SubstTemplateTypeParm types

2022-11-21 Thread Anders Langlands via Phabricator via cfe-commits
anderslanglands updated this revision to Diff 476935. anderslanglands added a comment. Move getReplacementType to LLVM_16 block Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137818/new/ https://reviews.llvm.org/D137818 Files:

[PATCH] D138446: [clang-format][docs] Add ability to link to specific config options

2022-11-21 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel created this revision. rymiel added reviewers: HazardyKnusperkeks, owenpan, MyDeveloperDay. Herald added a project: All. rymiel requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This allows for the creation of permalinks to specific

[PATCH] D138091: [Clang] Fix Sema::ClassifyName so that it classifies EnumConstantDecl as NonType when they are brought into scope via using enum

2022-11-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:1250-1251 bool ADL = UseArgumentDependentLookup(SS, Result, NextToken.is(tok::l_paren)); - if (Result.isSingleResult() && !ADL && !FirstDecl->isCXXClassMember()) + if (Result.isSingleResult() &&

[PATCH] D138377: add clang_Type_getFullyQualifiedName

2022-11-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In terms of testing, I'd recommend adding `-test-print-qualified-type` and see if you can thread a qualified vs unqualified parameter through `PrintType()` and friends to try to share as much code as possible. You'll probably need new wrapper functions that calls

[PATCH] D137979: parse: process GNU and standard attributes on top-level decls

2022-11-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this, I know it was a slog! I think this is pretty close to ready, though you should definitely add a release note about the changes. Comment at: clang/include/clang/Parse/Parser.h:1605-1606 // C99 6.9: External

[PATCH] D137894: [clangd] Add extension for adding context (enclosing function or class) in references results

2022-11-21 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D137894#3940600 , @sammccall wrote: > Since this is a protocol extension, you might want to add an end-to-end test: > variant of `clang-tools-extra/clangd/test/xrefs.test` > (`xrefs-container.test`? to avoid complicating

[PATCH] D137894: [clangd] Add extension for adding context (enclosing function or class) in references results

2022-11-21 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 476918. tom-anders marked 7 inline comments as done. tom-anders added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137894/new/ https://reviews.llvm.org/D137894 Files:

[PATCH] D138441: [clang-format][docs] Fix invalid CSS syntax in versionbadge

2022-11-21 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel created this revision. rymiel added reviewers: HazardyKnusperkeks, owenpan, MyDeveloperDay. Herald added a project: All. rymiel requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. CSS uses colons, not the equals sign. The final

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. E.g. gcc actually accepts the concept definition, but later fails with "wrong number of template arguments". I wonder why Clang has not been doing the latter before this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The error itself makes sense, but I don't quite understand why usages of `invalid` did not produce errors before. Any idea why that happened? Are there some other bugs hiding? It seems that at some point when parsing this code: static_assert(invalid also here ;

[PATCH] D136176: Implement support for option 'fexcess-precision'.

2022-11-21 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/docs/UsersManual.rst:1732 +.. option:: -fexcess-precision: + + By default, Clang uses excess precision to calculate ``_Float16`` rjmccall wrote: > >The C and C++ standards allow floating-point expressions

[PATCH] D136176: Implement support for option 'fexcess-precision'.

2022-11-21 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 476913. zahiraam marked 6 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136176/new/ https://reviews.llvm.org/D136176 Files: clang/docs/UsersManual.rst clang/include/clang/Basic/FPOptions.def

  1   2   >