[PATCH] D149723: [clang-tidy] Optimize performance of RenamerClangTidyCheck

2023-05-02 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Refactor

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

2023-05-02 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 518966. alexander-shaposhnikov added a comment. 1. If innermost != nullptr (in getTemplateInstantiationArgs) and NS is a ClassTemplatePartialSpecializationDecl we were incorrectly adding the inner level of template args twice (once as an

[PATCH] D149710: [RISCV] Add sifive-x280 processor with all of its extensions

2023-05-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149710/new/ https://reviews.llvm.org/D149710 ___ cfe-commits mailing list

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518961. junaire added a comment. Fix typos Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h

[PATCH] D149612: [Sema] avoid merge error type

2023-05-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a subscriber: rsmith. shafik added a comment. In D149612#4314209 , @HerrCai0907 wrote: > in SemaType.cpp#BuildArrayType, It will generate `DependentSizedArrayType` > which cannot be merged. > So we can either add additional check in

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:59 + + Value LastValue; v.g.vassilev wrote: > aaron.ballman wrote: > > I think I'm surprised to see this as a data member of `Interpreter` but > > mostly because my

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518960. junaire marked 2 inline comments as done. junaire added a comment. Add more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files:

[PATCH] D149149: [clang][Interp] Check one-past-the-end pointers in GetPtrField

2023-05-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/AST/Interp/records.cpp:500 namespace PointerArith { struct A {}; aaron.ballman wrote: > Neat! For the tests in this namespace, Clang and ICC agree, GCC and MSVC > agree, and users get to cry:

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Value.h:46 + +#define REPL_BUILTIN_TYPES \ + X(bool, Bool) \

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518952. junaire marked 16 inline comments as done. junaire added a comment. Address comments from @aaron.ballman, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/

[PATCH] D149709: Fix a typo in head comment of CurPPLexer

2023-05-02 Thread Volodymyr Sapsai 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 rGe46aa7f92729: Fix a typo in head comment of `CurPPLexer`. (authored by zhouyizhou, committed by vsapsai). Repository: rG LLVM Github Monorepo

[clang] e46aa7f - Fix a typo in head comment of `CurPPLexer`.

2023-05-02 Thread Volodymyr Sapsai via cfe-commits
Author: Zhouyi Zhou Date: 2023-05-02T19:49:21-07:00 New Revision: e46aa7f927293989dae40817c0087cba9cf5fae7 URL: https://github.com/llvm/llvm-project/commit/e46aa7f927293989dae40817c0087cba9cf5fae7 DIFF: https://github.com/llvm/llvm-project/commit/e46aa7f927293989dae40817c0087cba9cf5fae7.diff

[PATCH] D149709: Fix a typo in head comment of CurPPLexer

2023-05-02 Thread zhouyizhou via Phabricator via cfe-commits
zhouyizhou added a comment. In D149709#4314390 , @vsapsai wrote: > Thanks for the fix! Don't see any other places in the file to fix. Thanks for review my patch ;-) I have no write access to LLVM project, can you commit it for me ? Thanks in Advance

[PATCH] D149718: [NFC][Clang] Fix Coverity issues of copy without assign

2023-05-02 Thread Soumi Manna via Phabricator via cfe-commits
Manna created this revision. Manna added a reviewer: tahonermann. Herald added a reviewer: NoQ. Herald added a project: All. Manna requested review of this revision. Herald added a project: clang. This patch adds missing assignment operator to the class which has user-defined copy/move

[PATCH] D149716: clang: Use new frexp intrinsic for builtins and add f16 version

2023-05-02 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 518947. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149716/new/ https://reviews.llvm.org/D149716 Files: clang/include/clang/Basic/Builtins.def clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/aix-builtin-mapping.c

[PATCH] D149716: clang: Use new frexp intrinsic for builtins and add f16 version

2023-05-02 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: yaxunl, jcranmer-intel, kpn, andrew.w.kaylor, sepavloff, tra. Herald added subscribers: kosarev, jdoerfert, pengfei, jvesely. Herald added a project: All. arsenm requested review of this revision. Herald added subscribers: llvm-commits, wdng.

[PATCH] D149709: Fix a typo in head comment of CurPPLexer

2023-05-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai accepted this revision. vsapsai added a comment. This revision is now accepted and ready to land. Thanks for the fix! Don't see any other places in the file to fix. Comment at: clang/include/clang/Lex/Preprocessor.h:726 /// The current top of the stack that we're

[PATCH] D149713: [Sema] Avoid emitting warnings for constant destruction.

2023-05-02 Thread Peter Kasting via Phabricator via cfe-commits
pkasting created this revision. pkasting added a reviewer: rsmith. Herald added a project: All. pkasting requested review of this revision. Herald added a project: clang. Fixes https://github.com/llvm/llvm-project/issues/62436. Repository: rG LLVM Github Monorepo

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-02 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga updated this revision to Diff 518933. oskarwirga edited the summary of this revision. oskarwirga added a comment. Update the diff to use the `nomerge` attribute CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 Files:

[PATCH] D149187: [clang] Canonicalize system headers in dependency file when -canonical-prefixes

2023-05-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. This commit came up in the following bug report: https://github.com/llvm/llvm-project/issues/62505 Please take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149187/new/ https://reviews.llvm.org/D149187

[PATCH] D149710: [RISCV] Add sifive-x280 processor with all of its extensions

2023-05-02 Thread Philip Reames via Phabricator via cfe-commits
reames accepted this revision. reames added a comment. This revision is now accepted and ready to land. Mechanically, this looks fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149710/new/ https://reviews.llvm.org/D149710

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-02 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added a comment. In D148654#4312478 , @smeenai wrote: > Thinking about this a bit more, should the trap not have an associated stack > trace that can be symbolicated to tell you which line of code was crashing? > If the issue is that

[PATCH] D149498: [RISCV] Add Scheduling information for Zfh to SiFive7 model

2023-05-02 Thread Michael Maitland via Phabricator via cfe-commits
michaelmaitland updated this revision to Diff 518925. michaelmaitland added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149498/new/ https://reviews.llvm.org/D149498 Files: llvm/lib/Target/RISCV/RISCVSchedSiFive7.td Index:

[PATCH] D149497: [RISCV] Add scheduling information for Zba and Zbb to RISCVSchedSiFive7.td

2023-05-02 Thread Michael Maitland via Phabricator via cfe-commits
michaelmaitland updated this revision to Diff 518924. michaelmaitland marked an inline comment as done. michaelmaitland added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149497/new/ https://reviews.llvm.org/D149497 Files:

[PATCH] D149495: [RISCV] Add sifive-x280 processor and support V extension in SiFive7

2023-05-02 Thread Michael Maitland via Phabricator via cfe-commits
michaelmaitland updated this revision to Diff 518923. michaelmaitland added a comment. Split adding sifive-x280 and vector model between this patch and https://reviews.llvm.org/D149710 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149495/new/

[PATCH] D149710: [RISCV] Add sifive-x280 processor with all of its extensions

2023-05-02 Thread Michael Maitland via Phabricator via cfe-commits
michaelmaitland created this revision. michaelmaitland added reviewers: craig.topper, kito-cheng, reames, pcwang-thead. Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o,

[PATCH] D149709: Fix a typo in head comment of CurPPLexer

2023-05-02 Thread zhouyizhou via Phabricator via cfe-commits
zhouyizhou created this revision. zhouyizhou added reviewers: vsapsai, zequanwu, ChuanqiXu, MaskRay, pengfei. Herald added a project: All. zhouyizhou requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In head comment of CurPPLexer field of

[PATCH] D149334: [RISCV] Enable strict fp for RISC-V in clang.

2023-05-02 Thread Yeting Kuo via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfa53ce0faaa0: [RISCV] Enable strict fp for RISC-V in clang. (authored by fakepaper56). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149334/new/

[clang] fa53ce0 - [RISCV] Enable strict fp for RISC-V in clang.

2023-05-02 Thread Yeting Kuo via cfe-commits
Author: Yeting Kuo Date: 2023-05-03T08:32:27+08:00 New Revision: fa53ce0faaa0cb6956a201c7a01c06da34ab9936 URL: https://github.com/llvm/llvm-project/commit/fa53ce0faaa0cb6956a201c7a01c06da34ab9936 DIFF: https://github.com/llvm/llvm-project/commit/fa53ce0faaa0cb6956a201c7a01c06da34ab9936.diff

[PATCH] D149666: [OpenMP][OMPIRBuilder] Migrate MapCombinedInfoTy from Clang to OpenMPIRBuilder

2023-05-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:6848 + class MapCombinedInfoTy : public llvm::OpenMPIRBuilder::MapCombinedInfoTy { + public: MapExprsArrayTy Exprs; TIFitis wrote: > jdoerfert wrote: > > Not sure why you

[PATCH] D148370: [Clang][Flang][OpenMP] Add loadOffloadInfoMetadata and createOffloadEntriesAndInfoMetadata into OMPIRBuilder's finalize and initialize

2023-05-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:561 + + llvm::OpenMPIRBuilder::EmitMetadataErrorReportFunctionTy & = + [](llvm::OpenMPIRBuilder::EmitMetadataErrorKind kind, no llvm:: style: ErrorReportFn similarly

[PATCH] D149612: [Sema] avoid merge error type

2023-05-02 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 518915. HerrCai0907 added a comment. fix in `Sema::BuildArrayType` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149612/new/ https://reviews.llvm.org/D149612 Files: clang/docs/ReleaseNotes.rst

[PATCH] D146054: [RISCV] Add --print-supported-extensions and -march=help support

2023-05-02 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat added inline comments. Comment at: clang/lib/Driver/Driver.cpp:110 +extern void RISCVMarchHelp(); + craig.topper wrote: > Can we declare this in RISCVISAInfo.h and include that here? Yes, we can. Comment at:

[PATCH] D149655: [tests] Add missing REQUIRES: riscv-registered-target to clang test

2023-05-02 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat closed this revision. 4vtomat added a comment. Merged. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149655/new/ https://reviews.llvm.org/D149655 ___ cfe-commits mailing list

[PATCH] D149612: [Sema] avoid merge error type

2023-05-02 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. in SemaType.cpp#BuildArrayType, It will generate `DependentSizedArrayType` which cannot be merged. So we can either add additional check in `MergeVarDeclTypes` or directly ignore to generate this type in `BuildArrayType`. Which one is better? } else if

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

2023-05-02 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. upd. In the reduced example above MLTAL is incorrect (lldb) p MLTAL.dump() NumRetainedOuterLevels: 1 1: Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178

[PATCH] D148665: Change -fsanitize=function to place two words before the function entry

2023-05-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148665/new/ https://reviews.llvm.org/D148665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D148769: Split out `CodeGenTypes` from `CodeGen` for LLT/MVT

2023-05-02 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D148769#4311232 , @dblaikie wrote: > I wouldn't mind a follow-up commit that creates a new/separate directory > (llvm/{lib,include/llvm}/CodeGenTypes) but that's probably a lot of > unnecessary churn too, so I can appreciate

[clang] 3e3c6f2 - Revert "[Demangle] make llvm::demangle take std::string_view rather than const std::string&"

2023-05-02 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2023-05-02T15:54:09-07:00 New Revision: 3e3c6f24ff85ea52ed67d4c26f1d3d0eacd1ad1b URL: https://github.com/llvm/llvm-project/commit/3e3c6f24ff85ea52ed67d4c26f1d3d0eacd1ad1b DIFF:

[PATCH] D149693: [clang][deps] Make clang-scan-deps write modules in raw format

2023-05-02 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 518891. Herald added a subscriber: kadircet. Herald added a project: clang-tools-extra. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149693/new/ https://reviews.llvm.org/D149693 Files: clang-tools-extra/clangd/Compiler.cpp

[PATCH] D146764: [clang] Make predefined expressions string literals under -fms-extensions

2023-05-02 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. added the warning, not sure if this needs more tests for testing the interaction between `-pedantic`, `-Wmicrosoft`, `-Wmicrosoft-init-from-predefined` or if that's already assumed to work Comment at: clang/test/Modules/predefined.cpp:6 +// RUN:

[PATCH] D148800: [C2x] Update 'nullptr' implementation based on CD comments

2023-05-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:10087 +// a conversion. +Kind = CK_NoOp; +return Compatible; I'd like to see testcases for: - Codegen (LLVM IR emission) - Constant evaluation. (Is a cast like this allowed in

[PATCH] D149643: [clang-format] Correctly limit formatted ranges when specifying qualifier alignment

2023-05-02 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added inline comments. Comment at: clang/unittests/Format/QualifierFixerTest.cpp:1351 + + // Only the first line should be formatted the second should remain as is + EXPECT_EQ("template const Foo f();\n"

[PATCH] D146764: [clang] Make predefined expressions string literals under -fms-extensions

2023-05-02 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 518887. aeubanks added a comment. add warning Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146764/new/ https://reviews.llvm.org/D146764 Files: clang/include/clang/AST/Expr.h

[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

2023-05-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thank you:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149193/new/ https://reviews.llvm.org/D149193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D148370: [Clang][Flang][OpenMP] Add loadOffloadInfoMetadata and createOffloadEntriesAndInfoMetadata into OMPIRBuilder's finalize and initialize

2023-05-02 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added a comment. Thank you very much for the quick response time on the review and the review @jdoerfert! I believe I have applied all of your current feedback in the last update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148370: [Clang][Flang][OpenMP] Add loadOffloadInfoMetadata and createOffloadEntriesAndInfoMetadata into OMPIRBuilder's finalize and initialize

2023-05-02 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon updated this revision to Diff 518875. agozillon marked 4 inline comments as done. agozillon added a comment. - Move hostIRFilePath initialize invocation to ModuleTranslation.cpp to respect TargetOp patch - Apply reviewer feedback Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D149695: MS inline asm: remove obsolete code adding AOK_SizeDirective (e.g. dword ptr)

2023-05-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: alvinhochun, epastor, hans, thakis, ayzhao. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits,

[PATCH] D149553: [clang] Use -std=c++23 instead of -std=c++2b

2023-05-02 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. Thanks for doing this! No objection, will let Aaron give the thumbs up. Comment at: clang/test/Parser/cxx2b-label.cpp:1 -// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx2b -std=c++2b -Wpre-c++2b-compat %s +// RUN: %clang_cc1 -fsyntax-only

[PATCH] D149647: [NFC][Clang]Fix static analyzer tool remarks about large copies by value

2023-05-02 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/Format.cpp:3486-3489 + Expanded.InsertBraces = true; + Passes.emplace_back([&](const Environment ) { +return BracesInserter(Env, Expanded).process(/*SkipAnnotation=*/true); });

[PATCH] D149694: [Clang] Update warning on some designator initializer cases involving unions

2023-05-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik created this revision. shafik added reviewers: rsmith, aaron.ballman, erichkeane. Herald added a project: All. shafik requested review of this revision. Currently when using designated initializers in C++ we have a few extension. Two extension which are dangerous involved assigning to

[PATCH] D148800: [C2x] Update 'nullptr' implementation based on CD comments

2023-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148800/new/ https://reviews.llvm.org/D148800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D149693: [clang][deps] Make clang-scan-deps write modules in raw format

2023-05-02 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: jansvoboda11, akyrtzi, Bigcheese. Herald added a subscriber: arphaman. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We have no use

[PATCH] D149013: [clang][Interp] Check pointers when accessing base class

2023-05-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/Interp/records.cpp:509-512 + constexpr A *a2 = + 1; // expected-error {{must be initialized by a constant expression}} \ +// expected-note {{cannot access base class of pointer past the

[PATCH] D149013: [clang][Interp] Check pointers when accessing base class

2023-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added inline comments. This revision now requires changes to proceed. Comment at: clang/test/AST/Interp/records.cpp:509-512 + constexpr A *a2 = + 1; // expected-error {{must be initialized by a constant

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

2023-05-02 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. Overall looks fine. My main concern are lambdas (and maybe functions/classes in functions, but that should only hit performance). Please close all comments before pushing this.

[PATCH] D149013: [clang][Interp] Check pointers when accessing base class

2023-05-02 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/D149013/new/ https://reviews.llvm.org/D149013

[PATCH] D149149: [clang][Interp] Check one-past-the-end pointers in GetPtrField

2023-05-02 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 Comment at: clang/test/AST/Interp/records.cpp:500 namespace PointerArith { struct A {}; Neat! For the tests in this namespace,

[PATCH] D149666: [OpenMP][OMPIRBuilder] Migrate MapCombinedInfoTy from Clang to OpenMPIRBuilder

2023-05-02 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 518847. TIFitis marked 2 inline comments as done. TIFitis added a comment. Merged MapDevPtrsArrayTy and MapMappersArrayTy into single type named MapValueDeclsArrayTy in CGOpenMPRuntime.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D149666: [OpenMP][OMPIRBuilder] Migrate MapCombinedInfoTy from Clang to OpenMPIRBuilder

2023-05-02 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis marked 2 inline comments as done. TIFitis added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:6848 + class MapCombinedInfoTy : public llvm::OpenMPIRBuilder::MapCombinedInfoTy { + public: MapExprsArrayTy Exprs; jdoerfert wrote:

[PATCH] D149550: [clang][Interp] Fix compound assign operator evaluation order

2023-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:683-685 + // C++17 onwards require that we evaluate the RHS first. + // Compute RHS and save it in a temporary variable so we can + // load it again later. In C, the

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

2023-05-02 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: llvm/include/llvm/IR/DiagnosticInfo.h:1122 } + void + getInliningDecisions(SmallVectorImpl ) const; can this return a SmallVector instead of taking one as a mutable param? Comment at:

[PATCH] D145441: [AMDGPU] Define data layout entries for buffers

2023-05-02 Thread Krzysztof Drewniak via Phabricator via cfe-commits
krzysz00 updated this revision to Diff 518843. krzysz00 added a comment. Rebase to handle new legalization tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145441/new/ https://reviews.llvm.org/D145441 Files:

[PATCH] D146342: [-Wunsafe-buffer-usage] Move the whole analysis to the end of a translation unit

2023-05-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2320-2323 +void traverseTU(const TranslationUnitDecl *TU) { + for (auto I = TU->decls_begin(); I != TU->decls_end(); ++I) +TraverseDecl(*I); +}

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

2023-05-02 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. reduced test case: template concept Concept = false; struct Foo { template struct result {}; template requires(Concept<_Tp>) struct result<_Tp>; }; Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D149647: [NFC][Clang]Fix static analyzer tool remarks about large copies by value

2023-05-02 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. Thank you for catching that @HazardyKnusperkeks! I completely missed (somehow) that the changed code modified `Expanded`. I offered another suggestion. Comment at: clang/lib/Format/Format.cpp:3486-3489 + Expanded.InsertBraces = true; +

[PATCH] D148088: [RFC][clangd] Move preamble index task to a seperate task

2023-05-02 Thread Kugan Vivekanandarajah via Phabricator via cfe-commits
kuganv marked an inline comment as done. kuganv added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:88 +if (PreambleIndexTask) + PreambleIndexTask->runAsync("task:" + Path + Version, + std::move(Task));

[PATCH] D149647: [NFC][Clang]Fix static analyzer tool remarks about large copies by value

2023-05-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D149647#4313311 , @HazardyKnusperkeks wrote: > But it is plain wrong. > It was done on purpose, so that e.g. `RemoveBracesLLVM` is not set when the > `SemiRemover` does its work. Ah, shoot, you're right! I missed that

[PATCH] D129951: adds `__disable_adl` attribute

2023-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D129951#4310046 , @cjdb wrote: > Ping (moving my pings from Thursday afternoon to Monday mornings) Apologies for the delay in responding, but I was actually silent in the hopes that the discussion around proposing to

[PATCH] D149637: [Clang] Correctly expand pack in binary subscript expression.

2023-05-02 Thread Corentin Jabot 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 rG2528f1c84588: [Clang] Correctly expand pack in binary subscript expression. (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES

[clang] 2528f1c - [Clang] Correctly expand pack in binary subscript expression.

2023-05-02 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2023-05-02T21:22:03+02:00 New Revision: 2528f1c84588f4a549c12dd1435cbba4a502a077 URL: https://github.com/llvm/llvm-project/commit/2528f1c84588f4a549c12dd1435cbba4a502a077 DIFF:

[PATCH] D149647: [NFC][Clang]Fix static analyzer tool remarks about large copies by value

2023-05-02 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks requested changes to this revision. HazardyKnusperkeks added a comment. This revision now requires changes to proceed. But it is plain wrong. It was done on purpose, so that e.g. `RemoveBracesLLVM` is not set when the `SemiRemover` does its work. Repository: rG LLVM Github

[PATCH] D149677: [clang][TypePrinter] Add option to skip over elaborated types

2023-05-02 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua created this revision. Herald added a project: All. li.zhe.hua requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Elaborated types are sugar that represent how the type was spelled in the original source. When printing a type

[PATCH] D149215: [MemProf] Control availability of hot/cold operator new from LTO link

2023-05-02 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish accepted this revision. snehasish added a comment. This revision is now accepted and ready to land. lgtm Comment at: llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp:3163 + // TODO: If/when other types of memprof cloning are enabled beyond just for + //

[PATCH] D146764: [clang] Make predefined expressions string literals under -fms-extensions

2023-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Modules/predefined.cpp:6 +// RUN: %clang_cc1 -x c++ -std=c++20 -emit-module-interface a.h -o a.pcm -fms-extensions +// RUN: %clang_cc1 -std=c++20 a.cpp -fmodule-file=A=a.pcm -fms-extensions -fsyntax-only +

[PATCH] D149104: [Demangle] make llvm::demangle take std::string_view rather than const std::string

2023-05-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D149104#4313210 , @nickdesaulniers wrote: > Looks like this is causing a regression in lld/test/wasm/why-extract.s when > `-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON` is enabled. I'm looking into it and > hoping to fix

[PATCH] D148458: [clang-tidy][NFC] Split bugprone-exception-escape tests

2023-05-02 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. @isuckatcs Ifdefs are ugly, to avoid messing with multiple runs in same unit test, I decided to split into 2 test files (C++11 and above, and C++11,C++14). And to be honest this change does nothing for caching (zero impact), let me explain: `super_throws_again` alone

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-05-02 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. LGTM. Comment at: llvm/lib/Target/NVPTX/NVPTXCtorDtorLowering.cpp:31 +GlobalStr("nvptx-lower-global-ctor-dtor-id", + cl::desc("Override the name of ctor/dtor globals."), cl::init(""), +

[PATCH] D149553: [clang] Use -std=c++23 instead of -std=c++2b

2023-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D149553#4312788 , @Mordante wrote: > In D149553#4310478 , @aaron.ballman > wrote: > >> Thank you for working on this! The Clang changes are mostly all good, but I >> think we

[PATCH] D149104: [Demangle] make llvm::demangle take std::string_view rather than const std::string

2023-05-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Looks like this is causing a regression in lld/test/wasm/why-extract.s when `-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON` is enabled. I'm looking into it and hoping to fix forward by EOD. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148458: [clang-tidy][NFC] Split bugprone-exception-escape tests

2023-05-02 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > Yes, throw specifier is removed in C++17, split allows to support C++17 and > above in main test file A lot of our test files uses macros to differentiate between specific C++ standards, why not do that here too? There are only a few occurences of functions with

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-05-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. whoops, I've left this here for a while.. @efriedma, are you able to review it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 ___

[PATCH] D149104: [Demangle] make llvm::demangle take std::string_view rather than const std::string

2023-05-02 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. nickdesaulniers marked an inline comment as done. Closed by commit rGc117c2c8ba4a: [Demangle] make llvm::demangle take std::string_view rather than const std…

[clang] c117c2c - [Demangle] make llvm::demangle take std::string_view rather than const std::string

2023-05-02 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2023-05-02T11:20:15-07:00 New Revision: c117c2c8ba4afd45a006043ec6dd858652b2ffcc URL: https://github.com/llvm/llvm-project/commit/c117c2c8ba4afd45a006043ec6dd858652b2ffcc DIFF:

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

2023-05-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D146178#4313058 , @alexander-shaposhnikov wrote: > @erichkeane - feel free to take over this patch. If I get time, I will! Else it'll be here when you get back :) Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I have no specific objections. I do worry about removing support for something that's apparently been accepted for a long time, just on general source-compatibility grounds, but I don't think there's an ObjC-specific problem with it. Repository: rG LLVM Github

[PATCH] D149104: [Demangle] make llvm::demangle take std::string_view rather than const std::string

2023-05-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. Thanks for the review! Comment at: llvm/docs/ReleaseNotes.rst:289 +* ``llvm::demangle`` now takes a ``std::string_view`` rather than a + ``const std::string&``. Be careful passing temporaries

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

2023-05-02 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @erichkeane - feel free to take over this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 ___ cfe-commits

[PATCH] D148690: [clang][Interp] Handle __extension__ unary operators

2023-05-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:791 +#endif return __FUNCTION__[index]; } aaron.ballman wrote: > tbaeder wrote: > > erichkeane wrote: > > > tbaeder wrote: > > > > It's weird that the above two statements warn

[PATCH] D149666: [OpenMP][OMPIRBuilder] Migrate MapCombinedInfoTy from Clang to OpenMPIRBuilder

2023-05-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:6848 + class MapCombinedInfoTy : public llvm::OpenMPIRBuilder::MapCombinedInfoTy { + public: MapExprsArrayTy Exprs; Not sure why you made it a class with public, but I

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-05-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper 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/D133863/new/ https://reviews.llvm.org/D133863

[PATCH] D132819: [RISCV] Add MC support of RISCV zcmp Extension

2023-05-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM with the last 4 few comments addressed. Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h:550 + if (RlistVal == RLISTENCODE::INVALID_RLIST) +

[PATCH] D149612: [Sema] avoid merge error type

2023-05-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:4395 bool MergeTypeWithOld) { - if (New->isInvalidDecl() || Old->isInvalidDecl()) + if (New->isInvalidDecl() || Old->isInvalidDecl() || New->getType()->containsErrors() ||

[PATCH] D143624: Inlining: Run the legacy AlwaysInliner before the regular inliner.

2023-05-02 Thread Dave Green via Phabricator via cfe-commits
dmgreen added subscribers: nikic, spatel, efriedma. dmgreen added a comment. Hello. It sounds like it is really close to being OK. The combine of the shift just seem to make things more difficult. The `icmp ult i1 %cmp4.i, true` is just a not, would it help if it was actually an xor? Or if the

[PATCH] D148370: [Clang][Flang][OpenMP] Add loadOffloadInfoMetadata and createOffloadEntriesAndInfoMetadata into OMPIRBuilder's finalize and initialize

2023-05-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:1063 + // Initialize Types used in OpenMPIRBuilder from OMPKinds.def as well as load + // offload metadata for device from an OpenMP host IR file. +

[PATCH] D149162: [Clang][OpenMP][IRBuilder] Move registerTargetGlobalVariable & getAddrOfDeclareTargetVar into the OMPIRBuilder

2023-05-02 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added a comment. A small ping to ask for some reviewer attention on this patch if at all possible please! Thank you for your time as always, it is greatly appreciated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149162/new/

[PATCH] D149666: [OpenMP][OMPIRBuilder] Migrate MapCombinedInfoTy from Clang to OpenMPIRBuilder

2023-05-02 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis created this revision. TIFitis added reviewers: jsjodin, jdoerfert, dpalermo. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. TIFitis requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, jplehr, sstefan1. Herald added

[PATCH] D148689: [clang][Interp] Handle PredefinedExprs

2023-05-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:783 + +namespace PredefinedExprs { + constexpr char heh(unsigned index) { Can we add tests for each predefined expressions, it does not look like there are a lot of them.

[PATCH] D148370: [Clang][Flang][OpenMP] Add loadOffloadInfoMetadata and createOffloadEntriesAndInfoMetadata into OMPIRBuilder's finalize and initialize

2023-05-02 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added a comment. Small ping to ask for some reviewer attention on this patch if at all possible! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148370/new/ https://reviews.llvm.org/D148370 ___

[PATCH] D148982: [clang][Interp] Fix ignoring conditional operators

2023-05-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik 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/D148982/new/ https://reviews.llvm.org/D148982

  1   2   3   >