[PATCH] D135750: [clang][Interp] Track initialization state of local variables

2022-12-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/InterpBlock.h:97 void invokeCtor() { -std::memset(data(), 0, getSize()); +std::memset(rawData(), 0, Desc->getAllocSize()); if (Desc->CtorFn) aaron.ballman wrote: > tbaeder wrote: > >

[PATCH] D137995: [Flang][Driver] Handle target CPU and features

2022-12-02 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. LGTM, thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137995/new/ https://reviews.llvm.org/D137995 ___ cfe-commits mailin

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-02 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. In D139170#3965814 , @mgehre-amd wrote: > Do other targets not support > 128 bit integers, or is this PR only the first > conservative step of lifting the limit? I temporary only enabled > 128 bit FP conversion for X86 in htt

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-02 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd added a comment. In D139170#3965850 , @FreddyYe wrote: > In D139170#3965814 , @mgehre-amd > wrote: > >> Do other targets not support > 128 bit integers, or is this PR only the >> first conservative st

[PATCH] D139173: [clang] Add test for CWG600

2022-12-02 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill created this revision. Endill added a reviewer: clang-language-wg. Herald added a project: All. Endill requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. P1787 : //CWG600 is resolved by explaining that a

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-02 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. In D139170#3965852 , @mgehre-amd wrote: > In D139170#3965850 , @FreddyYe > wrote: > >> In D139170#3965814 , @mgehre-amd >> wrote: >> >>> Do ot

[PATCH] D139148: Fix nullptr dereference found by Coverity static analysis tool

2022-12-02 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir updated this revision to Diff 479541. schittir added a comment. Add more nullptr checks per Shafik's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139148/new/ https://reviews.llvm.org/D139148 Files: clang/lib/Sema/SemaInit.cpp Index: clang/lib/Sema/SemaInit.cpp ==

[clang] 498abe2 - [clang][docs] Correct floating point option explanations

2022-12-02 Thread KAWASHIMA Takahiro via cfe-commits
Author: KAWASHIMA Takahiro Date: 2022-12-02T17:50:13+09:00 New Revision: 498abe27dcf89ba7eb865ea6c46b217a7b68f082 URL: https://github.com/llvm/llvm-project/commit/498abe27dcf89ba7eb865ea6c46b217a7b68f082 DIFF: https://github.com/llvm/llvm-project/commit/498abe27dcf89ba7eb865ea6c46b217a7b68f082.

[PATCH] D138117: [clang][docs] Correct floating point option explanations

2022-12-02 Thread KAWASHIMA Takahiro via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG498abe27dcf8: [clang][docs] Correct floating point option explanations (authored by kawashima-fj). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138117/new/

[clang] eba4efc - [clang] Remove unused bookmark in CWG360 test (NFC)

2022-12-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2022-12-02T11:52:19+03:00 New Revision: eba4efcb056ccea1804a5c578b0ddc736100ebcc URL: https://github.com/llvm/llvm-project/commit/eba4efcb056ccea1804a5c578b0ddc736100ebcc DIFF: https://github.com/llvm/llvm-project/commit/eba4efcb056ccea1804a5c578b0ddc736100ebcc.

[PATCH] D139167: [clang][Windows]Ignore Options '/d1nodatetime' and '/d1import_no_registry'

2022-12-02 Thread Tobias Hieta via Phabricator via cfe-commits
thieta added a comment. I tried to look up what these options do exactly - but they don't seem to be documented. `/d1nodatetime` seems like an option that should be implemented instead of just ignored since it can have real reproducible problems not being there. Do you know what `/d1import_no_

[PATCH] D139177: [LoongArch] Specify registers used for exception handling

2022-12-02 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: xen0n, xry111, MaskRay, wangleiat. Herald added a subscriber: StephenFan. Herald added a project: All. SixWeining requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. See definition i

[PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-12-02 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Then Sarif was a distraction. Still to reduce boilerplate and for A/B testing: enum class DiagnosticMode { Legacy, UserOriented, Default = Legacy } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138939/new/

[PATCH] D128677: [clangd] Add support for generating #import edits

2022-12-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. we should have tests in `clang/unittests/Tooling/HeaderIncludesTest.cpp` and the commit itself should be tagged as `[clang][Tooling]` rather than `[clangd]`. Comment at: clang-tools-extra/clangd/Headers.h:250 + llvm::Optional insert(llvm::StringRef V

[PATCH] D139177: [LoongArch] Specify registers used for exception handling

2022-12-02 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. Trivial enough (`$a0` and `$a1` respectively, same as RISCV and Mips). Thanks for the quick fixing! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D139087: [include-cleaner] Handle base class member access from derived class.

2022-12-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/WalkAST.cpp:62 bool VisitMemberExpr(MemberExpr *E) { -report(E->getMemberLoc(), E->getFoundDecl().getDecl()); +// Instead of the FieldDecl for MemberExpr, we report the Decl of +// th

[PATCH] D139177: [LoongArch] Specify registers used for exception handling

2022-12-02 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 479553. SixWeining added a comment. Add clang test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139177/new/ https://reviews.llvm.org/D139177 Files: clang/lib/Basic/Targets/LoongArch.h clang/test/CodeG

[PATCH] D139167: [clang][Windows]Ignore Options '/d1nodatetime' and '/d1import_no_registry'

2022-12-02 Thread Qfrost via Phabricator via cfe-commits
Qfrost911 added a comment. Yes, these options are not documented, so I think they can be ignored. If they are important options for windows driver, why MSVC didn't document them. And, the windows driver run perfectly even if I ignore these two options. Moreover, there are lots of options which

[PATCH] D139087: [include-cleaner] Handle base class member access from derived class.

2022-12-02 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 479556. VitaNuo added a comment. Add more comments. Add unimplemented VisitCXXDependentScopeMemberExpr method with a FIXME comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139087/new/ https://reviews.llv

[PATCH] D139087: [include-cleaner] Handle base class member access from derived class.

2022-12-02 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo marked an inline comment as done. VitaNuo added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/WalkAST.cpp:65 +Expr *BE = E->getBase()->IgnoreImpCasts(); +RecordDecl *RD = BE->getType()->getAsRecordDecl(); +report(E->getMemberLoc(), RD); --

[PATCH] D139178: [libclang] Have clang_getCursorSpelling() return the string for a CXCursor_IntegerLiteral cursor

2022-12-02 Thread William Hsu via Phabricator via cfe-commits
GrislyMe created this revision. GrislyMe added reviewers: abdulras, gribozavr. GrislyMe added a project: clang. Herald added a subscriber: arphaman. Herald added a project: All. GrislyMe requested review of this revision. Herald added a subscriber: cfe-commits. Return the IntegerLiteral cursor val

[PATCH] D139182: AArch64: add CodeGen support for FEAT_XS DSB instructions

2022-12-02 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover created this revision. Herald added subscribers: hiraditya, kristof.beyls, mcrosier. Herald added a project: All. t.p.northover requested review of this revision. Herald added projects: clang, LLVM. The new variants like `dsb ishnxs` map naturally to CRm == {16, 20, 24, 28}, extendi

[PATCH] D139177: [LoongArch] Specify registers used for exception handling

2022-12-02 Thread wanglei via Phabricator via cfe-commits
wangleiat accepted this revision. wangleiat added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139177/new/ https://reviews.llvm.org/D139177 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D139185: [clang][Interp] Use placement new to construct opcode args into vector

2022-12-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: sepavloff, aaron.ballman. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The last version of this patch created problems because it was using the

[PATCH] D139013: [include-cleaner] clang-include-cleaner can print/apply edits

2022-12-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 479574. sammccall marked an inline comment as done. sammccall added a comment. Herald added a project: clang. replace fixIncludes impl with clang-format, tweak tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D139013: [include-cleaner] clang-include-cleaner can print/apply edits

2022-12-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/include-cleaner/include/clang-include-cleaner/Analysis.h:65 +llvm::ArrayRef MacroRefs, +const Includes &, const PragmaIncludes *PI, +const Sourc

[PATCH] D139013: [include-cleaner] clang-include-cleaner can print/apply edits

2022-12-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 479575. sammccall added a comment. delete dead code, add comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139013/new/ https://reviews.llvm.org/D139013 Files: clang-tools-extra/include-cleaner/include/

[PATCH] D136078: Use-after-return sanitizer binary metadata

2022-12-02 Thread Marco Elver via Phabricator via cfe-commits
melver added a comment. >> Do you have any other ideas on how to dead with this? > > It's strange we've not encountered this elsewhere - this must be some special > (old?) linker. I'll investigate... GNU ld <= 2.35 does not support mixed SHF_LINK_ORDER and non-SHF_LINK_ORDER sections. This i

[PATCH] D139125: [clang] Correctly handle by-reference capture with an initializer that is a pack expansion in lambdas.

2022-12-02 Thread Jens Massberg via Phabricator via cfe-commits
massberg updated this revision to Diff 479579. massberg added a comment. Add a diagnostics test for pack expansions to check if args are passed by reference and not by value. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139125/new/ https://review

[PATCH] D139013: [include-cleaner] clang-include-cleaner can print/apply edits

2022-12-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. thanks! Comment at: clang-tools-extra/include-cleaner/lib/Analysis.cpp:77 + bool Satisfied = false; + for (const Header &H : Providers) { + if (H.kind() == Header::Physical && H.phy

[PATCH] D139125: [clang] Correctly handle by-reference capture with an initializer that is a pack expansion in lambdas.

2022-12-02 Thread Jens Massberg via Phabricator via cfe-commits
massberg updated this revision to Diff 479581. massberg added a comment. Remove unnecessary code from test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139125/new/ https://reviews.llvm.org/D139125 Files: clang/lib/Sema/TreeTransform.h clang/

[PATCH] D135750: [clang][Interp] Track initialization state of local variables

2022-12-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 479582. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135750/new/ https://reviews.llvm.org/D135750 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeStmtGen.cpp clang/lib/AST/

[PATCH] D139188: [Draft] Sanitize clang target triple

2022-12-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: aaron.ballman. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Warn when meeting an unknown vendor / os / environmen

[PATCH] D139188: [Draft] Sanitize clang target triple

2022-12-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. This is a tentative patch for https://discourse.llvm.org/t/linking-without-gcc-on-gnu-linux/66428/3 unfortunately it appears that many triples are not recognized while widely used (at least in the CI) for instance `aarch64-arm-none-eabi` is used a lot in the

[PATCH] D135750: [clang][Interp] Track initialization state of local variables

2022-12-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Descriptor.h:73 + /// Flag indicating if the field is mutable (if in a record). + unsigned IsMutable : 1; + shafik wrote: > Maybe `IsFieldMutable` b/c we call `CreateDescriptor` it is a little > c

[PATCH] D138655: [clang-tidy] Fix `cppcoreguidelines-init-variables` for invalid vardecl

2022-12-02 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Friendly ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138655/new/ https://reviews.llvm.org/D138655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D139167: [clang][Windows]Ignore Options '/d1nodatetime' and '/d1import_no_registry'

2022-12-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. I hadn't seen `/d1` flags before. I suppose they relate to preprocessor stuff as opposed to `/d2` flags. I think the "Unsupported" section below may be better for these. In that case clang-cl will parse the option and warn that it's ignoring it. On line 6931 there's a cat

[PATCH] D124351: [Clang][WIP] Implement Change scope of lambda trailing-return-type - Take 2

2022-12-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @erichkeane Let me know if you have any insights on that constraint checking issue. I might add a way to get from the CXXRecordDecl to the LambdaExpr and add the captures to the instantiation scope during constraint checking that way, but I'd love your opinion before g

[PATCH] D139013: [include-cleaner] clang-include-cleaner can print/apply edits

2022-12-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/Analysis.cpp:77 + bool Satisfied = false; + for (const Header &H : Providers) { + if (H.kind() == Header::Physical && H.physical() == MainFile) ---

[clang-tools-extra] 1a8dd74 - [include-cleaner] clang-include-cleaner can print/apply edits

2022-12-02 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-12-02T13:16:58+01:00 New Revision: 1a8dd7425873fae55a38cbdb41cccb1f17c82e8c URL: https://github.com/llvm/llvm-project/commit/1a8dd7425873fae55a38cbdb41cccb1f17c82e8c DIFF: https://github.com/llvm/llvm-project/commit/1a8dd7425873fae55a38cbdb41cccb1f17c82e8c.diff LO

[PATCH] D139013: [include-cleaner] clang-include-cleaner can print/apply edits

2022-12-02 Thread Sam McCall 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 rG1a8dd7425873: [include-cleaner] clang-include-cleaner can print/apply edits (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D139172: [clang] Mark CWG554 as N/A

2022-12-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. This revision is now accepted and ready to land. LGTM. There are many editorial issues that ended up as defect reports, you could probably batch many of them in subsequent PR Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D139167: [clang][Windows]Ignore Options '/d1nodatetime' and '/d1import_no_registry'

2022-12-02 Thread Qfrost via Phabricator via cfe-commits
Qfrost911 updated this revision to Diff 479594. Qfrost911 added a comment. Ok, I updated this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139167/new/ https://reviews.llvm.org/D139167 Files: clang/include/clang/Driver/Options.td clang/

[PATCH] D139095: [clang] Mark CWG405 as a duplicate of CWG218

2022-12-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D139095#3964181 , @Endill wrote: > So I'd like to raise a couple of questions: > > 1. What test for 405 is going to be if not a copy-and-paste of a part of 218 > test? I think this is perfectly fine to have a duplicated test

[PATCH] D139172: [clang] Mark CWG554 as N/A

2022-12-02 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill added a comment. > There are many editorial issues that ended up as defect reports, you could > probably batch many of them in subsequent PR Thank you for suggestion. I'm being on a safer side at the moment, because CWG405 raised more questions than I anticipated. I'll also wait until to

[PATCH] D139182: AArch64: add CodeGen support for FEAT_XS DSB instructions

2022-12-02 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. The def file is going away: https://reviews.llvm.org/D139102 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139182/new/ https://reviews.llvm.org/D139182 ___ cfe-commits mailing l

[PATCH] D139125: [clang] Correctly handle by-reference capture with an initializer that is a pack expansion in lambdas.

2022-12-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:13156 getSema().buildLambdaInitCaptureInitialization( - C->getLocation(), OldVD->getType()->isReferenceType(), + C->getLocation(), isReferenceType,

[PATCH] D139167: [clang][Windows]Ignore Options '/d1nodatetime' and '/d1import_no_registry'

2022-12-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. Looks great, thanks! Do you have commit access, or would you like someone to commit this for you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1391

[PATCH] D136694: [clang][Interp] Check that constructor calls initialize all record fields

2022-12-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Oh I think this patch is doing too much. The checking should only occur for global variables. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136694/new/ https://reviews.llvm.org/D136694 ___ cfe-commits mailing list cf

[PATCH] D139095: [clang] Mark CWG405 as a duplicate of CWG218

2022-12-02 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill added a comment. > I think this is perfectly fine to have a duplicated test case, I agree with > Aaron, we should not invent duplicated status ourselves. > Adding a comment in the test like "Note: this test is identical to the one > for CWG405" would be a good idea Does it mean that dupl

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2022-12-02 Thread Ben Boeckel via Phabricator via cfe-commits
ben.boeckel added inline comments. Comment at: clang/test/ClangScanDeps/P1689.cppm:155 +// CHECK-MAKE: [[PREFIX]]/impl_part.o: +// CHECK-MAKE: [[PREFIX]]/impl_part.cppm For scanning, this cannot be the object file. The output needs to be the P1689 output (or

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for working on this! LGTM, but please add a release note when landing so that users know about this improvement! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139170/new/ https://reviews.llvm.org/D139170

[PATCH] D139195: [-Wmissing-noreturn] Detect non-void noreturn function candidates

2022-12-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: NoQ, xazax.hun, aaron.ballman. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: Szelethus. Herald added a project: All. steakhal requested review of this revision. Herald added a project: clang. Herald added a subscriber

[PATCH] D135658: demangle OptFunction trace names

2022-12-02 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. Is the mode change on check-time-trace-sections.py intended? I did a count of python files under llvm-project and < 10% are 755. I'm not saying it is better one way or the other; I'm just ensuring it is intentional. Repository: rG LLVM Github Monorepo CHANG

[clang] 26424c9 - Attributes: convert Optional to std::optional

2022-12-02 Thread Krzysztof Parzyszek via cfe-commits
Author: Krzysztof Parzyszek Date: 2022-12-02T08:15:45-06:00 New Revision: 26424c96c03ee4098d7f129de9234a6f177e49ac URL: https://github.com/llvm/llvm-project/commit/26424c96c03ee4098d7f129de9234a6f177e49ac DIFF: https://github.com/llvm/llvm-project/commit/26424c96c03ee4098d7f129de9234a6f177e49ac

[PATCH] D139197: Do not warn about redundant static in misc-use-anonymous-namespace

2022-12-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. Herald added a reviewer: njames93. Herald added a project: All. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. I will create a new check "readability-redundant-static" where th

[PATCH] D139197: Do not warn about redundant static in misc-use-anonymous-namespace

2022-12-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 479616. carlosgalvezp added a comment. Reorder matchers to reduce diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139197/new/ https://reviews.llvm.org/D139197 Files: clang-tools-extra/clang-tidy/mi

[PATCH] D139167: [clang][Windows]Ignore Options '/d1nodatetime' and '/d1import_no_registry'

2022-12-02 Thread Tobias Hieta via Phabricator via cfe-commits
thieta added a comment. Makes sense they are not documented and we probably can ignore them in that case! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139167/new/ https://reviews.llvm.org/D139167 ___ c

[PATCH] D139197: Do not warn about redundant static in misc-use-anonymous-namespace

2022-12-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. This patch should not land before that one does. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139197/new/ https://reviews.llvm.org/D139197 ___ cfe-commits mailing list cfe-co

[PATCH] D139095: [clang] Mark CWG405 as a duplicate of CWG218

2022-12-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D139095#3964181 , @Endill wrote: >> I don't think we should mark it as a dup -- we want the status in our tests >> to match the status on the official document, otherwise things get confusing. > > We can do it the follow

[PATCH] D139172: [clang] Mark CWG554 as N/A

2022-12-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139172/new/ https://reviews.llvm.org/D139172 ___ cfe-commits mailing list cfe-comm

[PATCH] D139197: Do not warn about redundant static in misc-use-anonymous-namespace

2022-12-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D139197#3966549 , @lebedev.ri wrote: > This patch should not land before that one does. The original code is 1 day old. Do we really need to be so strict? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D139197: Do not warn about redundant static in misc-use-anonymous-namespace

2022-12-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. My plan was to apply this removal in the same patch where I add the new check, but I know I'd get comments like "please do the removal in a separate patch". So that's what I'm doing :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D135750: [clang][Interp] Track initialization state of local variables

2022-12-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Descriptor.h:141-145 unsigned getAllocSize() const { return AllocSize; } /// returns the size of an element when the structure is viewed as an array. unsigned getElemSize() const { return ElemSize; }

[PATCH] D139197: Do not warn about redundant static in misc-use-anonymous-namespace

2022-12-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I was commenting because we already have a similar diagnostic in clang-tidy 15: namespace { static void foo(); static void bar(){} void foo() {} static int x; } $ clang-tidy-15 -checks=\*,-llvmlibc-* /tmp/test.cpp Error while trying to load a

[PATCH] D135658: demangle OptFunction trace names

2022-12-02 Thread Trass3r via Phabricator via cfe-commits
Trass3r added a comment. Yeah it was conscious at least. No strong opinion on that though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135658/new/ https://reviews.llvm.org/D135658 ___ cfe-commits maili

[PATCH] D137603: [Clang][Sema] Fix attribute((format)) bug on non-variadic functions

2022-12-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, thank you! Comment at: clang/docs/ReleaseNotes.rst:319 `Issue 59100 `_ +- Fix issue using __attribute__((format)) on non-variadic functions that expe

[PATCH] D139114: [Clang][Sema] Enabled Wshorten-64-to-32 for CompoundAssignment operator.

2022-12-02 Thread Fahad Nayyar via Phabricator via cfe-commits
fahadnayyar updated this revision to Diff 479626. fahadnayyar retitled this revision from "[Clang][Sema] Enabled Wshorten-64-to-32 for CompoundAssignment operator. " to "[Clang][Sema] Enabled Wshorten-64-to-32 for CompoundAssignment operator.". fahadnayyar added a comment. Fixing clang-format er

[PATCH] D139087: [include-cleaner] Handle base class member access from derived class.

2022-12-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/WalkAST.cpp:68 +RecordDecl *RD = getDeclFromType(Type); +report(E->getMemberLoc(), RD); return true; nit: just `report(E->getMemberLoc(), getDeclFromTye(Type));`. =

[PATCH] D139095: [clang] Mark CWG405 as a duplicate of CWG218

2022-12-02 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill added a comment. >> We can do it the following way then: // dr405: yes \n // NB: also dup 218. > > That would be fine by me! Which way should we handle this? I'd prefer to do it without test duplication, but making it clear for readers is a serious concern indeed. (Read on, I elaborate o

[PATCH] D127284: [clang-repl] Support statements on global scope in incremental mode.

2022-12-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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127284/new/ https://reviews.llvm.org/D127284 ___ cfe-commits mailing lis

[PATCH] D138597: DebugInfo: Add/support new DW_LANG codes for recent C and C++ versions

2022-12-02 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. One not-yet-asked question, does gcc produce the C++17/20 codes? If so, does fstrict-dwarf affect that? The major consumers of this would be lldb (which we control) and gdb, so following gcc's lead here would seem appropriate. I can accept that listing the codes on

[PATCH] D135658: demangle OptFunction trace names

2022-12-02 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser accepted this revision. jamieschmeiser 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/D135658/new/ https://reviews.llvm.org/D135658 ___

[PATCH] D139197: Do not warn about redundant static in misc-use-anonymous-namespace

2022-12-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Ah, then it has the exact same functionality! My idea for readability-redundant-static was to warn about: - static in anonymous namespace - static const/constexpr at global scope (since const gives implicit internal linkage in C++). I will see what I can do about

[PATCH] D139195: [-Wmissing-noreturn] Detect non-void noreturn function candidates

2022-12-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > Previously, only void returning functions were considered for noreturn > attribute candidates. This patch removes this artificial restriction. C2x 6.7.12.6p6: The implementation should produce a diagnostic message for a function declared with a noreturn attribut

[PATCH] D139202: Link with missing libs to fix broken shared build

2022-12-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. Herald added a subscriber: kadircet. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Signed-off-by: Jun Zhang Repository: rG LLVM Github Monorepo https://

[PATCH] D136815: [clang][Interp] Unify visiting variable declarations

2022-12-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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136815/new/ https://reviews.llvm.org/D136815 ___ cfe-commits mailing lis

[PATCH] D139202: Link with missing libs to fix broken shared build

2022-12-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. This is caused by https://reviews.llvm.org/D139013 I should mention. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139202/new/ https://reviews.llvm.org/D139202 ___ cfe-commits ma

[PATCH] D138651: [CUDA][HIP] Don't diagnose use for __bf16

2022-12-02 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh planned changes to this revision. Pierre-vh marked an inline comment as done. Pierre-vh added a comment. I'll take a look at handling bf16 storage-only for AMDGPU. Looks like our Backend already handles it and converts it to i16 so maybe it'll be really easy. Repository: rG LLVM Git

[PATCH] D139202: Link with missing libs to fix broken shared build

2022-12-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks, and sorry for the breakage! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139202/new/ https://reviews.llvm.org/D139202 __

[PATCH] D139195: [-Wmissing-noreturn] Detect non-void noreturn function candidates

2022-12-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal planned changes to this revision. steakhal added a comment. In D139195#3966675 , @aaron.ballman wrote: >> Previously, only void returning functions were considered for noreturn >> attribute candidates. This patch removes this artificial restric

[PATCH] D139166: [OPENMP51] Codegen support for error directive.

2022-12-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.h:334 llvm::Value *emitUpdateLocation(CodeGenFunction &CGF, SourceLocation Loc, - unsigned Flags = 0); + unsigned Flags = 0, bool EmitLoc

[PATCH] D139202: Link with missing libs to fix broken shared build

2022-12-02 Thread Jun Zhang 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 rG8431436e543f: Link with missing libs to fix broken shared build (authored by junaire). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[clang-tools-extra] 8431436 - Link with missing libs to fix broken shared build

2022-12-02 Thread Jun Zhang via cfe-commits
Author: Jun Zhang Date: 2022-12-03T00:01:37+08:00 New Revision: 8431436e543f78a33e8165257f2e2f89c38269f9 URL: https://github.com/llvm/llvm-project/commit/8431436e543f78a33e8165257f2e2f89c38269f9 DIFF: https://github.com/llvm/llvm-project/commit/8431436e543f78a33e8165257f2e2f89c38269f9.diff LOG

[PATCH] D139148: Fix nullptr dereference found by Coverity static analysis tool

2022-12-02 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann requested changes to this revision. tahonermann added a comment. This revision now requires changes to proceed. Per added comments, I think we should look for a guarantee that `Initializer` is non-null earlier in the function. If there is, then we could remove a bunch of the current

[PATCH] D139172: [clang] Mark CWG554 as N/A

2022-12-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. @aaron.ballman do you think it is worth it to provide a link to `p1787` as well? I know you can just goto the issue and see that but it feels helpful. I actually missed this at first b/c I usually goto end of the issue to look for the resolution and was confused. Repos

[PATCH] D139197: [clang-tidy] Do not warn about redundant static in misc-use-anonymous-namespace

2022-12-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 479651. carlosgalvezp edited the summary of this revision. carlosgalvezp added a comment. Update commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139197/new/ https://reviews.llvm.org/D139197

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

2022-12-02 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 479652. zahiraam marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137107/new/ https://reviews.llvm.org/D137107 Files: clang/lib/AST/ExprConstant.cpp clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CGExprConstan

[PATCH] D139173: [clang] Add test for CWG600

2022-12-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/drs/dr6xx.cpp:18 + sp->f(2); + sp->f(2.2); // expected-error {{is a private member}} +} Maybe add a comment above this saying something like: ``` // access control is applied after overload resolution //

[PATCH] D139173: [clang] Add test for CWG600

2022-12-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Thank you for updating the DR statuses! This is much appreciated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139173/new/ https://reviews.llvm.org/D139173 ___ cfe-commits mailin

[PATCH] D139173: [clang] Add test for CWG600

2022-12-02 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill added inline comments. Comment at: clang/test/CXX/drs/dr6xx.cpp:18 + sp->f(2); + sp->f(2.2); // expected-error {{is a private member}} +} shafik wrote: > Maybe add a comment above this saying something like: > > ``` > // access control is applied after

[clang-tools-extra] 4fd0c14 - Link with missing libs to fix broken shared unittest build

2022-12-02 Thread Jun Zhang via cfe-commits
Author: Jun Zhang Date: 2022-12-03T01:10:13+08:00 New Revision: 4fd0c14a17f91fb7b0d188b509eb3dbdfbfec01a URL: https://github.com/llvm/llvm-project/commit/4fd0c14a17f91fb7b0d188b509eb3dbdfbfec01a DIFF: https://github.com/llvm/llvm-project/commit/4fd0c14a17f91fb7b0d188b509eb3dbdfbfec01a.diff LOG

[PATCH] D139197: [clang-tidy] Do not warn about redundant static in misc-use-anonymous-namespace

2022-12-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 479656. carlosgalvezp added a comment. Simplify anonymous namespace matcher. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139197/new/ https://reviews.llvm.org/D139197 Files: clang-tools-extra/clang-ti

[PATCH] D138511: [CodeGen][AArch64] Fix AArch64ABIInfo::EmitAAPCSVAArg crash with empty record type in variadic arg

2022-12-02 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. pin~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138511/new/ https://reviews.llvm.org/D138511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D138792: [AArch64] Improve TargetParser API

2022-12-02 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Hi, I bisected this change to lead to a couple of test failures when building with `LLVM_LINK_LLVM_DYLIB`. In the past, this had to do with global variable initialization order, but nothing immediately jumps to my eye in this patch. Is `AARCH64_ARCH` used to define glo

[PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-12-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D138939#3965985 , @tschuett wrote: > Then Sarif was a distraction. Still to reduce boilerplate and for A/B testing: > > enum class DiagnosticMode { > Legacy, > UserOriented, > Default = Legacy > } It took a fair b

[PATCH] D139197: [clang-tidy] Do not warn about redundant static in misc-use-anonymous-namespace

2022-12-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. > This shouldn't be a blocker for this patch though, it's just removing > functionality that belongs in another check. As said, the check is 1 day old > so it's unlikely anyone is relying on it yet :) SGTM in general. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D128677: [clangd] Add support for generating #import edits

2022-12-02 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 479659. dgoldman marked 4 inline comments as done. dgoldman added a comment. Fixes for review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128677/new/ https://reviews.llvm.org/D128677 Files: clang-tools-ex

[PATCH] D135658: demangle OptFunction trace names

2022-12-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri requested changes to this revision. lebedev.ri added a comment. This revision now requires changes to proceed. Old pass manager is dead. There is no point in making improvements to it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135658/

[PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-12-02 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Maybe the kind/amount of information printed ( `DiagnosticMode` ) and the output device (console/sarif) are orthogonal issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138939/new/ https://reviews.llvm.org/D138939 __

  1   2   >