[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread H. Vetinari via Phabricator via cfe-commits
h-vetinari added inline comments. Comment at: clang/www/cxx_status.html:1485-1486 +Clang 17 (Partial) + We do not support outside of defaulted special memeber functions the change that constexpr functions no + longer have to be constexpr compatible but

[clang] e955e4f - [clang] Replace None with std::nullopt in comments (NFC)

2023-05-04 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-05-04T22:42:52-07:00 New Revision: e955e4fba60e6d93b66903687c1dd7a34435d33c URL: https://github.com/llvm/llvm-project/commit/e955e4fba60e6d93b66903687c1dd7a34435d33c DIFF: https://github.com/llvm/llvm-project/commit/e955e4fba60e6d93b66903687c1dd7a34435d33c.diff

[PATCH] D149920: ms inline asm: recognize case-insensitive JMP and CALL as TargetLowering::C_Address

2023-05-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 519744. MaskRay marked an inline comment as done. MaskRay added a comment. fix a typo in a comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149920/new/ https://reviews.llvm.org/D149920 Files:

[PATCH] D149920: ms inline asm: recognize case-insensitive JMP and CALL as TargetLowering::C_Address

2023-05-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:33955 const SmallVectorImpl , unsigned OpNo) const { - StringRef InstrStr = getInstrStrFromOpNo(AsmStrs, OpNo); - - if (InstrStr.contains("call")) -return true; - - return false; + //

[PATCH] D149867: [M68k] Add Clang support for the new M68k_RTD CC

2023-05-04 Thread Sheng via Phabricator via cfe-commits
0x59616e added inline comments. Comment at: clang/test/CodeGen/mrtd.c:9 +// X86: define{{.*}} x86_stdcallcc void @foo(i32 noundef %arg) [[NUW:#[0-9]+]] +// M68k: define{{.*}} cc104 void @foo(i32 noundef %arg) void foo(int arg) { 0x59616e wrote: > Just curious,

[PATCH] D149867: [M68k] Add Clang support for the new M68k_RTD CC

2023-05-04 Thread Sheng via Phabricator via cfe-commits
0x59616e added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:559 +emitError |= DefaultCC == LangOptions::DCC_StdCall && + !(Arch == llvm::Triple::m68k || Arch == llvm::Triple::x86); emitError |= (DefaultCC ==

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

2023-05-04 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:2582 } else if (ArraySize->isTypeDependent() || ArraySize->isValueDependent()) { -T = Context.getDependentSizedArrayType(T, ArraySize, ASM, Quals, Brackets); +if (getLangOpts().CPlusPlus) { +

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

2023-05-04 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:133 } +Response HandlePartialClassTemplateSpec( alexander-shaposhnikov wrote: > alexander-shaposhnikov wrote: > > HandlePartialClassTemplateSpec is from

[PATCH] D149920: ms inline asm: recognize case-insensitive JMP and CALL as TargetLowering::C_Address

2023-05-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 519734. MaskRay retitled this revision from "ms inline asm: recognize "jmp" as TargetLowering::C_Address" to "ms inline asm: recognize case-insensitive JMP and CALL as TargetLowering::C_Address". MaskRay edited the summary of this revision. MaskRay added a

[PATCH] D148092: [clang][CodeGen] Break up TargetInfo.cpp [4/6]

2023-05-04 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D148092#4317438 , @efriedma wrote: > Is there some alternative way we can write this? Even if each of the > overrides is only technically used in one place, it's a repeating pattern, > and writing the casts inline

[PATCH] D148092: [clang][CodeGen] Break up TargetInfo.cpp [4/6]

2023-05-04 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 519723. barannikov88 added a comment. Add a templated overload to help derived classes avoid explicit casts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148092/new/ https://reviews.llvm.org/D148092

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

2023-05-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/Modules/Inputs/implicit-module-header-maps/a.h:1-3 +#ifdef FOO +#error foo +#endif It would be better to use `split-file` to merge the segments of the tests. You can find the example in the Modules

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

2023-05-04 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2335 + // To analyze callables: + if (isa(Node)) { +// For code in dependent contexts, we'll do this at instantiation time: NoQ wrote: > The intended way

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

2023-05-04 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 519719. ziqingluo-90 marked 3 inline comments as done. ziqingluo-90 added a comment. Addressed the comments: - 1) about using a more traditional way of AST traversal; and - 2) about the concern on `ObjcMethodDecl` traversal. CHANGES SINCE LAST ACTION

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

2023-05-04 Thread Soumi Manna via Phabricator via cfe-commits
Manna created this revision. Manna added a reviewer: erichkeane. Herald added a project: All. Manna requested review of this revision. Herald added a project: clang. Reported by Coverity: In clang::​ASTContext::​hasUniqueObjectRepresentations(clang::​QualType, bool): Return value of function

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

2023-05-04 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @davidtgoldblatt - thanks for the report. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 ___ cfe-commits mailing list

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

2023-05-04 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/test/SemaTemplate/concepts-out-of-line-def.cpp:348 + +namespace MultilevelTemplateWithPartialSpecialization { +template (new tests) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

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

2023-05-04 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:133 } +Response HandlePartialClassTemplateSpec( alexander-shaposhnikov wrote: > HandlePartialClassTemplateSpec is from Erich's diff >

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

2023-05-04 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 519711. alexander-shaposhnikov added a comment. Remove dead code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 Files:

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

2023-05-04 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 519708. alexander-shaposhnikov added a comment. Add more tests, Fix HandlePartialClassTemplateSpec. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178

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

2023-05-04 Thread Amara Emerson via Phabricator via cfe-commits
aemerson added a comment. I have another attempt at fixing this in D149918 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143624/new/ https://reviews.llvm.org/D143624

[PATCH] D148924: [clang] Show error if defaulted comparions operator function is volatile or has ref-qualifier &&.

2023-05-04 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D148924#4318381 , @massberg wrote: > I have checked the paper P2002R1 and as far as I can tell it is fully > implemented when this patch has landed. So I read the paper but since the paper does not have examples for each

[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D146090#4319737 , @Mordante wrote: > In D146090#4319685 , @shafik wrote: > >> Landed fix 7887af027ee5eff27bbc953074726ab8d9d9f592 >>

[PATCH] D141907: [CMake] Ensure `CLANG_RESOURCE_DIR` is respected

2023-05-04 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added inline comments. Comment at: cmake/Modules/GetClangResourceDir.cmake:13 + if(DEFINED CLANG_RESOURCE_DIR AND NOT CLANG_RESOURCE_DIR STREQUAL "") +set(ret_dir bin/${CLANG_RESOURCE_DIR}) + else() tstellar wrote: > paperchalice wrote: > >

[PATCH] D141907: [CMake] Ensure `CLANG_RESOURCE_DIR` is respected

2023-05-04 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added inline comments. Comment at: cmake/Modules/GetClangResourceDir.cmake:13 + if(DEFINED CLANG_RESOURCE_DIR AND NOT CLANG_RESOURCE_DIR STREQUAL "") +set(ret_dir bin/${CLANG_RESOURCE_DIR}) + else() paperchalice wrote: > tstellar wrote: > > Why is

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

2023-05-04 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. Reverted in https://github.com/llvm/llvm-project/commit/3b9ed6e5323176550925f3b0a2c50ced1b61438d, it'll take time to investigate this case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/

[clang] 3b9ed6e - Revert "[Clang][Sema] Fix comparison of constraint expressions"

2023-05-04 Thread Alexander Shaposhnikov via cfe-commits
Author: Alexander Shaposhnikov Date: 2023-05-05T00:02:26Z New Revision: 3b9ed6e5323176550925f3b0a2c50ced1b61438d URL: https://github.com/llvm/llvm-project/commit/3b9ed6e5323176550925f3b0a2c50ced1b61438d DIFF:

[PATCH] D141907: [CMake] Ensure `CLANG_RESOURCE_DIR` is respected

2023-05-04 Thread Junchang Liu via Phabricator via cfe-commits
paperchalice added inline comments. Comment at: cmake/Modules/GetClangResourceDir.cmake:13 + if(DEFINED CLANG_RESOURCE_DIR AND NOT CLANG_RESOURCE_DIR STREQUAL "") +set(ret_dir bin/${CLANG_RESOURCE_DIR}) + else() tstellar wrote: > Why is the bin prefix

[PATCH] D149904: Generic selection expressions that accept a type operand

2023-05-04 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/AST/Expr.h:5686 /// if and only if the generic selection expression is result-dependent. - unsigned NumAssocs, ResultIndex; + unsigned NumAssocs, ResultIndex, IsExprPredicate; enum : unsigned {

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

2023-05-04 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:2582 } else if (ArraySize->isTypeDependent() || ArraySize->isValueDependent()) { -T = Context.getDependentSizedArrayType(T, ArraySize, ASM, Quals, Brackets); +if (getLangOpts().CPlusPlus) { +

[PATCH] D149917: [lld][WebAssembly] Add --preserve-features flag

2023-05-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Still needs a test.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149917/new/ https://reviews.llvm.org/D149917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D149917: [lld][WebAssembly] Add --preserve-features flag

2023-05-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: pmatos, asb, wingo, ecnelises, sunfish, jgravelle-google, dschuff. Herald added a project: All. sbc100 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, aheejin. Herald added a project: clang. This flag

[PATCH] D148385: [RISCV] Implement KCFI operand bundle lowering

2023-05-04 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen planned changes to this revision. samitolvanen added a comment. Uploaded D149915 to remove the arch-specific KCFI passes. I'll update this patch once we clean that up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D149912: [clangd] downgrade missing-includes diagnostic to Information level

2023-05-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This change is just one option to be evaluated for making these diagnostics more user-friendly. Mostly sending the patch now to attach some screenshots... Effect in VSCode (blue underline, visible in problems view, filterable) F27332814: image.png

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

2023-05-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:329 +static void +builtinTransferScopeEnd(const CFGScopeEnd , +TypeErasedDataflowAnalysisState ) { mboehme wrote: > xazax.hun

[PATCH] D149912: [clangd] downgrade missing-includes diagnostic to Information level

2023-05-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. In

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

2023-05-04 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 519675. HerrCai0907 added a comment. use nullpt as SizeExpr Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149612/new/ https://reviews.llvm.org/D149612 Files: clang/docs/ReleaseNotes.rst

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

2023-05-04 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 updated this revision to Diff 519671. HerrCai0907 added a comment. getConstantArrayType instal QualType() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149612/new/ https://reviews.llvm.org/D149612 Files: clang/docs/ReleaseNotes.rst

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

2023-05-04 Thread David Goldblatt via Phabricator via cfe-commits
davidtgoldblatt added a comment. This version of the commit also introduces some breakages; as before I'm not sure if it's the code or the diff that's incorrect. Repro: enum class Enum { E1 }; template inline constexpr bool some_concept = true; template struct S {

[PATCH] D147875: [clang][Diagnostics] Show line numbers when printing code snippets

2023-05-04 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/lib/Frontend/TextDiagnostic.cpp:1121-1138 +static unsigned getNumDisplayWidth(unsigned N) { + if (N < 10) +return 1; + if (N < 100) +return 2; + if (N < 1'000) +return 3; kwk wrote: > This function

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

2023-05-04 Thread Rishabh Bali via Phabricator via cfe-commits
Ris-Bali added a comment. I have made the requested changes. Please do let me know if other changes are required. Also I would like to thank everyone for their help and guidance. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149514/new/ https://reviews.llvm.org/D149514

[PATCH] D134042: [clang-format] Fix alignment in #else preprocessor blocks

2023-05-04 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar added a comment. I retract my objection. I forgot that from clang-format's perspective, `#else` blocks in separate functions have the same indent and nesting level, and thus the same "scope", so the alignment issues may persist there. You will see misalignment in `#else`

[PATCH] D149906: [Clang] Update release notes

2023-05-04 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 519660. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149906/new/ https://reviews.llvm.org/D149906 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/ReleaseNotes.rst

[PATCH] D149650: Give NullabilityKind a printing operator<

2023-05-04 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 rG0a532207b869: Give NullabilityKind a printing operator (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 0a53220 - Give NullabilityKind a printing operator<

2023-05-04 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-05-04T23:24:51+02:00 New Revision: 0a532207b8696d81e46017f444bd2257347f129b URL: https://github.com/llvm/llvm-project/commit/0a532207b8696d81e46017f444bd2257347f129b DIFF: https://github.com/llvm/llvm-project/commit/0a532207b8696d81e46017f444bd2257347f129b.diff

[PATCH] D149650: Give NullabilityKind a printing operator<

2023-05-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks Aaron! The check is not going to be ready for upstreaming really soon - plenty of thorny issues to work out first, and checking in a half-working version would do more harm than good. But that's definitely the goal once we have some deployment experience.

[PATCH] D149906: [Clang] Update release notes

2023-05-04 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: rsmith, erichkeane, ilya-biryukov. alexander-shaposhnikov created this object with visibility "All Users". Herald added a project: All. alexander-shaposhnikov requested review of this revision. Herald added a

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

2023-05-04 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. LGTM still. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149144/new/ https://reviews.llvm.org/D149144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D147875: [clang][Diagnostics] Show line numbers when printing code snippets

2023-05-04 Thread Konrad Wilhelm Kleine via Phabricator via cfe-commits
kwk added a comment. @tbaeder I have a small suggestion. Comment at: clang/lib/Frontend/TextDiagnostic.cpp:1121-1138 +static unsigned getNumDisplayWidth(unsigned N) { + if (N < 10) +return 1; + if (N < 100) +return 2; + if (N < 1'000) +return 3;

[PATCH] D134042: [clang-format] Fix alignment in #else preprocessor blocks

2023-05-04 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar added a comment. After reviewing the GitHub issue, it looks like the IndentAndNestingLevel is sticky over the entire scope for `#else` blocks, so the regression only occurs within `#else` blocks in the same scope. The bug I fixed affected alignment in all `#else` blocks,

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

2023-05-04 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. Dependent type for CPP is a common case due to template. But for `mergeTypes` in C, dependent type cannot be handled correctly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149612/new/

[PATCH] D149904: Generic selection expressions that accept a type operand

2023-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: clang-language-wg, efriedma, jyknight, hubert.reinterpretcast, rsmith. Herald added a subscriber: martong. Herald added a reviewer: shafik. Herald added a reviewer: NoQ. Herald added a project: All. aaron.ballman requested review

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

2023-05-04 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbfbe13788815: [clang][dataflow] Eliminate intermediate `ReferenceValue`s from `Environment… (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D149144?vs=519373=519644#toc

[clang] bfbe137 - [clang][dataflow] Eliminate intermediate `ReferenceValue`s from `Environment::DeclToLoc`.

2023-05-04 Thread Martin Braenne via cfe-commits
Author: Martin Braenne Date: 2023-05-04T20:57:30Z New Revision: bfbe137888151dfd506df6b3319d08c4de0e00f5 URL: https://github.com/llvm/llvm-project/commit/bfbe137888151dfd506df6b3319d08c4de0e00f5 DIFF: https://github.com/llvm/llvm-project/commit/bfbe137888151dfd506df6b3319d08c4de0e00f5.diff

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

2023-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua added a comment. In D149677#4319646 , @aaron.ballman wrote: > Will this new printing policy be used in tree? Not initially, no. (I'm understanding "in tree" as "in the LLVM project".) Some additional context: I'm working on a refactoring

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

2023-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 519643. li.zhe.hua marked an inline comment as done. li.zhe.hua added a comment. Accept suggested edits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149677/new/ https://reviews.llvm.org/D149677 Files:

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

2023-05-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper requested changes to this revision. craig.topper added a comment. This revision now requires changes to proceed. The instructions need a DecoderNamespace to separate them from c.fsdsp. See D149891 for how I've done it for Zcmt. Repository: rG

[PATCH] D147875: [clang][Diagnostics] Show line numbers when printing code snippets

2023-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: clang-vendors. aaron.ballman added a comment. This should definitely have explicit documentation added to https://github.com/llvm/llvm-project/blob/main/clang/docs/UsersManual.rst?plain=1#L156 and a release note. Adding clang-vendors because of the potential

[PATCH] D149182: Remove -Wpacked false positive for non-pod types where the layout isn't directly changed

2023-05-04 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 aside from a nit with the release notes. Thank you for the fix! Comment at: clang/docs/ReleaseNotes.rst:109-113 +Warnings + +- Address a false

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

2023-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:329 +static void +builtinTransferScopeEnd(const CFGScopeEnd , +TypeErasedDataflowAnalysisState ) { xazax.hun wrote: > mboehme

[PATCH] D149899: [clang-tidy] Support SystemHeaders in .clang-tidy

2023-05-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 519633. carlosgalvezp edited the summary of this revision. carlosgalvezp added a comment. Update commit message with Github issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149899/new/

[PATCH] D149899: [clang-tidy] Support SystemHeaders in .clang-tidy

2023-05-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. Herald added subscribers: PiotrZSL, xazax.hun. 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. A previous patch

[PATCH] D134042: [clang-format] Fix alignment in #else preprocessor blocks

2023-05-04 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a subscriber: rymiel. owenpan added a comment. Herald added a reviewer: rymiel. I'll revert this patch due to the regression https://github.com/llvm/llvm-project/issues/61498 unless any of you (and @rymiel ) objects. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

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

2023-05-04 Thread Rishabh Bali via Phabricator via cfe-commits
Ris-Bali updated this revision to Diff 519628. Ris-Bali added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149514/new/ https://reviews.llvm.org/D149514 Files: clang/docs/ReleaseNotes.rst clang/lib/CodeGen/CGBuiltin.cpp clang/lib/Sema/SemaChecking.cpp

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

2023-05-04 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D149612#4314536 , @shafik wrote: > In D149612#4314209 , @HerrCai0907 > wrote: > >> in SemaType.cpp#BuildArrayType, It will generate `DependentSizedArrayType` >> which cannot be

[PATCH] D149516: [Sema] `setInvalidDecl` for error deduction declaration

2023-05-04 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 added a comment. ping @rsmith Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149516/new/ https://reviews.llvm.org/D149516 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D144999: [RFC][MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs.

2023-05-04 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. I wonder if we actually need to define a clang frontend flag for this; I suspect nobody will ever want to specify it, since the only non-canonical personality clang will ever generate that changes behavior is the pure-C destructor-only personality,

[PATCH] D149809: [Clang][Docs] Fix man page build

2023-05-04 Thread Aiden Grossman via Phabricator via cfe-commits
aidengrossman added a comment. Thank you very much for your patience and writing everything out. That makes a lot more sense. The resulting code definitely has a lot more desirable properties. I've updated the diff in accordance with your suggestions. Repository: rG LLVM Github Monorepo

[PATCH] D149809: [Clang][Docs] Fix man page build

2023-05-04 Thread Aiden Grossman via Phabricator via cfe-commits
aidengrossman updated this revision to Diff 519622. aidengrossman marked 6 inline comments as done. aidengrossman added a comment. Adjust based on reviewer suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149809/new/

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

2023-05-04 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a subscriber: rsmith. shafik added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:683-685 + // C++17 onwards require that we evaluate the RHS first. + // Compute RHS and save it in a temporary variable so we can + // load it again later.

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

2023-05-04 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 519613. aeubanks added a comment. only diagnose if we're initializing an array Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146764/new/ https://reviews.llvm.org/D146764 Files:

[PATCH] D141907: [CMake] Ensure `CLANG_RESOURCE_DIR` is respected

2023-05-04 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added inline comments. Herald added subscribers: ekilmer, jplehr. Comment at: cmake/Modules/GetClangResourceDir.cmake:13 + if(DEFINED CLANG_RESOURCE_DIR AND NOT CLANG_RESOURCE_DIR STREQUAL "") +set(ret_dir bin/${CLANG_RESOURCE_DIR}) + else() Why

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-05-04 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 519605. void marked an inline comment as done. void added a comment. Use "Expected" for the SourceRange imports. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files:

[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D146090#4319685 , @shafik wrote: > Landed fix 7887af027ee5eff27bbc953074726ab8d9d9f592 > > > There was also 058f04ea7dcbafbeed271fa75ee65e41409b4479 >

[PATCH] D147823: [clang-repl] Reduce dynamic-library.cpp test to only load shared library

2023-05-04 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 abandoned this revision. zhuhan0 added a comment. Superseded by https://reviews.llvm.org/D148992. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147823/new/ https://reviews.llvm.org/D147823 ___

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

2023-05-04 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/test/MC/RISCV/rv32zcmt-invalid.s:9 + +# CHECK-ERROR: error: immediate must be an integer in the range [0, 255] +cm.jalt 256 This is wrong; the immediate must be in the range [32, 255]. This needs to be enforced in

[PATCH] D149737: [clang][ExtractAPI] Add semicolon to function declaration fragments

2023-05-04 Thread NagaChaitanya Vellanki via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG14805dcb0d8a: [clang][ExtractAPI] Add semicolon to function declaration fragments (authored by chaitanyav). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 14805dc - [clang][ExtractAPI] Add semicolon to function declaration fragments

2023-05-04 Thread NagaChaitanya Vellanki via cfe-commits
Author: NagaChaitanya Vellanki Date: 2023-05-04T11:46:43-07:00 New Revision: 14805dcb0d8abfd5cd015656313f3f98a22e0a1b URL: https://github.com/llvm/llvm-project/commit/14805dcb0d8abfd5cd015656313f3f98a22e0a1b DIFF:

[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Landed fix 7887af027ee5eff27bbc953074726ab8d9d9f592 There was also 058f04ea7dcbafbeed271fa75ee65e41409b4479 and

[PATCH] D149884: [clang][deps] Teach dep directive scanner about _Pragma

2023-05-04 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: akyrtzi, Bigcheese, jansvoboda11. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. While we cannot handle `_Pragma` used inside macros,

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

2023-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Will this new printing policy be used in tree? Comment at: clang/include/clang/AST/PrettyPrinter.h:143-145 + /// Ignore qualifiers as specified by elaborated type sugar, instead letting + /// the underlying type handle printing the qualifiers.

[clang] 7887af0 - Fix build bots due to missing a commit thay change 2b to 23

2023-05-04 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-05-04T11:33:58-07:00 New Revision: 7887af027ee5eff27bbc953074726ab8d9d9f592 URL: https://github.com/llvm/llvm-project/commit/7887af027ee5eff27bbc953074726ab8d9d9f592 DIFF:

[clang] 058f04e - [clang] Fix another case where CPlusPlus2b is still used.

2023-05-04 Thread Michael Liao via cfe-commits
Author: Michael Liao Date: 2023-05-04T14:27:33-04:00 New Revision: 058f04ea7dcbafbeed271fa75ee65e41409b4479 URL: https://github.com/llvm/llvm-project/commit/058f04ea7dcbafbeed271fa75ee65e41409b4479 DIFF: https://github.com/llvm/llvm-project/commit/058f04ea7dcbafbeed271fa75ee65e41409b4479.diff

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

2023-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Precommit CI found some related failures that need to be addressed, but the functional changes are all looking good to me. Be sure to also add a release note for the fix as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] b323b40 - [clang] Fix build after https://reviews.llvm.org/D149553

2023-05-04 Thread Michael Liao via cfe-commits
Author: Michael Liao Date: 2023-05-04T14:23:46-04:00 New Revision: b323b407f76d22bfc08b1430f7952c03eb504288 URL: https://github.com/llvm/llvm-project/commit/b323b407f76d22bfc08b1430f7952c03eb504288 DIFF: https://github.com/llvm/llvm-project/commit/b323b407f76d22bfc08b1430f7952c03eb504288.diff

[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D146090#4319561 , @clementval wrote: > This commit is failing couple of buildbots. Can you revert or fix? Shafik is validating a fix for it right now, it should be fixed momentarily. Repository: rG LLVM Github

[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. I am about to fix it Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146090/new/ https://reviews.llvm.org/D146090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D149831: [clang][Interp] Fix ignoring SubstNonTypeTemplateParmExpr

2023-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149831/new/ https://reviews.llvm.org/D149831

[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread Valentin Clement via Phabricator via cfe-commits
clementval added a comment. This commit is failing couple of buildbots. Can you revert or fix? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146090/new/ https://reviews.llvm.org/D146090 ___ cfe-commits

[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread NagaChaitanya Vellanki via Phabricator via cfe-commits
chaitanyav added a comment. @shafik @aaron.ballman I see some errors [1/2496] Building DiagnosticAnalysisKinds.inc... FAILED: tools/clang/include/clang/Basic/DiagnosticAnalysisKinds.inc /home/nvellanki/scratch/llvm-project/tools/clang/include/clang/Basic/DiagnosticAnalysisKinds.inc cd

[clang] b4692f2 - [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-05-04T11:07:16-07:00 New Revision: b4692f29263006c7ea519c7b11c9082384f0af53 URL: https://github.com/llvm/llvm-project/commit/b4692f29263006c7ea519c7b11c9082384f0af53 DIFF:

[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread Shafik Yaghmour 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 rGb4692f292630: [Clang] Updating handling of defaulted comparison operators to reflect changes… (authored by shafik). Herald added a project: clang.

[PATCH] D149837: [clang][Interp] Fix ignoring CompoundLiteralExprs

2023-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:878 +(int){1}; +(int[]){1,2,3}; Can you also add a test like: ``` constexpr int oh_my(int x) { (int){ x++ }; return x; } static_assert(oh_my(0) == 1); ``` and ```

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

2023-05-04 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Thanks Duncan. > Given that header maps are somewhat Apple-specific Some non-obvious background: It began Apple specific, but Meta uses them at scale as well, pretty important for us to get this right. > and unit test coverage is a bit lacking for these sorts of

[PATCH] D149650: Give NullabilityKind a printing operator<

2023-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. In D149650#4319461 , @sammccall wrote: > In D149650#4316138 , @aaron.ballman > wrote: > >> In D149650#4315211

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

2023-05-04 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added reviewers: Bigcheese, ChuanqiXu, jansvoboda11. bruno added a comment. Adding code owners and more relevant folks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103930/new/ https://reviews.llvm.org/D103930

[PATCH] D149850: [Clang][Modules] Support `requires cplusplus20` in a modulemap

2023-05-04 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno 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/D149850/new/ https://reviews.llvm.org/D149850 ___

[PATCH] D149650: Give NullabilityKind a printing operator<

2023-05-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D149650#4316138 , @aaron.ballman wrote: > In D149650#4315211 , @sammccall > wrote: > >> In D149650#4312389 , >> @aaron.ballman wrote: >>

[PATCH] D149834: [clang][Interp] Fix ignoring TypeTraitExprs

2023-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:875 1 ? 0 : 1; +sizeof(A); +alignof(A); Let's make sure we still reject this: ``` constexpr int oh_my() { int x = 0; sizeof(int[x++]); // This would usually be

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

2023-05-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:329 +static void +builtinTransferScopeEnd(const CFGScopeEnd , +TypeErasedDataflowAnalysisState ) {

  1   2   3   >