[PATCH] D149640: [clang][dataflow] Change PruneTriviallyFalseEdges for building CFG

2023-05-02 Thread Kinuko Yasuda via Phabricator via cfe-commits
kinu added a comment. (comment only) Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:2673 - -EXPECT_EQ(BarVal, FooPointeeVal); }); mboehme wrote: > It's unfortuante that all of these checks have gone away. I think the test >

[PATCH] D149561: [clang-format] Recognize Verilog edge identifiers

2023-05-02 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 518752. sstwcw added a comment. - add annotator test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149561/new/ https://reviews.llvm.org/D149561 Files: clang/lib/Format/FormatToken.h clang/unittests/Format/F

[PATCH] D149657: [clang-format] Stop indent Verilog `begin` keyword on single line

2023-05-02 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. sstwcw requested review of this revision. When the line is too long and the `begin` keyword wraps to t

[clang] 45905b5 - Add missing include

2023-05-02 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2023-05-02T08:37:40-07:00 New Revision: 45905b53f0eddb7b07a35a9a493a5ebd508bedda URL: https://github.com/llvm/llvm-project/commit/45905b53f0eddb7b07a35a9a493a5ebd508bedda DIFF: https://github.com/llvm/llvm-project/commit/45905b53f0eddb7b07a35a9a493a5ebd508bedda.diff

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

2023-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Interpreter/Value.h:46 + +#define REPL_BUILTIN_TYPES \ + X(bool, Bool) \ v.g

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

2023-05-02 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon updated this revision to Diff 518759. agozillon added a comment. Rebase on an updated main to see if it fixes bolt error (like it appears to on my local machine) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149162/new/ https://reviews.l

[clang] ea6ecdb - Call printName to get name of Decl

2023-05-02 Thread Aaron Ballman via cfe-commits
Author: Dan McGregor Date: 2023-05-02T11:56:23-04:00 New Revision: ea6ecdbfe09d4318f2d616af794e2930f996e393 URL: https://github.com/llvm/llvm-project/commit/ea6ecdbfe09d4318f2d616af794e2930f996e393 DIFF: https://github.com/llvm/llvm-project/commit/ea6ecdbfe09d4318f2d616af794e2930f996e393.diff

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGea6ecdbfe09d: Call printName to get name of Decl (authored by dankm, committed by aaron.ballman). Changed prior to commit: https://reviews.llvm.org/D149272?vs=518050&id=518761#toc Repository: rG LLVM

[PATCH] D149640: [clang][dataflow] Change PruneTriviallyFalseEdges for building CFG

2023-05-02 Thread Kinuko Yasuda via Phabricator via cfe-commits
kinu updated this revision to Diff 518762. kinu added a comment. Updated changes further not to lose the existing checks with the do-while test. Also restored the simplest test that exercises the while-true one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D148767: Restore CodeGen/LowLevelType from `Support`

2023-05-02 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D148767#4311589 , @chapuni wrote: > In D148767#4311564 , @barannikov88 > wrote: > >> Adding CodeGen dependency to MCTargetDesc/AsmParser/Disassembler does not >> seem right. Why

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

2023-05-02 Thread Douglas Yung via Phabricator via cfe-commits
dyung accepted this revision. dyung 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/D149655/new/ https://reviews.llvm.org/D149655 ___ c

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

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/literals.cpp:791 +#endif return __FUNCTION__[index]; } tbaeder wrote: > erichkeane wrote: > > tb

[PATCH] D148723: [clang] Enforce external linkage for inline builtin original declaration

2023-05-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D148723#4296112 , @efriedma wrote: > Really, I'd prefer to keep isInlineBuiltinDeclaration() targeted as narrowly > as possible; part of that is making it not trigger for C++ inline functions > (which it never did i

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-05-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. Related to `btf_type_is_modifier()` issue, Not that depending on call site, sometimes typedef is skipped and sometimes are not. So we could keep btf_type_is_modifier() as is and modify the call size to not skip typedef in specific places. Or we could remove typede

[PATCH] D149514: Check if First argument in _builtin_assume_aligned_ is of pointer type

