[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2399 + getSourceLocation(CurPtr)); + bool UnicodeDecodeFailed = false; + aaron.ballman wrote: > It looks like this can move into the `while` loop and we can

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 438926. cor3ntin marked 3 inline comments as done. cor3ntin added a comment. - Address style comments - Improve commit message - Enable the warning in -pedantic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128

[PATCH] D125291: Introduce @llvm.threadlocal.address intrinsic to access TLS variable

2022-06-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @jyknight How do you think about the status now? I want to fix the thread local problem for coroutines in clang15 since the problem have been found for years... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125291/new/ https://reviews.llvm.org/D125291

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-06-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Great progress! In D126907#3599835 , @erichkeane wrote: > Note that the failure comes down to: > > template concept C = T::f(); > template class P> struct S1{}; > template struct X{}; > S1 s11; > > and requires the -fr

[PATCH] D128248: [clang] Avoid an assertion in APValue::hasArrayFiller()

2022-06-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Failing tests are just because the test file is not formatted it seems. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128248/new/ https://reviews.llvm.org/D128248 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Magically deciding a default value for --unwindlib or --rtlib is not nice. You may emit a warning if the selected default happens to be incompatible with HIP. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127142/new/ https://reviews.llvm.org/D127142 __

[PATCH] D128319: Survive #pragma once from virtual file.

