[clang] c9e403d - [clang][Interp] Fix zero-init of float and pointer arrays

2023-04-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-04-25T09:00:47+02:00 New Revision: c9e403d1992b064e9cd5b94749fb3f00fa0c0910 URL: https://github.com/llvm/llvm-project/commit/c9e403d1992b064e9cd5b94749fb3f00fa0c0910 DIFF: https://github.com/llvm/llvm-project/commit/c9e403d1992b064e9cd5b94749fb3f00fa0c0910.diff LO

[PATCH] D149059: [clang][Interp] Fix zero-init of float and pointer arrays

2023-04-25 Thread Timm Bäder 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 rGc9e403d1992b: [clang][Interp] Fix zero-init of float and pointer arrays (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D149123: [AArch64][InlineAsm]Add Clang support for flag output constraints

2023-04-25 Thread Mingming Liu via Phabricator via cfe-commits
mingmingl updated this revision to Diff 516640. mingmingl edited the summary of this revision. mingmingl added reviewers: dmgreen, nickdesaulniers, efriedma. mingmingl added a comment. remove 'No newline at end of file' CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149123/new/ https://r

[PATCH] D149123: [AArch64][InlineAsm]Add Clang support for flag output constraints

2023-04-25 Thread Mingming Liu via Phabricator via cfe-commits
mingmingl added a comment. While testing this patch with `./bin/clang -cc1 -S -triple=aarch64 inline-asm-aarch64-flag-output.c` (which invokes global-isel for instruction selection according to `print-after-all` output), turns out GlobalISel doesn't support flag output yet (for x86 or aarch64).

[PATCH] D147610: [RISCV][MC] Add support for experimental Zfbfmin extension

2023-04-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D147610#4294322 , @joshua-arch1 wrote: > In D147610#4294260 , @craig.topper > wrote: > >> In D147610#4294247 , @joshua-arch1 >> wrote:

[PATCH] D143364: [RISCV] Support scalar/fix-length vector NTLH intrinsic with different domain

2023-04-25 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni added inline comments. Comment at: clang/lib/Headers/CMakeLists.txt:360 endif() if(RISCV IN_LIST LLVM_TARGETS_TO_BUILD) # Generate riscv_vector.h Here Comment at: clang/test/CodeGen/RISCV/ntlh-intrinsics/riscv32-zihintntl.c:5 +#inc

[PATCH] D147989: [clang] Fix Attribute Placement

2023-04-25 Thread Priyanshi Agarwal via Phabricator via cfe-commits
ipriyanshi1708 marked an inline comment as done. ipriyanshi1708 added a comment. In D147989#4293278 , @aaron.ballman wrote: > Oops, I spoke too soon -- it looks like the precommit CI failure is related > to this patch. This is what I get when I tested l

[PATCH] D134821: [flang][driver] Allow main program to be in an archive

2023-04-25 Thread Shao-Ce SUN via Phabricator via cfe-commits
sunshaoce updated this revision to Diff 516651. sunshaoce added a comment. Address @awarzynski's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134821/new/ https://reviews.llvm.org/D134821 Files: clang/lib/Driver/ToolChains/Gnu.cpp fla

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

2023-04-25 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 516645. serge-sans-paille retitled this revision from "[clang] Enforce internal linkage for inline builtin" to "[clang] Enforce external linkage for inline builtin original declaration". serge-sans-paille edited the summary of this revision. serge-s

[PATCH] D148355: [analyzer] Fix comparison logic in ArrayBoundCheckerV2

2023-04-25 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy marked 4 inline comments as done. donat.nagy added a comment. @steakhal I marked a few comments as Done (I accidentally missed some when I was creating the most recent patch) and now the only not-Done thing is the followup commit for refactoring the optionalness of RegionRawOffsetV2.

[PATCH] D148949: [dataflow] HTMLLogger - show the value of the current expr

2023-04-25 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp:96 +for (const auto& Prop : V.properties()) + JOS.attributeObject(Prop.first(), [&] { dump(*Prop.second); }); + sammccall wrote: > mboehme wrote: > > IIUC, this pl

[PATCH] D148355: [analyzer] Fix comparison logic in ArrayBoundCheckerV2

2023-04-25 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:173 + const MemSpaceRegion *SR = rawOffset.getRegion()->getMemorySpace(); + if (SR->getKind() != MemRegion::UnknownSpaceRegionKind) { +// a pointer to UnknownSpaceRegionK

[PATCH] D148730: [C11] Allow initialization of an atomic-qualified pointer from a null pointer constant

2023-04-25 Thread Bogdan Graur via Phabricator via cfe-commits
bgraur added a comment. We see the same compilation error as the one reported by @sbc100 in several other C libraries. Here's a short reproducer: https://godbolt.org/z/Y8eds47na The tests imply that this should work. Please revert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D148355: [analyzer] Fix comparison logic in ArrayBoundCheckerV2

2023-04-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D148355#4294738 , @donat.nagy wrote: > @steakhal I marked a few comments as Done (I accidentally missed some when I > was creating the most recent patch) and now the only not-Done thing is the > followup commit for refactor

[PATCH] D148284: [clangd] Add "readonly" token to const member expressions

2023-04-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks for the patch! `addExtraModifier` is a kind of hacky mechanism to attach modifiers in `CollectExtraHighlightings` to tokens created during `findExplicitReferences()`; it would be nicer to add the modifier at the time of creating the token, but it doesn't look lik

[PATCH] D148949: [dataflow] HTMLLogger - show the value of the current expr

2023-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 516689. sammccall added a comment. display properties at the end of the kv list Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148949/new/ https://reviews.llvm.org/D148949 Files: clang/include/clang/Analysi

[PATCH] D148949: [dataflow] HTMLLogger - show the value of the current expr

2023-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp:96 +for (const auto& Prop : V.properties()) + JOS.attributeObject(Prop.first(), [&] { dump(*Prop.second); }); + mboehme wrote: > sammccall wrote: > > mboehme wro

[PATCH] D149133: [clang][Interp] BaseToDerived casts

2023-04-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We can implement these similarly to DerivedToBase

[PATCH] D149133: [clang][Interp] BaseToDerived casts

2023-04-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 516701. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149133/new/ https://reviews.llvm.org/D149133 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Interp.cpp clang/lib/AST/Interp/Int

[PATCH] D148783: [clangd] Add support TextDocumentEdit.

2023-04-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 516702. hokein added a comment. address review comments, added one more test for command code-actions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148783/new/ https://reviews.llvm.org/D148783 Files: clang-to

[PATCH] D148783: [clangd] Add support TextDocumentEdit.

2023-04-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1746 + + if (DiagOpts.EmbedFixesInDiagnostics && !CodeActions.empty()) { + Diag.codeActions.emplace(CodeActions); kadircet wrote: > we didn't

[PATCH] D146269: MIPS: allow o32 abi with 64bit CPU and 64 abi with 32bit triple

2023-04-25 Thread YunQiang Su via Phabricator via cfe-commits
wzssyqa added a comment. @MaskRay can you help to submit this patch? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146269/new/ https://reviews.llvm.org/D146269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D148066: [RISCV] Add Smaia and Ssaia extensions support

2023-04-25 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. > My concern would be that as we don't gate CSR names on enabling the relevant > extension, people could start using CSR names and encodings that could > change, without opting in via -menable-experimental-extensions, perhaps not > realising that they're using the un

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

2023-04-25 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat updated this revision to Diff 516708. 4vtomat added a comment. Rename clang/test/Driver/print-supported-marchs.c to clang/test/Driver/print-supported-extensions.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146054/new/ https://reviews.ll

[PATCH] D148992: [clang-repl] Fix dynamic library test to avoid cstdio and linker

2023-04-25 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added inline comments. Comment at: clang/test/Interpreter/dynamic-library.cpp:12 +// return 5; +// } Should we wrap this in a `extern "C"` block? Otherwise, the shared library has a C++ interface, which is not stable. It won't matter in this simple

[PATCH] D148992: [clang-repl] Fix dynamic library test to avoid cstdio and linker

2023-04-25 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite updated this revision to Diff 516715. argentite marked an inline comment as done. argentite added a comment. extern "C" and enable PS4/5 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148992/new/ https://reviews.llvm.org/D148992 Files:

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-25 Thread Orlando Cazalet-Hyams via Phabricator via cfe-commits
Orlando added a comment. Thanks everyone for your reports and help, it's really appreciated. In D146987#4286318 , @dmgreen wrote: > Hello, I also noticed this potentially causing problems for scalable vectors: > https://godbolt.org/z/qdr8P86aW > That pro

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

2023-04-25 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 516718. VincentWu marked 2 inline comments as done. VincentWu added a comment. rebase & address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 Files: cl

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-25 Thread Jeremy Morse via Phabricator via cfe-commits
jmorse added a comment. Given our repeated back-and-forth, it's probably better to do some pre-testing: @MaskRay @paulkirth we've got a command line switch for enabling this, are there any fuchsia / chromium facilities for pull-request-builds that we'd be able to use to pre-check this; or if th

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

2023-04-25 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 516722. VincentWu added a comment. paraphrase grammar of error msg Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 Files: clang/test/Preprocessor/riscv-target-fea

[PATCH] D149119: [CMake] Use llvm-nm to extract symbols for staged LTO builds on Windows

2023-04-25 Thread Tomas Matheson via Phabricator via cfe-commits
tmatheson added a comment. This looks like a nice addition. Would it make sense to use llvm-nm always, not restricted to bootstrap builds? And would that work on Windows and allow us to simplify this script substantially by using one tool for all platforms? Repository: rG LLVM Github Monorep

[PATCH] D103930: [clang][HeaderSearch] Fix implicit module when using header maps

2023-04-25 Thread Ivan Murashko via Phabricator via cfe-commits
ivanmurashko added a comment. @arphaman, @andrewjcg, what's the status of the diff? The functionality is important for me and I want to get it landed. BTW: @andrewjcg I can commander the diff if you don't mind. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D147218: [OpenMP][Flang][MLIR] Lowering of OpenMP requires directive from parse tree to MLIR

2023-04-25 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak updated this revision to Diff 516729. skatrak added a comment. Herald added subscribers: llvm-commits, cfe-commits, bviyer, Moerafaat, zero9178, awarzynski, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartb

[PATCH] D148783: [clangd] Add support TextDocumentEdit.

2023-04-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks! Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1694 -std::vector ClangdLSPServer::getFixes(llvm::StringRef File, -

[PATCH] D147218: [OpenMP][Flang][MLIR] Lowering of OpenMP requires directive from parse tree to MLIR

2023-04-25 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak updated this revision to Diff 516730. skatrak added a comment. Try undoing last change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147218/new/ https://reviews.llvm.org/D147218 Files: flang/include/flang/Lower/OpenMP.h flang/lib/Lowe

[PATCH] D149144: [clang][dataflow] Eliminate intermediate `ReferenceValue`s from `Environment::DeclToLoc`.

2023-04-25 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun, inglorion. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For the wider context of this change,

[PATCH] D149144: [clang][dataflow] Eliminate intermediate `ReferenceValue`s from `Environment::DeclToLoc`.

2023-04-25 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:43 +namespace { + There were a number of pre-existing declarations that were ODR violation risks. I'm adding a new file-local function below, so instead

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-04-25 Thread Ritanya via Phabricator via cfe-commits
RitanyaB updated this revision to Diff 516733. RitanyaB added a comment. Adding the support in SemaOpenMP.cpp. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146418/new/ https://reviews.llvm.org/D146418 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaDecl.cpp clang/lib/S

[PATCH] D148992: [clang-repl] Fix dynamic library test to avoid cstdio and linker

2023-04-25 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz accepted this revision. sgraenitz added a comment. Thanks. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148992/new/ https://reviews.llvm.org/D148992 ___ cfe-commits mailing list cfe-commi

[PATCH] D148783: [clangd] Add support TextDocumentEdit.

2023-04-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 516734. hokein marked an inline comment as done. hokein added a comment. update and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148783/new/ https://reviews.llvm.org/D148783 Files: clang-tools-extra/c

[clang-tools-extra] 67e02b2 - [clangd] Add support TextDocumentEdit.

2023-04-25 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2023-04-25T13:07:42+02:00 New Revision: 67e02b282b70c05b10e4862fdeae4de45de39844 URL: https://github.com/llvm/llvm-project/commit/67e02b282b70c05b10e4862fdeae4de45de39844 DIFF: https://github.com/llvm/llvm-project/commit/67e02b282b70c05b10e4862fdeae4de45de39844.diff LO

[PATCH] D148783: [clangd] Add support TextDocumentEdit.

2023-04-25 Thread Haojian Wu 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 rG67e02b282b70: [clangd] Add support TextDocumentEdit. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D149144: [clang][dataflow] Eliminate intermediate `ReferenceValue`s from `Environment::DeclToLoc`.

2023-04-25 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 516745. mboehme added a comment. Add two assertions that I forgot to add in the first upload. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149144/new/ https://reviews.llvm.org/D149144 Files: clang/include/c

[PATCH] D142907: LangRef: Add "dynamic" option to "denormal-fp-math"

2023-04-25 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D142907#4288555 , @efriedma wrote: > If you have a library function that's built with > "denormal-fp-math"="dynamic,dynamic", you can link it into code built in any > mode, and LTO should be able to propagate that mode from th

[PATCH] D148355: [analyzer] Fix comparison logic in ArrayBoundCheckerV2

2023-04-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. In D148355#4294798 , @steakhal wrote: > In D148355#4294738 , @donat.nagy > wrote: > >> @steakhal I marke

[PATCH] D115907: [misexpect] Re-implement MisExpect Diagnostics

2023-04-25 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Herald added subscribers: hoy, Enna1, StephenFan. We gave this a try in Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1434989 While the diagnostics are interesting, two things make this less useful for our developers: 1. It also fires in situations where

[PATCH] D149088: [clang-format] Add run-clang-format.py script.

2023-04-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. is it possible to pass other arguments like `-n` if not running in place is there any protection from prevent stdout/stderr from overlapping..? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149088/new/ https://revi

[PATCH] D149088: [clang-format] Add run-clang-format.py script.

2023-04-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/tools/run-clang-format.py:63 +default="c,cc,cpp,cxx,c++,h,hh,hpp,hxx,h++") +parser.add_argument('-style', +help='formatting style', what about ``` run-cl

[PATCH] D149148: [Sema] Fix _Alignas/isCXX11Attribute() FIXME

2023-04-25 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added a reviewer: erichkeane. Herald added a reviewer: aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When doing https://reviews.llvm

[PATCH] D148601: [Clang] Handle Error message to output proper Prefix

2023-04-25 Thread Usman Akinyemi via Phabricator via cfe-commits
Unique_Usman updated this revision to Diff 516762. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148601/new/ https://reviews.llvm.org/D148601 Files: clang/include/clang/Basic/DiagnosticFrontendKinds.td clang/lib/Frontend/VerifyDiagnosticConsumer.cpp Index: clang/lib/Frontend/Verify

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

2023-04-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Rename CheckBaseDerived to something more general

cfe-commits@lists.llvm.org

2023-04-25 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This parameter was already a no-op, so removing

[PATCH] D149009: [Sema]Select correct lexical context during template instantiate

2023-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:3598 + FD->isDefined(FDFriend, true) && + FDFriend->getFriendObjectKind() != Decl::FriendObjectKind::FOK_None) { +// if Function defined by inline friend, use inline fried as Decl

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-25 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added a comment. In D146557#4292223 , @TIFitis wrote: > Cleaned up how IsBegin argument is passed for createTargetData call. Please submit this directly as an NFC patch. We should always work towards simple patches that are easy to rev

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-04-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:14467-14468 + // directive and has static storage duration. + if (D && D->hasAttr() && isa(D)) { +if ((cast(D))->hasGlobalStorage()) + ActOnOpenMPImplicitDeclareTarget(D); --

[PATCH] D149154: [clang][Interp] Emit diagnostic when comparing function pointers

2023-04-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Function pointers can be compared for (in)equalit

[PATCH] D148601: [Clang] Handle Error message to output proper Prefix

2023-04-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D148601#4279604 , @Unique_Usman wrote: > In D148601#4279334 , @tbaeder wrote: > >> I am not 100% sure about the semantics of passing multiple prefixes, i.e. if >> the error is emitted

[PATCH] D149158: [clang][analyzer] Cleanup tests of StdCLibraryFunctionsChecker (NFC)

2023-04-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a project: All. balazske requested revie

cfe-commits@lists.llvm.org

2023-04-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149151/new/ https://reviews.llvm.org/D149151 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D125272: [clang] Add -fcheck-new support

2023-04-25 Thread Pedro Falcato via Phabricator via cfe-commits
heatd added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4117 + if (const Arg *A = Args.getLastArg(OPT_fcheck_new)) +Opts.CheckNew = true; + MaskRay wrote: > Use `CodeGenOpts<"CheckNew">` and avoid change to this file. CodeGenOpts

[PATCH] D149160: [clang][analyzer] Handle special value AT_FDCWD in affected standard functions

2023-04-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a reviewer: NoQ. Herald added a project:

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

2023-04-25 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon created this revision. Herald added subscribers: sunshaoce, bzcheeseman, rriddle, rogfer01, guansong, hiraditya, yaxunl. Herald added a reviewer: sscalpone. Herald added a project: All. agozillon requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscrib

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

2023-04-25 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added a comment. I've tested this with the two following combinations, x86/AMDGPU and x86/NVPTX (newer plugin I think, not old, a little unsure on the runtime segment) and it passes the Clang test suites, if there is anything else I can do to make sure this is tested nicely and due di

[PATCH] D149160: [clang][analyzer] Handle special value AT_FDCWD in affected standard functions

2023-04-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 516818. balazske added a comment. Fixed formatting problems. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149160/new/ https://reviews.llvm.org/D149160 Files: clang/lib/StaticAnalyzer/Checkers/StdLibraryFun

[clang] 1395cde - Fix codegen for initialization of global atomics

2023-04-25 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-04-25T11:37:06-04:00 New Revision: 1395cde24b3641e284bb1daae7d56c189a2635e3 URL: https://github.com/llvm/llvm-project/commit/1395cde24b3641e284bb1daae7d56c189a2635e3 DIFF: https://github.com/llvm/llvm-project/commit/1395cde24b3641e284bb1daae7d56c189a2635e3.diff

[PATCH] D148730: [C11] Allow initialization of an atomic-qualified pointer from a null pointer constant

2023-04-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D148730#4294781 , @bgraur wrote: > We see the same compilation error as the one reported by @sbc100 in several > other C libraries. > > Here's a short reproducer: https://godbolt.org/z/Y8eds47na > > The tests imply that

[PATCH] D149154: [clang][Interp] Emit diagnostic when comparing function pointers

2023-04-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:652-653 + const SourceInfo &Loc = S.Current->getSource(OpPC); + S.FFDiag(Loc, diag::note_constexpr_pointer_comparison_unspecified) + << LS << RS; + return false; Can we pass in

[PATCH] D115907: [misexpect] Re-implement MisExpect Diagnostics

2023-04-25 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. Thanks for the report Hans. In D115907#4295363 , @hans wrote: > We gave this a try in Chromium: > https://bugs.chromium.org/p/chromium/issues/detail?id=1434989 > > While the diagnostics are interesting, two things make this le

[PATCH] D147989: [clang] Fix Attribute Placement

2023-04-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The issue is that `GetDiagnosticTypeSpecifierID()` is called for more diagnostics than just `warn_declspec_attribute_ignored`. You need to also update the `err_constexpr_tag` and `err_standalone_class_nested_name_specifier` to add `enum class` and `enum struct` as

[PATCH] D149098: [Clang] Add tests and mark as implemented WG14 N2728 (char16_t & char32_t string literals shall be UTF-16 & UTF-32)

2023-04-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Comment at: clang/test/Lexer/char-literal.cpp:49 +#ifndef __cplusplus +// expected-error@-2 {{universal character name refers to a control character}} +#endif cor3ntin wrote: > I think t

[PATCH] D148372: [clang] add diagnose when member function contains invalid default argument

2023-04-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Are there any calls to `Sema::ActOnParamDefaultArgumentError` left? If not, can you also remove the function? Otherwise this LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D148987: [clang][Interp] Check Neg ops for errors

2023-04-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:438-441 + // FIXME: This code Just Works[tm] for floats, but it's probably not doing + // the right thing. At least the diagnostic could be better without + // the conversion to an APInt. +

[PATCH] D148869: [Driver][BareMetal] Support --emit-static-lib in BareMetal driver

2023-04-25 Thread Alex Brachet via Phabricator via cfe-commits
abrachet accepted this revision. abrachet added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:170 bool BareMetal::handlesTarget(const llvm::Triple &Triple) { return isARMBareMetal(Triple) || isAArch64Ba

[PATCH] D149163: [NFC][CLANG] Fix coverity remarks about large copy by values

2023-04-25 Thread Soumi Manna via Phabricator via cfe-commits
Manna created this revision. Manna added a reviewer: tahonermann. Herald added a subscriber: arphaman. Herald added a project: All. Manna requested review of this revision. Herald added a project: clang. Reported By Static Analyzer Tool, Coverity: Big parameter passed by value Copying large value

[PATCH] D149165: [clangd] Deduplicate missing-include findings

2023-04-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: VitaNuo. Herald added a subscriber: arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository:

[PATCH] D149163: [NFC][CLANG] Fix coverity remarks about large copy by values

2023-04-25 Thread Soumi Manna via Phabricator via cfe-commits
Manna updated this revision to Diff 516834. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149163/new/ https://reviews.llvm.org/D149163 Files: clang/include/clang/Sema/CodeCompleteConsumer.h clang/lib/CodeGen/CGGPUBuiltin.cpp clang/lib/CodeGen/CGNonTrivialStruct.cpp clang/lib/Code

[PATCH] D149098: [Clang] Add tests and mark as implemented WG14 N2728 (char16_t & char32_t string literals shall be UTF-16 & UTF-32)

2023-04-25 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann updated this revision to Diff 516835. tahonermann added a comment. Thank you @cor3ntin, that was an excellent suggestion; this is much more readable now! I updated the new code to use custom verify tags (I left the existing code alone). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D142907: LangRef: Add "dynamic" option to "denormal-fp-math"

2023-04-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. Oh, sorry, I missed that the new code specifically runs on functions imported using -mlink-builtin-bitcode. I somehow thought it was running on all functions. LGTM CHANGES SINCE LAST A

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

2023-04-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Herald added a subscriber: hoy. Ping for review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141451/new/ https://reviews.llvm.org/D141451 ___ cfe-commits mailing list cf

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

2023-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. Sorry, I didn't see your updates I guess! Thanks for the yak-shave btw, I realize that has turned into a heck of a mess :/ CFE LGTM. I don't believe I can approve the LLVM components

[PATCH] D148987: [clang][Interp] Check Neg ops for errors

2023-04-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:438-441 + // FIXME: This code Just Works[tm] for floats, but it's probably not doing + // the right thing. At least the diagnostic could be better without + // the conversion to an APInt. + --

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

2023-04-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. 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 doesn't if it would otherwise be linkonce_odr. CHANGES SINCE LAST ACTION https://reviews.llvm.

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

2023-04-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. 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 in the past). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148723/new/ https://review

[PATCH] D142401: [Clang] Fix a crash when recursively callig a default member initializer.

2023-04-25 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/D142401/new/ https://reviews.llvm.org/D142401 ___

[PATCH] D149154: [clang][Interp] Emit diagnostic when comparing function pointers

2023-04-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:652-653 + const SourceInfo &Loc = S.Current->getSource(OpPC); + S.FFDiag(Loc, diag::note_constexpr_pointer_comparison_unspecified) + << LS << RS; + return false; aaron.ballman wrote:

[PATCH] D72538: [ThinLTO] Add additional ThinLTO pipeline testing with new PM

2023-04-25 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D72538#4291552 , @nikic wrote: > Would it be possible to cut down the Clang side tests to only check parts > that Clang controls in some way, e.g. that SLPVectorizer is enabled? This > test is something of a PITA because it

[PATCH] D149123: [AArch64][InlineAsm]Add Clang support for flag output constraints

2023-04-25 Thread David Li via Phabricator via cfe-commits
davidxl added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:1216 +// Returns the length of cc constraint. +static unsigned matchAsmCCConstraint(const char *&Name) { + constexpr unsigned len = 5; Name is not modified in this method, so perhaps

[PATCH] D149172: [clang][Interp] Emit proper diagnostic when comparing unrelated pointers

2023-04-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Also adds `toDiagnosticString()` to `Pointer` so we

[PATCH] D148975: -fdebug-prefix-map=: make the last win when multiple prefixes match

2023-04-25 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.h:209 - std::map DebugPrefixMap; + llvm::SmallVector, 0> DebugPrefixMap; std::map CoveragePrefixMap; MaskRay wrote: > scott.linder wrote: > > What benefit does forcing

[PATCH] D115907: [misexpect] Re-implement MisExpect Diagnostics

2023-04-25 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D115907#4295923 , @paulkirth wrote: >> 2. Due to inlining etc., it often gets the source locations wrong, which >> means it points at code where again there were no expectations -- but >> perhaps that code got inlined into an ex

[PATCH] D148757: [clang] Apply last -fcoverage-prefix-map option

2023-04-25 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem updated this revision to Diff 516853. gulfem added a comment. Updated the text. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148757/new/ https://reviews.llvm.org/D148757 Files: clang/include/clang/Basic/CodeGenOptions.h clang/lib/CodeG

[PATCH] D103930: [clang][HeaderSearch] Fix implicit module when using header maps

2023-04-25 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > Looks like this patch causes a number of issues for us, I will work with > @jansvoboda11 to see if there's some way to resolve them. If you can share a reproducer I'm pretty sure @ivanmurashko can help make it work for y'all too. Thanks! Repository: rG LLVM Github

[PATCH] D146386: [MS ABI] Fix mangling references to declarations.

2023-04-25 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146386/new/ https://reviews.llvm.org/D146386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D148967: Disable atexit()-based lowering when LTO'ing kernel/kext code

2023-04-25 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab accepted this revision. ab added a comment. This revision is now accepted and ready to land. A comment inline, but LGTM otherwise, thanks! Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1208 + // -disable-atexit-based-global-dtor-lowering CodeGen flag. + //

[PATCH] D103930: [clang][HeaderSearch] Fix implicit module when using header maps

2023-04-25 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg added a comment. @ivanmurashko: Sorry for the delay getting back to you here. Feel free to commandeer, as I don't have plans to get to this soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103930/new/ https://reviews.llvm.org/D103930

[PATCH] D147281: Stop modifying trailing return types.

2023-04-25 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this caused a change in behavior: https://github.com/llvm/llvm-project/issues/62361 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147281/new/ https://reviews.llvm.org/D147281

[PATCH] D149000: Update with warning message for comparison to NULL pointer

2023-04-25 Thread Krishna Narayanan via Phabricator via cfe-commits
Krishna-13-cyber updated this revision to Diff 516857. Krishna-13-cyber added a comment. - Updated with reviewed changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149000/new/ https://reviews.llvm.org/D149000 Files: clang/lib/Sema/SemaCheckin

[PATCH] D115907: [misexpect] Re-implement MisExpect Diagnostics

2023-04-25 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. In D115907#4296154 , @hans wrote: > In D115907#4295923 , @paulkirth > wrote: > >>> 2. Due to inlining etc., it often gets the source locations wrong, which >>> means it points at code

[PATCH] D149123: [AArch64][InlineAsm]Add Clang support for flag output constraints

2023-04-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:1216 +// Returns the length of cc constraint. +static unsigned matchAsmCCConstraint(const char *&Name) { + constexpr unsigned len = 5; davidxl wrote: > Name is not modified in

[PATCH] D72538: [ThinLTO] Add additional ThinLTO pipeline testing with new PM

2023-04-25 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. In D72538#4296119 , @tejohnson wrote: > In D72538#4291552 , @nikic wrote: > >> Would it be possible to cut down the Clang side tests to only check parts >> that Clang controls in some way, e.

  1   2   >