2023-05-02 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:7979-7986 { ExprResult FirstArgResult = DefaultFunctionArrayLvalueConversion(FirstArg); -if (FirstArgResult.isInvalid()) +if (checkBuiltinArgument(*this, TheCall, 0)) r

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

2023-05-02 Thread via cfe-commits
Author: 4vtomat Date: 2023-05-02T09:19:32-07:00 New Revision: e6ffd42a933e74e2b634e84ef8666483e53552f3 URL: https://github.com/llvm/llvm-project/commit/e6ffd42a933e74e2b634e84ef8666483e53552f3 DIFF: https://github.com/llvm/llvm-project/commit/e6ffd42a933e74e2b634e84ef8666483e53552f3.diff LOG:

[PATCH] D147621: [clang][Interp] Start handling mutable record members

2023-05-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Two cases to consider: https://godbolt.org/z/ovofPExGK namespace MutableFields { class Foo { public: constexpr Foo() : I(1) {} mutable int I; // ref-note {{declared here}} }; constexpr int foo() { constexpr Foo F; F.I = 12;

[PATCH] D148723: [clang] Enforce external linkage for inline builtin original declaration

2023-05-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D148723#4296111 , @efriedma wrote: > I'm a little concerned that this will explode in unexpected ways... in > particular, it'll fail to link if the function doesn't actually exist > externally. Which it probably do

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-05-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. I see the following in the Summary: Type tag for CVR modifier type C: volatile int __attribute__((btf_type_tag("__b"))) b; DWARF: 0x31: DW_TAG_variable DW_AT_name ("b") DW_AT_type (0x3c "volatile int") 0

[PATCH] D147266: [AArch64] Add IR intrinsics for vbsl* C intrinsics

2023-05-02 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. My preference would be for fixing the code we have, not introducing new intrinsics. Intrinsics act as black-boxes for the optimizer, and I'm pretty sure I've heard of cases in the past of the compiler optimizing the or/and/xor's to nicer sequences of instructions. It wo

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-05-02 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 planned changes to this revision. eddyz87 added a comment. In D143967#4312746 , @yonghong-song wrote: > I see the following in the Summary: > > Type tag for CVR modifier type > > C: > > volatile int __attribute__((btf_type_tag("__b"))

[clang] 64888d4 - SemaRISCVVectorLookup.cpp: Prune `default:` block. [-Wcovered-switch-default]

2023-05-02 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2023-05-03T01:37:37+09:00 New Revision: 64888d437c9e0dd52adad9b26784369a4ea24b7f URL: https://github.com/llvm/llvm-project/commit/64888d437c9e0dd52adad9b26784369a4ea24b7f DIFF: https://github.com/llvm/llvm-project/commit/64888d437c9e0dd52adad9b26784369a4ea24b7f.dif

[PATCH] D149640: [clang][dataflow] Change PruneTriviallyFalseEdges for building CFG

2023-05-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149640/new/ https://reviews.llvm.org/D149640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

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

2023-05-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D149553#4310478 , @aaron.ballman wrote: > Thank you for working on this! The Clang changes are mostly all good, but I > think we should hold off on changing the value of `__cplusplus` for the > moment as it's not set in sto

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

2023-05-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 518776. cor3ntin added a comment. Add release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149637/new/ https://reviews.llvm.org/D149637 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaExpr.cpp

[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 518777. aeubanks added a comment. add module test 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 clang/include/clang/AST/I

[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 accepted this revision. tahonermann added a comment. Looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149647/new/ https://reviews.llvm.org/D149647 ___ cfe-commits mailing list

[PATCH] D148614: [clang][Interp] Add frame depth checking

2023-05-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. The changes make sense, I am sure about any trade-offs of doing the checking during the call Vs doing at return. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148614/new/ https://reviews.llvm.org/D148614 ___ cfe-commi

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

2023-05-02 Thread Soumi Manna via Phabricator via cfe-commits
Manna added a comment. Thank you @erichkeane and @tahonermann for reviews! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149647/new/ https://reviews.llvm.org/D149647 ___ cfe-commits mailing list cfe-comm

[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 ___

[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 ___ c

[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. Repository

[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 pr

[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/ https://rev

[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. + OMPBuilder.initialize(CGM.getLangOpts().OpenM

[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] 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() || Old->

[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] 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] 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 guess

[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] 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 mailin

cfe-commits@lists.llvm.org

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] 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 Mon

[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 LA

cfe-commits@lists.llvm.org

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: https://github.com/llvm/llvm-project/commit/c117c2c8ba4afd45a006043ec6dd858652b2ffcc.di

cfe-commits@lists.llvm.org

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… (authored

[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 ___ cfe

[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 `th

cfe-commits@lists.llvm.org

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 https://reviews.

[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 sh

[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(""), + cl::Hidden);

[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

cfe-commits@lists.llvm.org

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 forwar

[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] 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 + // ho

[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 outsid

[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

[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: https://github.com/llvm/llvm-project/commit/2528f1c84588f4a549c12dd1435cbba4a502a077.diff

[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 S

[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 WG

[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 th

[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 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; + Pa

[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 h

[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); +} `RecursiveASTVisit

[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: clang/lib/Basic/Targets/AMDGPU.cp

[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 &InliningDecisions) const; can this return a SmallVector instead of taking one as a mutable param? Comme

[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 eval

[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] 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 h

[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, Clang

[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] 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 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 = &b + 1; // expected-error {{must be initialized by a constant expressi

[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 = &b + 1; // expected-error {{must be initialized by a constant expression}} \ +// expected-note {{cannot access base class of pointer past the e

[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 f

[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 https://lists.llvm.o

[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 mult

[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 &Env) { +return BracesInserter(Env, Expanded).process(/*SkipAnnotation=*/true); }); --

[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 -verify=

[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, cfe-c

[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 LA

[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 https://reviews.llvm.org/D148370/new/

[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 https://lists.llvm.

[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 clang/include/clang/AST/Ignor

[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] 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 a

[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: %cla

[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 clang/include/clan

cfe-commits@lists.llvm.org

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: https://github.com/llvm/llvm-project/commit/3e3c6f24ff85ea52ed67d4c26f1d3d0eacd1ad1b.di

[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 t

[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 https://lists.llvm.org/c

[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] 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 (ArraySize

[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 cfe-commits@lists.ll

[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: clang/tools/driver/cc1_mai

[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 clang/li

[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 &&errorReportFn = + [](llvm::OpenMPIRBuilder::EmitMetadataErrorKind kind, no llvm:: style: ErrorReportFn

[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 ma

<    1   2   3   >