[PATCH] D145346: [NFC] Format printstmt

2023-03-06 Thread xufei via Phabricator via cfe-commits
zkkxu added a comment. In D145346#4171031 , @jrtc27 wrote: > This isn't NFC, the output changes actually, i think it change nothing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145346/new/ https://review

[PATCH] D144780: Explicit cast on customized offsetof should not be ignored when evaluating as const

2023-03-06 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Ah sorry that it took me so long to push this. I completely forgot about this one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144780/new/ https://reviews.llvm.org/D144780 __

[PATCH] D144780: Explicit cast on customized offsetof should not be ignored when evaluating as const

2023-03-06 Thread Balázs Benics 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 rG53f75425b3fe: [analyzer] Explicit cast on customized offsetof should not be ignored when… (authored by danix800, committed by steakhal). Changed pr

[clang] 53f7542 - [analyzer] Explicit cast on customized offsetof should not be ignored when evaluating as const

2023-03-06 Thread Balazs Benics via cfe-commits
Author: danix800 Date: 2023-03-07T08:41:30+01:00 New Revision: 53f75425b3fec73d7a78e85e2b982741c9aa81f0 URL: https://github.com/llvm/llvm-project/commit/53f75425b3fec73d7a78e85e2b982741c9aa81f0 DIFF: https://github.com/llvm/llvm-project/commit/53f75425b3fec73d7a78e85e2b982741c9aa81f0.diff LOG:

[clang] 6ceb32a - [C++20] [Modules] Handle the linkage of defaulted friend function

2023-03-06 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-03-07T15:34:33+08:00 New Revision: 6ceb32a66fb429b1e6880b723c4f0103f00e6dbd URL: https://github.com/llvm/llvm-project/commit/6ceb32a66fb429b1e6880b723c4f0103f00e6dbd DIFF: https://github.com/llvm/llvm-project/commit/6ceb32a66fb429b1e6880b723c4f0103f00e6dbd.diff LO

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-03-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I was thinking... In theory fix for this check should be one of: use const &, use value, move rvalue. But const & is not always in an option, in utils we got 2 functions: isOnlyUsedAsConst, isExpensiveToCopy. So in theory if variable can be used as const, then const & c

[PATCH] D145057: [clang][ASTImport] Add support for import of empty records

2023-03-06 Thread Pavel Kosov via Phabricator via cfe-commits
kpdev42 marked 2 inline comments as done. kpdev42 added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:8161 +EXPECT_EQ(true, FD->hasAttr()); +} + balazske wrote: > Does this test fail without the changes applied? And does it not fail aft

[PATCH] D145256: [clang/Diagnostic] Use `optional` to disambiguate between a `StoredDiagMessage` that is not set vs set as empty string

2023-03-06 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. > Is this observable from a clang command line tool? Be nice to have a lit test. Added lit test here: https://reviews.llvm.org/D145473 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145256/new/ https://reviews.llvm.org/D145

[PATCH] D145057: [clang][ASTImport] Add support for import of empty records

2023-03-06 Thread Pavel Kosov via Phabricator via cfe-commits
kpdev42 marked an inline comment as done. kpdev42 added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:3897 + if (Err) +return std::move(Err); ToField->setAccess(D->getAccess()); balazske wrote: > I am not familiar with this use case, is there

[PATCH] D145473: [test/ARCMT/verify.m] Add lit test for `5e035651fd3acbb2645abbe80cae332d90eac78a` commit

2023-03-06 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi created this revision. Herald added a project: All. akyrtzi requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D145473 Files: clang/test/ARCMT/verify.m Index: clang/t

[PATCH] D145227: [LLVM][OHOS] Clang toolchain and targets

2023-03-06 Thread Pavel Kosov via Phabricator via cfe-commits
kpdev42 marked an inline comment as done. kpdev42 added inline comments. Comment at: clang/test/Driver/ohos.c:240 + +// CHECK-OHOS-PTHREAD-NOT: -lpthread + DavidSpickett wrote: > This one is checking that we do not link to a pthread library, because when > using

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