2022-06-21 Thread Tapasweni Pathak via Phabricator via cfe-commits
tapaswenipathak created this revision. tapaswenipathak added a reviewer: v.g.vassilev. tapaswenipathak added a project: clang. Herald added a project: All. tapaswenipathak requested review of this revision. Herald added a subscriber: cfe-commits. Add check before marking file as a once-only file.

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/CGExprComplex.cpp:896 + +ComplexPairTy ComplexExprEmitter::EmitPromoted(const Expr *E) { + if (auto *BinOp = dyn_cast(E->IgnoreParens())) { rjmccall wrote: > pengfei wrote: > > rjmccall wrote: > > > za

[PATCH] D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct

2022-06-21 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2319-2320 + // enable_if<>{} && ... + if (MatchingLBrace && MatchingLBrace->getPreviousNonComment() && + MatchingLBrace->getPreviousNonComment()->is

[PATCH] D126682: [Interpreter][ClangRepl] Implement undo command

2022-06-21 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 438892. junaire added a comment. - Add unittest - Fix a crash when previous input failed to parse Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126682/new/ https://reviews.llvm.org/D126682 Files: clang/inclu

[PATCH] D128318: [pseudo] prototype: faster data structures for LRTable

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I'm happy with the data structures at this point, so if you have feedback on those that'd be great. Otherwise I still need to clean up the interfaces, fix the broken tests, add some more comments etc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D127898: [clang][dataflow] Find unsafe locs after fixpoint

2022-06-21 Thread Sam Estep via Phabricator via cfe-commits
samestep updated this revision to Diff 438891. samestep added a comment. Only add the new API, don't change the check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127898/new/ https://reviews.llvm.org/D127898 Files: clang/docs/tools/clang-format

[PATCH] D128318: [pseudo] prototype: faster data structures for LRTable

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a subscriber: mgrang. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, alextsao1999. Herald added a project: clang-tools-extra. For shift and goto, use

[PATCH] D127803: Generate the capture for field when the field is used with implicit default.

2022-06-21 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 438877. jyu2 edited the summary of this revision. jyu2 added a comment. Thanks Alexey's comment. Address his comment. Instead save info into DSA, add new field in ImplicitDefaultFirstprivateFDs in SharingMapTy. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D128314: [Clang-tidy] Fixing bugs in clang-tidy infinite-loop checker

2022-06-21 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 created this revision. ziqingluo-90 added reviewers: NoQ, t-rasmud, usama54321, rsundahl, yln, kubamracek, krispy1994, jkorous, delcypher, chrisdangelo, thetruestblue, dcoughlin, aaron.ballman, alexfh, gribozavr, njames93, LegalizeAdulthood. Herald added subscribers: carlosgalvezp, x

[PATCH] D127923: [Diagnostics] Accept newline and format diag opts on first line

2022-06-21 Thread Vang Thao via Phabricator via cfe-commits
vangthao added a comment. In D127923#3599451 , @aaron.ballman wrote: > Is there a reason the remarks can't use individual diagnostic emissions to > simulate newlines? Or is this perhaps a demonstration that the remarks should > not be using the diagnos

[PATCH] D128103: Adds AST Matcher for ObjCStringLiteral

2022-06-21 Thread Rashmi Mudduluru via Phabricator via cfe-commits
t-rasmud updated this revision to Diff 438852. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128103/new/ https://reviews.llvm.org/D128103 Files: clang-tools-extra/unittests/clang-tidy/CMakeLists.txt clang-tools-extra/unittests/clang-tidy/ObjCStr

[PATCH] D128307: [pseudo] Store reduction sequences by pointer in heaps, instead of by value.

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, alextsao1999. Herald added a project: clang-tools-extra. Copying sequences around as the heap resized is significant

[PATCH] D128282: [WebAssembly] Update test to run it in opaque pointers mode

2022-06-21 Thread Thomas Lively via Phabricator via cfe-commits
tlively accepted this revision. tlively added a comment. I think the lines still differ in that one tests wasm32 and the other tests wasm64 (the triples are different). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128282/new/ https://reviews.llvm

[PATCH] D126247: [clang-tidy][doc] Document readability-indentifier-naming resolution order and examples

2022-06-21 Thread Kazys Stepanas via Phabricator via cfe-commits
KazNX marked 17 inline comments as done. KazNX added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-identifier-naming.rst:2750-2752 +where an individual identifier can fall into several classifications. Below +is a list of the classifications s

[PATCH] D128097: [Clang] Fix compile time regression caused by D126061.

2022-06-21 Thread Martin Böhme 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 rG0d300da799b0: [Clang] Fix compile time regression caused by D126061. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[clang] 0d300da - [Clang] Fix compile time regression caused by D126061.

2022-06-21 Thread Martin Boehme via cfe-commits
Author: Martin Boehme Date: 2022-06-21T23:15:43+02:00 New Revision: 0d300da799b06931eb6b974198d683548a8c8392 URL: https://github.com/llvm/llvm-project/commit/0d300da799b06931eb6b974198d683548a8c8392 DIFF: https://github.com/llvm/llvm-project/commit/0d300da799b06931eb6b974198d683548a8c8392.diff

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

2022-06-21 Thread Stephen Long via Phabricator via cfe-commits
steplong added a comment. Hmm, a StaticAnalyzer unit test is failing. It looks it is expecting `"test.CXXDeallocator: NumArgs: 1\n"`, but getting `"test.CXXDeallocator: NumArgs: 2\n". I'm assuming it is because sized deallocation is enabled on default for MSVC now Repository: rG LLVM Github

[PATCH] D128204: [clangd] Add fix-it for inserting IWYU pragma: keep

2022-06-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I had another idea about offering the export pragma when in a header file but I don't know if that's going too far In D128204#3599286 , @kadircet wrote: > Hence i'd like to hear a little bit more about what kind of false positi

[PATCH] D128113: Clang: fix AST representation of expanded template arguments.

2022-06-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 438813. mizvekov added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128113/new/ https://reviews.llvm.org/D128113 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/JSON

[PATCH] D128301: [pseudo] Turn glrReduce into a class, reuse storage across calls.

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, alextsao1999. Herald added a project: clang-tools-extra. This is a ~5% speedup, we no longer have to allocate the pr

[PATCH] D127270: [clang-format] Add space in placement new expression

2022-06-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:3555 AfterFunctionDefinitionName(false), AfterIfMacros(false), - AfterOverloadedOperator(false), AfterRequiresInClause(false), - AfterRequiresInExpression(false)

[PATCH] D128299: [pseudo] Add a fast-path to GLR reduce when both pop and push are trivial

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, alextsao1999. Herald added a project: clang-tools-extra. In general we split a reduce into pop/push, so concurrently

[PATCH] D128256: [Clang][AArch64] Limit arm_locally_streaming to function definitions only.

2022-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:9835-9839 + if (D.isFunctionDefinition()) { +NewFD->setWillHaveBody(); +ProcessDeclAttributes(S, NewFD, D); +NewFD->setWillHaveBody(false); + } else This seems like a hack

[PATCH] D112916: [clang-tidy] Confusable identifiers detection

2022-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. I remain concerned about the utility of this check. As I understand it, the more complete Unicode guidance is still under active discussion and hasn't been finalized (please correct me if I'm wrong @tahonermann and @cor3ntin) s

[PATCH] D128276: clang: perform deduction at the right depth on Sema::AddMethodTemplateCandidate

2022-06-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a project: All. mizvekov updated this revision to Diff 438697. mizvekov added a comment. mizvekov published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. . Fixes PR28087. Signed-off-by: Matheus Izvek

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-21 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield accepted this revision. JonChesterfield added a comment. This revision is now accepted and ready to land. I think this is probably OK. Smaller patches usually get reviewed faster so minimising the line noise in the browser is worthwhile. Comment at: clang/tools

[PATCH] D128297: [pseudo] Track heads as GSS nodes, rather than as "pending actions".

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, alextsao1999. Herald added a project: clang-tools-extra. IMO this model is simpler to understand (borrowed from the

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D127246#3599826 , @JonChesterfield wrote: > I've read it but can't promise it's correct - the diff is large and has some > spurious noise in it which distracts significantly from the functional > changes. > > Would you be w

[PATCH] D126461: [RISCV] Extract and store new vl of vleff/vlsegff iff new_vl output pointer isn't null

2022-06-21 Thread Philip Reames via Phabricator via cfe-commits
reames added a comment. Ok, with the revised description, let me start anew in my response. I don't have any particular problem with this change. I do think it would be good to explicitly update the docs to indicate whether the param can be null or not, but given a) gcc has allowed it, and b)

[clang] 7b7166f - Fix an unused-variable warning in release build, NFC.

2022-06-21 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-06-21T20:52:07+02:00 New Revision: 7b7166f1a20fe64a9c04a30f6e9335ef0a556d70 URL: https://github.com/llvm/llvm-project/commit/7b7166f1a20fe64a9c04a30f6e9335ef0a556d70 DIFF: https://github.com/llvm/llvm-project/commit/7b7166f1a20fe64a9c04a30f6e9335ef0a556d70.diff LO

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D127762#3589347 , @sdesmalen wrote: > Thanks @aaron.ballman for your elaborate review, that was very helpful! I'm > still working through some of your suggestions (although some of them weren't > entirely clear to me),

[PATCH] D126461: [RISCV] Extract and store new vl of vleff/vlsegff iff new_vl output pointer isn't null

2022-06-21 Thread Philip Reames via Phabricator via cfe-commits
reames added a comment. @craig.topper Much clearer, thank you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126461/new/ https://reviews.llvm.org/D126461 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-06-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Note that the failure comes down to: template concept C = T::f(); template class P> struct S1{}; template struct X{}; S1 s11; and requires the -frelaxed-template-template-args flag: [ekeane1@scsel-clx-24 build]$ ./bin/clang -cc1 -std=c++20 temp.cpp -frela

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-21 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. I've read it but can't promise it's correct - the diff is large and has some spurious noise in it which distracts significantly from the functional changes. Would you be willing to split this into two patches, one which renames variables and moves blocks of cod

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-06-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 438781. erichkeane added a comment. As promised, got it down to the 1 failure, and added tests for @ChuanqiXu and the std::vector example. That all seems to work, just a problem with the CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp test left. CHANGES

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

2022-06-21 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 438778. steplong added a comment. Whoops, this is a clang-tidy test, so `-target` won't work here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127641/new/ https://reviews.llvm.org/D127641 Files: clang-too

[PATCH] D126461: [RISCV] Extract and store new vl of vleff/vlsegff iff new_vl output pointer isn't null

2022-06-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I have attempted to revise the title and description. Please take a look @pcwang-thead and @reames Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126461/new/ https://reviews.llvm.org/D126461 __

[PATCH] D126461: [RISCV] Extract and store new vl of vleff/vlsegff iff destination isn't null

2022-06-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D126461#3599122 , @reames wrote: > In D126461#3597862 , @craig.topper > wrote: > >> `dst` in the patch description is not the pointer being loaded, it's the >> pointer of where t

[PATCH] D126559: [MSVC] Fix pragma alloc_text failing for C files

2022-06-21 Thread Stephen Long via Phabricator via cfe-commits
steplong added a comment. I tried the following: FunctionDecl *FD = ND->getAsFunction(); DeclContext *DC = ND->getDeclContext(); DEBUG_WITH_TYPE("foo", llvm::dbgs() << "[FOO] DC->isExternCContext() : " << DC->isExternCContext() << "\n"); DEBUG_WITH_TYPE("foo", llvm::dbgs(

[PATCH] D128249: Adding clone_attrs attribute.

2022-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D128249#3599551 , @plotfi wrote: > Thanks for the feedback on corner cases @aaron.ballman, this will give me > more concrete things to think about here. > > At the moment I mainly thinking about a case: > > typedef int

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 438758. jhuber6 added a comment. Adding a test to ensure we no longer write temporary files for unused inputs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127246/new/ https://reviews.llvm.org/D127246 Files:

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGExprComplex.cpp:896 + +ComplexPairTy ComplexExprEmitter::EmitPromoted(const Expr *E) { + if (auto *BinOp = dyn_cast(E->IgnoreParens())) { pengfei wrote: > rjmccall wrote: > > zahiraam wrote: > > > r

[PATCH] D127802: [HLSL] Support HLSL vector initializers

2022-06-21 Thread Chris Bieneman 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 rG9f499d9d73ed: [HLSL] Support HLSL vector initializers (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[clang] 9f499d9 - [HLSL] Support HLSL vector initializers

2022-06-21 Thread Chris Bieneman via cfe-commits
Author: Chris Bieneman Date: 2022-06-21T12:33:42-05:00 New Revision: 9f499d9d73edfc818978c64eb24b8d2d34995d76 URL: https://github.com/llvm/llvm-project/commit/9f499d9d73edfc818978c64eb24b8d2d34995d76 DIFF: https://github.com/llvm/llvm-project/commit/9f499d9d73edfc818978c64eb24b8d2d34995d76.diff

[PATCH] D128249: Adding clone_attrs attribute.

2022-06-21 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. Thanks for the feedback on corner cases @aaron.ballman, this will give me more concrete things to think about here. At the moment I mainly thinking about a case: typedef int foo; enum : foo {} __attribute__((__clone_attrs_from__(foo))); This is mostly because of how

[PATCH] D127976: [IR] Move vector.insert/vector.extract out of experimental namespace

2022-06-21 Thread Javier Setoain via Phabricator via cfe-commits
jsetoain added inline comments. Comment at: llvm/docs/LangRef.rst:17292-17294 +``llvm.vector.insert`` can be used to insert a fixed-width vector into a +scalable vector, but not the other way around. To answer Craig's point, I don't think it was clear before th

[PATCH] D127357: [pseudo] wip/prototype: use LR0 instead of SLR1 table

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. My current thinking is this is too much overhead to accept. I'm going to try to take some of these ideas and apply them to our SLR(1) implementation, in particular store heads as nodes rather than pending actions. I think it's worth accepting some slowdown for this, wh

[PATCH] D127812: [AArch64] Function multiversioning support added.

2022-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D127812#3587223 , @ilinpv wrote: > In D127812#3585249 , @erichkeane > wrote: > >> I'm concerned as to the design of this addition, I don't particularly >> appreciate the reasons

[PATCH] D128288: [PowerPC] Fix signatures for vec_replace_unaligned builtin

2022-06-21 Thread Lei Huang via Phabricator via cfe-commits
lei created this revision. lei added reviewers: amyk, quinnp, power-llvm-team. Herald added subscribers: shchenz, nemanjai. Herald added a project: All. lei requested review of this revision. Herald added a project: clang. ``vec_replace_unaligned`` is meant to return vuc to emphasize that elements

[PATCH] D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator

2022-06-21 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added subscribers: thakis, rsmith. royjacobson added a comment. In D127593#3598234 , @sberg wrote: > In general, there's still a handful of `__has_trivial_*` calls across > Abseil's recent master branch `absl/meta/type_traits.h`. Breaking ab

[PATCH] D127363: [Lex] Fix for char32_t literal truncation on 16 bit architectures

2022-06-21 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/Lex/LiteralSupport.cpp:1600 - llvm::APInt LitVal(PP.getTargetInfo().getIntWidth(), 0); + llvm::APInt LitVal(PP.getTargetInfo().getChar32Width(), 0); sammccall wrote: > tahonermann wrote: > > I don't t

[PATCH] D128097: [Clang] Fix compile time regression caused by D126061.

2022-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, great catch! That's not something I would have expected to be at the root of this performance issue. Thank you for the quick turnaround on the fix! Repository: rG LLVM G

[PATCH] D127923: [Diagnostics] Accept newline and format diag opts on first line

2022-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: beanz. aaron.ballman added a comment. I'm a bit uncomfortable with this as we (at least currently) want to discourage non-terse diagnostics, and allowing newlines encourages longer diagnostics. There's an RFC kicking around about making more expressive diagnosti

[PATCH] D128112: [NFC] clang: Implement tests for PR56099

2022-06-21 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG271cc588054a: [NFC] clang: Implement tests for PR56099 (authored by mizvekov). Repository: rG LLVM Github Monorepo CHA

[clang] 271cc58 - [NFC] clang: Implement tests for PR56099

2022-06-21 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2022-06-21T18:35:17+02:00 New Revision: 271cc588054a90abf0d82f57af272c3db749ff56 URL: https://github.com/llvm/llvm-project/commit/271cc588054a90abf0d82f57af272c3db749ff56 DIFF: https://github.com/llvm/llvm-project/commit/271cc588054a90abf0d82f57af272c3db749ff56.dif

[PATCH] D127357: [pseudo] wip/prototype: use LR0 instead of SLR1 table

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Current numbers from my machine: Parse time (`ClangPseudoBenchmark SemaCodeComplete.cpp --benchmark_filter=glrParse --benchmark_min_time=10`) old: glrParse167033209 ns167026892 ns 84 bytes_per_second=2.24031M/s new: glrParse192320371 ns1

[PATCH] D127446: [clang-tidy] Add `-verify-config` command line argument

2022-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for this, it seems like an interesting feature! Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:263 +Check the config files to ensure each check and +option is recognised. +)"), Comment a

[PATCH] D127357: [pseudo] wip/prototype: use LR0 instead of SLR1 table

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 438735. sammccall added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127357/new/ https://reviews.llvm.org/D127357 Files: clang-tools-extra/pseudo/benchmarks/Benchmark.cpp clang-tools-e

[PATCH] D127802: [HLSL] Support HLSL vector initializers

2022-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127802/new/ https://reviews.llvm.org/D127802

[PATCH] D127357: [pseudo] wip/prototype: use LR0 instead of SLR1 table

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 438732. sammccall added a comment. tweak & document fast-path Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127357/new/ https://reviews.llvm.org/D127357 Files: clang-tools-extra/pseudo/benchmarks/Benchmark

[PATCH] D127357: [pseudo] wip/prototype: use LR0 instead of SLR1 table

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 438727. sammccall added a comment. update test/binaries, tests now all pass Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127357/new/ https://reviews.llvm.org/D127357 Files: clang-tools-extra/pseudo/benchm

[PATCH] D128282: [WebAssembly] Update test to run it in opaque pointers mode

2022-06-21 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. This revision is now accepted and ready to land. LGTM. Though it also looks like all the WEBASSEMBLY32/WEBASSEMBLY64 lines you're modifying match each other, so could be combined to single `WEBASSEMBLY:` lines. It might be worth doing that while y

[PATCH] D126859: [clangd] Validate clang-tidy CheckOptions in clangd config

2022-06-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. I also agree with the typo correction verdict. In theory there'll be two cases: - typo correction helps, in which case it'll be obvious from the warning itself. - typo correction doesn't help, because the option doesn't exist at all, we'll be just showing a random opt

[PATCH] D127898: [clang][dataflow] Find unsafe locs after fixpoint

2022-06-21 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp:66 + SourceLocations Locs; + for (const CFGBlock *Block : Context->getCFG()) { +// Skip blocks that were not evaluated. xazax.hun wrote: > Wh

[PATCH] D128112: [NFC] clang: Implement tests for PR56099

2022-06-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 438723. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128112/new/ https://reviews.llvm.org/D128112 Files: clang/test/AST/ast-dump-template-decls.cpp Index: clang/test/AST/ast-d

[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang

2022-06-21 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 438722. pmatos added a comment. rebase on top of D128282 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.org/D122215 Files: clang/include/clan

[PATCH] D127976: [IR] Move vector.insert/vector.extract out of experimental namespace

2022-06-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/docs/LangRef.rst:17289 insert into. Conceptually, this can be used to build a scalable vector out of -non-scalable vectors. +non-scalable vectors, however this intrinsic can also be used on purely fixed +types. ---

[PATCH] D127270: [clang-format] Add space in placement new expression

2022-06-21 Thread omar ahmed via Phabricator via cfe-commits
omarahmed updated this revision to Diff 438719. omarahmed added a comment. Format files Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127270/new/ https://reviews.llvm.org/D127270 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/tools/d

[PATCH] D128204: [clangd] Add fix-it for inserting IWYU pragma: keep

2022-06-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. as discussed offline I agree that we should have this, as no matter how hard we try there are going to be cases that we can't get right due to ADL/template instantiations or depending on 3rd party code that cannot be edited and also doesn't have relevant pragmas inside

[PATCH] D127976: [IR] Move vector.insert/vector.extract out of experimental namespace

2022-06-21 Thread Bradley Smith via Phabricator via cfe-commits
bsmith updated this revision to Diff 438718. bsmith added a comment. - Clarify LangRef slightly to make it clearer that fixed types can be used - Rebase on top of recent test changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127976/new/ https:/

[PATCH] D127856: [clangd] Support multiline semantic tokens

2022-06-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:947 +Out->tokenModifiers = Tok.Modifiers; +Last = Tok; sammccall wrote: > this copy feels gratuitous, can we just use Tokens.back(), or do the copy in > the r

[PATCH] D127856: [clangd] Support multiline semantic tokens

2022-06-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 438711. kadircet marked 4 inline comments as done. kadircet added a comment. Get rid of the copy in common case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127856/new/ https://reviews.llvm.org/D127856 Files

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 438709. yaxunl added a comment. add -unwindlib=libgcc by default for --hip-link since -rtlib=compiler-rt needs it CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127142/new/ https://reviews.llvm.org/D127142 Files: clang/lib/Driver/ToolChain.cpp c

[PATCH] D128072: [clang-tidy] Organize test files into subdirectories by module (NFC)

2022-06-21 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D128072#3598634 , @aaron.ballman wrote: > This sounds like a sensible direction to me. I spot-checked the changes and > they all seem reasonable. Giving my LG, but please wait a bit before landing > in case someone

[PATCH] D127357: [pseudo] wip/prototype: use LR0 instead of SLR1 table

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 438703. sammccall added a comment. remove first/follow, also dead Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127357/new/ https://reviews.llvm.org/D127357 Files: clang-tools-extra/pseudo/benchmarks/Bench

[PATCH] D128112: [NFC] clang: Implement tests for PR56099

2022-06-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 438702. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128112/new/ https://reviews.llvm.org/D128112 Files: clang/test/AST/ast-dump-template-decls.cpp Index: clang/test/AST/ast-d

[PATCH] D127357: [pseudo] wip/prototype: use LR0 instead of SLR1 table

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 438701. sammccall added a comment. Herald added a subscriber: mgrang. update tests, trim dead code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127357/new/ https://reviews.llvm.org/D127357 Files: clang-to

[PATCH] D125669: Adding support for target in_reduction

2022-06-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. What about the description? Shall we still emit ` if(0)`? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125669/new/ https://reviews.llvm.org/D125669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-21 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D128012#3598307 , @Anastasia wrote: > PCH have large in-memory size compared to the sources, but if it's not an > issue then it should be reasonable. Yea... I think we may have some flexibility on memory size. Our current on-d

[PATCH] D126461: [RISCV] Extract and store new vl of vleff/vlsegff iff destination isn't null

2022-06-21 Thread Philip Reames via Phabricator via cfe-commits
reames added a comment. In D126461#3597862 , @craig.topper wrote: > `dst` in the patch description is not the pointer being loaded, it's the > pointer of where to store the new_vl. That is only thing being checked for > null in this patch. I agree thi

[PATCH] D128282: [WebAssembly] Update test to run it in opaque pointers mode

2022-06-21 Thread Paulo Matos via Phabricator via cfe-commits
pmatos created this revision. pmatos added reviewers: asb, tlively. Herald added subscribers: StephenFan, wingo, ecnelises, sunfish, jgravelle-google, sbc100, dschuff. Herald added a project: All. pmatos requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald adde

[PATCH] D126559: [MSVC] Fix pragma alloc_text failing for C files

2022-06-21 Thread Stephen Long via Phabricator via cfe-commits
steplong added a comment. In D126559#3598950 , @hans wrote: >> Oh I see, that makes sense. We aren't accepting >> https://godbolt.org/z/9Yej9vhYd. Do you know of a way to get the `NamedDecl` >> with `extern "C"` instead of the second declaration? > > I'

[PATCH] D127357: [pseudo] wip/prototype: use LR0 instead of SLR1 table

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D127357#3569386 , @hokein wrote: > Thanks for experimenting this! > >> the size of the LR table is much smaller (In this patch we go from 340kB => >> 120kB, and the encoding isn't efficient) > > This is interesting. I'd expe

[PATCH] D127357: [pseudo] wip/prototype: use LR0 instead of SLR1 table

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 438693. sammccall added a comment. Deeper version of LR0, still prototype-quality - use hashtables instead of binary search where appropriate - simplify GLR accordingly - add fast-path reduce to reclaim some of the performance (though "reclaim" is maybe wr

[PATCH] D126859: [clangd] Validate clang-tidy CheckOptions in clangd config

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. FWIW, I think validating the names makes sense but I don't think typo correction pays for itself here. @kadircet? Comment at: clang-tools-extra/clangd/TidyProvider.cpp:291 + static void *call() { +return new tidy::NamesAndOptions(tidy::getAllChe

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:116-117 "source file is not valid UTF-8">; +def warn_invalid_utf8_in_comment : Warning< + "invalid UTF-8 in comment">, InGroup>, DefaultIgnore; def err_character_not_allowed : E

[PATCH] D128204: [clangd] Add fix-it for inserting IWYU pragma: keep

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This is a bit tricky - we'd like to offer more fixes in several scenarios (e.g. replace a header with the transitive includes you're relying on), but some of those require more complex implementation. On one hand, presenting only one automated fix will bias users towa

[PATCH] D126559: [MSVC] Fix pragma alloc_text failing for C files

2022-06-21 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. > Oh I see, that makes sense. We aren't accepting > https://godbolt.org/z/9Yej9vhYd. Do you know of a way to get the `NamedDecl` > with `extern "C"` instead of the second declaration? I'm not sure I understand the question, but it seems the current code is checking `isExt

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

2022-06-21 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 438682. steplong added a comment. Herald added a project: clang-tools-extra. - Add `-target x86_64-unknown-linux` to `misc-new-delete-overloads.cpp` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127641/new/ ht

[PATCH] D126559: [MSVC] Fix pragma alloc_text failing for C files

2022-06-21 Thread Stephen Long via Phabricator via cfe-commits
steplong added a comment. In D126559#3598885 , @hans wrote: >> Ignoring the `pragma alloc_text`, it looks like GCC compiles the following >> `foo` with C linkage vs LLVM which compiles with C++ linkage (foo's name is >> mangled): > > The mangled name sh

[PATCH] D128095: clang: fix checking parameter packs for expansion

2022-06-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 438680. mizvekov edited the summary of this revision. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128095/new/ https://reviews.llvm.org/D128095 Files: clang/include/clang/Sema/S

[PATCH] D127856: [clangd] Support multiline semantic tokens

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:947 +Out->tokenModifiers = Tok.Modifiers; +Last = Tok; this copy feels gratuitous, can we just use Tokens.back(), or do the

[PATCH] D126559: [MSVC] Fix pragma alloc_text failing for C files

2022-06-21 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. > Ignoring the `pragma alloc_text`, it looks like GCC compiles the following > `foo` with C linkage vs LLVM which compiles with C++ linkage (foo's name is > mangled): The mangled name shouldn't matter since it has internal linkage. I tried dropping the `static`, and the

[PATCH] D127873: [clang-format] Fix misplacemnt of `*` in declaration of pointer to struct

2022-06-21 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 updated this revision to Diff 438669. jackhong12 added a comment. Thanks for your reply! I added comments for each clause. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127873/new/ https://reviews.llvm.org/D127873 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittest

  1   2   >