2023-03-06 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. GCC bug hasn't got much traction, so I pinged it. But probably still the right thing to continue with this fix, I think. @rjmccall Could you give a quick glance/confirm my ABI understanding/diagnosis/direction here? Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D144935: Add missing roundtointegral builtin functions for some FP instructions to be generated from C-written codes

2023-03-06 Thread Jun Sha 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 rGa7d6593a0a17: Add missing roundtointegral builtin functions for some FP instructions to be… (authored by joshua-arch1). Herald added a project: clang

[clang] a7d6593 - Add missing roundtointegral builtin functions for some FP instructions to be generated from C-written codes

2023-03-06 Thread Jun Sha via cfe-commits
Author: Jun Sha (Joshua) Date: 2023-03-07T14:17:35+08:00 New Revision: a7d6593a0a17a1e7f46a3c9cd5c4aeeb7dfc6e0a URL: https://github.com/llvm/llvm-project/commit/a7d6593a0a17a1e7f46a3c9cd5c4aeeb7dfc6e0a DIFF: https://github.com/llvm/llvm-project/commit/a7d6593a0a17a1e7f46a3c9cd5c4aeeb7dfc6e0a.di

[PATCH] D145256: [clang/Diagnostic] Use `optional` to disambiguate between a `StoredDiagMessage` that is not set vs set as empty string

2023-03-06 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. > "But when would you have a completely empty diagnostic message", you ask dear > reader? > That is when there is an empty "#warning" in code. Is this observable from a clang command line tool? Be nice to have a lit test. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D145125: [RISCV] Make D extension imply F extension.

2023-03-06 Thread Craig Topper 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 rG90f6a4cc73d5: [RISCV] Make D extension imply F extension. (authored by craig.topper). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[clang] 90f6a4c - [RISCV] Make D extension imply F extension.

2023-03-06 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-03-06T19:59:47-08:00 New Revision: 90f6a4cc73d5c40add913e6ed5d34a7a9db58c79 URL: https://github.com/llvm/llvm-project/commit/90f6a4cc73d5c40add913e6ed5d34a7a9db58c79 DIFF: https://github.com/llvm/llvm-project/commit/90f6a4cc73d5c40add913e6ed5d34a7a9db58c79.diff

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. LGTM. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144454/new/ https://reviews.llvm.org/D144454 ___ cfe-commits mailing list cfe-com

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-06 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Please refer to D125171#4167866 to make the case that such a feature should be added. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145435/new/ https://reviews.llvm.org/D145435 _

[PATCH] D131306: [llvm][misexpect] Track provenance of branch weights

2023-03-06 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 502875. paulkirth added a comment. Remove redunant assert Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131306/new/ https://reviews.llvm.org/D131306 Files: clang/test/CodeGenCXX/attr-likelihood-if-branch-w

[PATCH] D143984: [DebugMetadata] Simplify handling subprogram's retainedNodes field. NFCI (1/7)

2023-03-06 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: llvm/include/llvm/IR/DIBuilder.h:76 -/// Each subprogram's preserved labels. -DenseMap> PreservedLabels; +SmallVectorImpl & +getSubprogramNodesTrackingVector(const DIScope *S) { Do you need a writeable

[PATCH] D131306: [llvm][misexpect] Track provenance of branch weights

2023-03-06 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 502873. paulkirth marked 4 inline comments as done. paulkirth added a comment. Rebase and address comments. - update doc comments and describe `IsExpected` parameter - add assert when scaling branch weights on calls - remove redundant check, now done in `ge

[PATCH] D145451: Disable tests which don't pass in HWASAN+LSAN mode

2023-03-06 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov created this revision. Herald added a subscriber: arphaman. Herald added a project: All. kstoimenov requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org

[PATCH] D143849: [Clang][OpenCL] Allow pointers in structs as kernel arguments from 2.0

2023-03-06 Thread Ayal Zaks via Phabricator via cfe-commits
Ayal added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:9494 + // of SVM. + if (S.getLangOpts().getOpenCLCompatibleVersion() > 120 && + (ParamType == PtrKernelParam || ParamType == PtrPtrKernelParam)) Anastasia wrote: > Ayal wrote:

[PATCH] D143849: [Clang][OpenCL] Allow pointers in structs as kernel arguments from 2.0

2023-03-06 Thread Ayal Zaks via Phabricator via cfe-commits
Ayal updated this revision to Diff 502855. Ayal added a comment. It's hard for getOpenCLKernelParameterType() to detect and diagnose invalid pointer cases w/o context (of an enclosing struct or not), but it's easy to detect valid pointer cases for v2.0+ and return ValidKernelParam. Rebased. C

[PATCH] D145449: [Fuchsia] Add LLDB options to stage 1 cmake.

2023-03-06 Thread Haowei Wu via Phabricator via cfe-commits
haowei added inline comments. Comment at: clang/cmake/caches/Fuchsia.cmake:167 +if(FUCHSIA_ENABLE_LLDB) + list(APPEND _FUCHSIA_ENABLE_PROJECTS lldb) +endif() You probably need a `string(REPLACE ";" "|" value "${_FUCHSIA_ENABLE_PROJECTS}")` after append a value.

[PATCH] D145449: [Fuchsia] Add LLDB options to stage 1 cmake.

2023-03-06 Thread Daniel Thornburgh via Phabricator via cfe-commits
mysterymath created this revision. mysterymath added reviewers: phosek, haowei. Herald added a subscriber: abrachet. Herald added a project: All. mysterymath requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. LLVM_ENABLE_PROJECTS is automatica

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. Also, I note the doc says it's useful for `for “load address” and “push address” instructions` (note, "load address" means e.g. x86 "lea" instruction) -- which should NOT be dependent upon the value stored in the memory. The x86 backend actually uses a "Ts" constraint

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. https://lore.kernel.org/lkml/alpine.LFD.2.01.0908011214330.3304@localhost.localdomain/ has historical context around the introduction of "p" in the kernel. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145416/new/

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-06 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. Hi, @sepavloff Do you have any concern about this patch? Thanks very much. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144454/new/ https://reviews.llvm.org/D144454 ___ cfe-c

[PATCH] D145093: Add map info for dereference pointer.

2023-03-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7489-7493 + if (UO && UO->getOpcode() == UO_Deref) +if (isa(Last->getAssociatedExpression()) || +isa(Last->getAssociatedExpression()) || +isa(Last->getAssociatedExpr

[PATCH] D145093: Add map info for dereference pointer.

2023-03-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 502842. jyu2 added a comment. Add additional test as Alexey asked. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145093/new/ https://reviews.llvm.org/D145093 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang

[PATCH] D144603: Disable compiler launcher on external projects and multi stage clang

2023-03-06 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 502841. haowei retitled this revision from "Add option to disable compiler launcher on external projects" to "Disable compiler launcher on external projects and multi stage clang". haowei edited the summary of this revision. Repository: rG LLVM Github Monor

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D145416#4173385 , @nickdesaulniers wrote: > In D145416#4173368 , > @nickdesaulniers wrote: > >> Looking at why the kernel ever used it, it looks like: >> https://git.kernel.or

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D145416#4173368 , @nickdesaulniers wrote: > Looking at why the kernel ever used it, it looks like: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.3-rc1&id=97b67ae559947f1e208439a1bf6a

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D145416#4173258 , @jyknight wrote: >> ‘p’ in the constraint must be accompanied by address_operand as the >> predicate in the match_operand. This predicate interprets the mode specified >> in the match_operand as the

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

2023-03-06 Thread Krzysztof Drewniak via Phabricator via cfe-commits
krzysz00 created this revision. krzysz00 added reviewers: nhaehnle, arsenm, b-sumner, piotr, sstefan1, jdoerfert. Herald added subscribers: kosarev, jeroen.dobbelaere, foad, wenlei, okura, kuter, kerbowa, arphaman, zzheng, hiraditya, arichardson, tpr, dstuttard, yaxunl, jvesely, kzhuravl, MatzeB

[PATCH] D145439: PLEASE DO NOT COMMENT ON THIS PATCH

2023-03-06 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is one of two alternative designs that Clang can adopt when writing SARIF to file. In this design, the Clang driver will bund

[PATCH] D145438: PLEASE DO NOT COMMENT ON THIS PATCH

2023-03-06 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is one of two alternative designs that Clang can adopt when writing SARIF to file. In this design, the Clang driver invokes a

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. > ‘p’ in the constraint must be accompanied by address_operand as the predicate > in the match_operand. This predicate interprets the mode specified in the > match_operand as the mode of the memory reference for which the address would > be valid. How do you do that w

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D145416#4173250 , @jyknight wrote: > It looks to me from GCC that constraint 'p' is intended to be used > internally, not for inline-asm. I question whether the kernel should be using > it, and whether we should even

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. It looks to me from GCC that constraint 'p' is intended to be used internally, not for inline-asm. I question whether the kernel should be using it, and whether we should even implement it at all. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D145430: [clang] accept inline asm 'p' constraint on outputs

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 502822. nickdesaulniers added a comment. - rebase, additional unit test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145430/new/ https://reviews.llvm.org/D145430 Files: clang/lib/Basic/TargetInfo.cp

[PATCH] D145429: add test case

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 502821. nickdesaulniers added a comment. - rebase, additional unit test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145429/new/ https://reviews.llvm.org/D145429 Files: clang/test/Sema/inline-asm-va

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 502820. nickdesaulniers added a comment. - add test additional case for Sema Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145416/new/ https://reviews.llvm.org/D145416 Files: clang/lib/Basic/TargetIn

[PATCH] D145415: add test case

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 502819. nickdesaulniers added a comment. - update commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145415/new/ https://reviews.llvm.org/D145415 Files: clang/test/CodeGen/inline-asm-p-cons

[PATCH] D145436: add test case

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers abandoned this revision. nickdesaulniers added a comment. duplicate Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145436/new/ https://reviews.llvm.org/D145436 ___ cfe-commits mailing list

[PATCH] D145436: add test case

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D145436 Files: clang/test/CodeGen/inline-

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-03-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D141569#4163607 , @ccotter wrote: > bump. I never heard back on the case where using an rvalue reference for a > big pod type as opposed to const ref. I have such use cases in project, they not necessary POD, but more like a

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-06 Thread bers via Phabricator via cfe-commits
bersbersbers created this revision. bersbersbers added a reviewer: owenpan. bersbersbers created this object with visibility "All Users". bersbersbers added a project: clang-format. Herald added a project: All. bersbersbers requested review of this revision. Herald added a project: clang. Herald ad

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers planned changes to this revision. nickdesaulniers added inline comments. Comment at: clang/test/Sema/inline-asm-validate.c:9 + // inputs. + asm (""::"p"(t), "p"(p)); } I should add a test case for `"p"(&t)`. Repository: rG LLVM Github Monor

[PATCH] D143971: [clang-tidy] Flag more buggy string constructor cases

2023-03-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.cpp:70-74 + const auto CharExpr = expr(anyOf( + ignoringParenImpCasts(characterLiteral()), + declRefExpr(hasDeclaration(varDecl(hasType(qualType(isAnyCharacter())

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Basic/TargetInfo.cpp:747-748 break; case 'g': // general register, memory operand or immediate integer. case 'X': // any operand. Info.setAllowsRegister(); nickdesaulniers wrote:

[PATCH] D145430: [clang] accept inline asm 'p' constraint on outputs

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. GCC allows this; we reject it. Link: https://reviews.llvm.org/D145416#inline-1404524 Repository: rG LLV

[PATCH] D145429: add test case

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D145429 Files: clang/test/Sema/inline-asm

[PATCH] D142174: [OpenMP] Don't set rpath for system paths

2023-03-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D142174#4171731 , @JonChesterfield wrote: > I'm happy with this but agree that "what might be a system path?" is a tricky > heuristic. What we want is to exclude the places that the application will > search anyway, but that

[PATCH] D131306: [llvm][misexpect] Track provenance of branch weights

2023-03-06 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added inline comments. Comment at: llvm/include/llvm/IR/MDBuilder.h:61 /// Return metadata containing two branch weights. + MDNode *createBranchWeights(uint32_t TrueWeight, uint32_t FalseWeight, tejohnson wrote: > Update comment to mention new par

[PATCH] D145007: Driver: introduce GNU spellings to control MSVC paths

2023-03-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. If others don't have anything to add on this matter, I guess this is fine. The new option names feel rather wordy and unwieldy (especially compared to the clang-cl forms they're aliases fo

[PATCH] D144135: [clang-tidy] Add performance-enum-size check

2023-03-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 502790. PiotrZSL added a comment. Ping, Rebase, Changed Regexp option into List Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144135/new/ https://reviews.llvm.org/D144135 Files: clang-tools-extra/clang-tidy

[PATCH] D145007: Driver: introduce GNU spellings to control MSVC paths

2023-03-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Just a friendly reminder, I'd like to get this merged to do a follow up change to improve some of the usability of these flags. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145007/new/ https://reviews.llvm.org/D145007 _

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Basic/TargetInfo.cpp:747-748 break; case 'g': // general register, memory operand or immediate integer. case 'X': // any operand. Info.setAllowsRegister(); I wonder if we should

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 502781. nickdesaulniers added a comment. - add sema test to validate 'p' inputs as per @efriedma Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145416/new/ https://reviews.llvm.org/D145416 Files: clan

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2023-03-06 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 502776. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137107/new/ https://reviews.llvm.org/D137107 Files: clang/include/clang/Basic/DiagnosticCommonKinds.td clang/lib/AST/ExprConstant.cpp clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CGE

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers planned changes to this revision. nickdesaulniers added a comment. In D145416#4172799 , @efriedma wrote: > I think this is going to change what inputs Sema will accept for "p". If > that's intentional, please add test coverage. Otherwis

[PATCH] D145391: [HIP] Supports env var HIP_PATH

2023-03-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/rocm-detect.hip:42 + +// RUN: rm -rf %T/myhip +// RUN: rm -rf %T/myhip_nouse `%T` is not recommended. https://llvm.org/docs/CommandGuide/lit.html "parent directory of %t (not unique, deprecated, do not

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2023-03-06 Thread Aaron Siddhartha Mondal via Phabricator via cfe-commits
aaronmondal added subscribers: MaskRay, phosek, compnerd, aaronmondal. aaronmondal added a comment. Herald added a subscriber: Enna1. Herald added a project: All. Hmm I tried to fiddle around with this but I'm out of my depth here. Pulling in @MaskRay @compnerd @phosek in the hopes that one of yo

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I think this is going to change what inputs Sema will accept for "p". If that's intentional, please add test coverage. Otherwise, please make a narrower change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145416/new/

[PATCH] D145344: [clang-format] Don't annotate left brace of class as FunctionLBrace

2023-03-06 Thread Owen Pan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa02c3af9f19d: [clang-format] Don't annotate left brace of class as FunctionLBrace (authored by owenpan). Repository: rG LLVM Github Monorepo CHAN

[clang] a02c3af - [clang-format] Don't annotate left brace of class as FunctionLBrace

2023-03-06 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-03-06T13:07:23-08:00 New Revision: a02c3af9f19d805411364e7a0de785c1d1c4e348 URL: https://github.com/llvm/llvm-project/commit/a02c3af9f19d805411364e7a0de785c1d1c4e348 DIFF: https://github.com/llvm/llvm-project/commit/a02c3af9f19d805411364e7a0de785c1d1c4e348.diff LOG:

[PATCH] D144136: Add a "remark" to report on array accesses

2023-03-06 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 502766. void added a comment. Slight typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144136/new/ https://reviews.llvm.org/D144136 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Ba

[PATCH] D145416: [clang] model 'p' inline asm constraint as reading memory

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. GCC doesn't CSE inline asm when 'p' is used on inputs, neither should clang. In order to do so, we must not

[PATCH] D145415: add test case

2023-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D145415 Files: clang/test/CodeGen/inline-

[PATCH] D130303: Handle template parameter-dependent bit field widths in libclang

2023-03-06 Thread Collin Baker via Phabricator via cfe-commits
collinbaker marked 3 inline comments as done. collinbaker added a comment. Thanks for the review. Someone else will need to commit since I don't have permission. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130303/new/ https://reviews.llvm.org/D1

[PATCH] D130303: Handle template parameter-dependent bit field widths in libclang

2023-03-06 Thread Collin Baker via Phabricator via cfe-commits
collinbaker updated this revision to Diff 502763. collinbaker added a comment. Add symbol to version map Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130303/new/ https://reviews.llvm.org/D130303 Files: clang/docs/ReleaseNotes.rst clang/includ

[PATCH] D130303: Handle template parameter-dependent bit field widths in libclang

2023-03-06 Thread Collin Baker via Phabricator via cfe-commits
collinbaker added inline comments. Comment at: clang/include/clang-c/Index.h:3552 + * If the cursor does not reference a bit field declaration or if the bit + * field's width does not depend on template parameters, 0 is returned. + */ vedgy wrote: > I just though

[PATCH] D130303: Handle template parameter-dependent bit field widths in libclang

2023-03-06 Thread Collin Baker via Phabricator via cfe-commits
collinbaker updated this revision to Diff 502762. collinbaker added a comment. Add release notes and remove unneeded include Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130303/new/ https://reviews.llvm.org/D130303 Files: clang/docs/ReleaseNote

[PATCH] D144136: Add a "remark" to report on array accesses

2023-03-06 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 502760. void added a comment. Revise with Kees's code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144136/new/ https://reviews.llvm.org/D144136 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/inc

[PATCH] D130303: Handle template parameter-dependent bit field widths in libclang

2023-03-06 Thread Collin Baker via Phabricator via cfe-commits
collinbaker updated this revision to Diff 502758. collinbaker added a comment. Sync with upstream changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130303/new/ https://reviews.llvm.org/D130303 Files: clang/include/clang-c/Index.h clang/too

[PATCH] D145344: [clang-format] Don't annotate left brace of class as FunctionLBrace

2023-03-06 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. In D145344#4171087 , @MyDeveloperDay wrote: > Thanks for this, LGTM (maybe we can cherry pick this to 16.0) +1 because of the invalid code. Repository: rG LLVM Github Mon

[PATCH] D145262: [clang-format] Treat AttributeMacros more like attribute macros

2023-03-06 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/unittests/Format/FormatTestObjC.cpp:1528 + // This is added to acknowledge the behavior, but it should be improved. + verifyFormat("ATTRIBUTE_MACRO ATTRIBUTE_MACRO(X)\n" + "@interface Foo\n" -

[PATCH] D145251: [clang] Treat function parameter scope as an immediate function context

2023-03-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. Thanks, LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145251/new/ https://reviews.llvm.org/D145251 ___ cfe-commits mailing list cfe-commits

[PATCH] D145251: [clang] Treat function parameter scope as an immediate function context

2023-03-06 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 502754. Fznamznon added a comment. Rebase and add quoting [expr.const] p15.1 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145251/new/ https://reviews.llvm.org/D145251 Files: clang/lib/Sema/SemaExpr.cpp

[PATCH] D144036: [clang-tidy] Add bugprone-enum-to-bool-conversion check

2023-03-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 502752. PiotrZSL added a comment. Ping, Rebase, Changed Option from Regexp to List, Improved documentation, Removed usage of deprecated API Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144036/new/ https://re

[PATCH] D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute

2023-03-06 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added inline comments. Comment at: clang/test/Driver/flang/flang-omp.f90:1 +! Check that flang -fc1 is invoked when in --driver-mode=flang +! and the relevant openmp and openmp offload flags are utilised awarzynski wrote: > agozillon wrote: > > awarzyn

[PATCH] D145343: [AMDGPU] Emit predefined macro `__AMDGCN_CUMODE_OPTION`

2023-03-06 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm requested changes to this revision. arsenm added a comment. This revision now requires changes to proceed. We can’t let specific flag usage leak into the semantics. Cu mode is on or off. If someone really cares about supporting older compilers they could always define their own macro CH

[PATCH] D145343: [AMDGPU] Emit predefined macro `__AMDGCN_CUMODE_OPTION`

2023-03-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Can `__has_feature` be used to accomplish what you need? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145343/new/ https://reviews.llvm.org/D145343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D144878: __builtin_FILE_NAME()

2023-03-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D144878#4171234 , @karapsinie wrote: > PTAL. Have you seen the comments on the GCC issue that @MaskRay filed? Is that something we should do as well? (It doesn't have to be part of this patch, but it'd be good to ensu

[PATCH] D145271: [MSVC compatibility][DLLEXPORT/DLLIMPORT] Allow dllexport/dllimport for local classes

2023-03-06 Thread Wolfgang Pieb via Phabricator via cfe-commits
wolfgangp added a comment. In D145271#4171267 , @hans wrote: > Interesting! Do you have an example where this (local dllexport/import > classes) comes up in practice? A customer complained about the following code (I'm obscuring the class names) compil

[PATCH] D145391: [HIP] Supports env var HIP_PATH

2023-03-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:442 + llvm::sys::Process::GetEnv("HIP_PATH")) { +if (!HIPPathEnv->empty()) { + HIPSearchDirs.emplace_back(std::move(*HIPPathEnv)); Style nit. Single-statement if

[clang] 3e00f24 - [NFC][Clang] add test comments for GitHub issue 58896

2023-03-06 Thread Yuanfang Chen via cfe-commits
Author: Yuanfang Chen Date: 2023-03-06T11:55:39-08:00 New Revision: 3e00f24f6356cb351b969bc7414546c2d220e059 URL: https://github.com/llvm/llvm-project/commit/3e00f24f6356cb351b969bc7414546c2d220e059 DIFF: https://github.com/llvm/llvm-project/commit/3e00f24f6356cb351b969bc7414546c2d220e059.diff

[PATCH] D145201: [clang] fixes header processing for `-fdiagnostics-format=sarif`

2023-03-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Basic/Sarif.cpp:314-317 + llvm::sort(*Artifacts, [](const json::Value &x, const json::Value &y) { +return x.getAsObject()->getNumber("index") < + y.getAsObject()->getNumber("index"); + });

[PATCH] D143418: [libclang] Add API to override preamble storage path

2023-03-06 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. Thank you, this LGTM! I have to head out shortly, so I'll land this on your behalf tomorrow when I have the time to babysit the postcommit build farm. However, if you'd like to r

[PATCH] D145251: [clang] Treat function parameter scope as an immediate function context

2023-03-06 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. This LGTM, I agree w/ @cor3ntin about quoting [expr.cont] to document this choice. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145251/new/ ht

[PATCH] D145411: [WIP][Fuchsia] Include baremetal ARM builtins

2023-03-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. Herald added subscribers: abrachet, kristof.beyls. Herald added a project: All. phosek requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D145411 Fi

[PATCH] D145362: [clang] Update test according to P1937

2023-03-06 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/CXX/expr/expr.const/p8-2a.cpp:14 -// bad_assert_copyable is not needed for constant evaluation -// (and thus not instantiated) +// consteval assert is not instantiated as well. template consteval void assert_copyable() {

[PATCH] D145362: [clang] Update test according to P1937

2023-03-06 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 502742. Fznamznon added a comment. Rebase and apply the nitpick Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145362/new/ https://reviews.llvm.org/D145362 Files: clang/test/CXX/expr/expr.const/p8-2a.cpp

[PATCH] D145408: Fix false positive with unreachable C++ catch handlers

2023-03-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 2 inline comments as done. aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:186 + `#61177 `_ in anticipation + of `CWG2699 _` being accepted by WG21.

[PATCH] D144912: [clang-tidy] readability-identifier-naming: fix hungarian enum prefix in C

2023-03-06 Thread Alexis Murzeau via Phabricator via cfe-commits
amurzeau added a comment. Hi, thanks PiotrZSL, the build is now passed and is green. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144912/new/ https://reviews.llvm.org/D144912 ___ cfe-commits mailing lis

[PATCH] D130303: Handle template parameter-dependent bit field widths in libclang

2023-03-06 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. In D130303#3724392 , @dexonsmith wrote: > In D130303#3724247 , @rnk wrote: > >> Pinging alternative

[PATCH] D145408: Fix false positive with unreachable C++ catch handlers

2023-03-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/docs/ReleaseNotes.rst:186 + `#61177 `_ in anticipation + of `CWG2699 _` being accepted by WG21. This link seems broken? I get 40

  1   2   >