[clang] 0b66b34 - [clang][AIX] Fix Overly Strict LTO Option Checking against `data-sections` when `mxcoff-roptr` is in Effect

2023-07-11 Thread Qiongsi Wu via cfe-commits
Author: Qiongsi Wu Date: 2023-07-11T13:24:09-04:00 New Revision: 0b66b3417c026e145708d0e20bfd05a72e79f12a URL: https://github.com/llvm/llvm-project/commit/0b66b3417c026e145708d0e20bfd05a72e79f12a DIFF: https://github.com/llvm/llvm-project/commit/0b66b3417c026e145708d0e20bfd05a72e79f12a.diff

[PATCH] D154784: [clang] Fix crash caused by PseudoObjectExprBitfields::NumSubExprs overflow

2023-07-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/AST/Stmt.h:603 -// These don't need to be particularly wide, because they're -// strictly limited by the forms of expressions we permit. -unsigned NumSubExprs : 8; -unsigned ResultIndex : 32 - 8 -

[PATCH] D154503: [Sema] Fix handling of functions that hide classes

2023-07-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:542 +N = Decls.size(); + } + dexonsmith wrote: > john.brawn wrote: > > rjmccall wrote: > > > john.brawn wrote: > > > > rjmccall wrote: > > > > > This is going to fire on every single

[PATCH] D152924: [libLTO][AIX] Respect `-f[no]-integrated-as` on AIX

2023-07-11 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 added a comment. @MaskRay @w2yehia @shchenz could you let me know if there are further comments? I will land this patch if there are none. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152924/new/

[clang] f5326fb - clang: add a missing dependency on ClangDriverOptions

2023-07-11 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2023-07-11T10:07:09-07:00 New Revision: f5326fbe12d7ed006262d35c90803d3dd3907f82 URL: https://github.com/llvm/llvm-project/commit/f5326fbe12d7ed006262d35c90803d3dd3907f82 DIFF: https://github.com/llvm/llvm-project/commit/f5326fbe12d7ed006262d35c90803d3dd3907f82.diff

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/lib/Tooling/Inclusions/HeaderIncludes.cpp:338 int Priority = Categories.getIncludePriority( -CurInclude.Name, /*CheckMainHeader=*/FirstIncludeOffset < 0); +CurInclude.Name, /*CheckMainHeader=*/true);

[PATCH] D154881: [HIP] Ignore host linker flags for device-only

2023-07-11 Thread Siu Chi Chan via Phabricator via cfe-commits
scchan updated this revision to Diff 539173. scchan added a comment. addressed comments from yaxunl, rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154881/new/ https://reviews.llvm.org/D154881 Files: clang/lib/Driver/Driver.cpp

[PATCH] D154884: [clang-tidy] Make MatchesAnyListedNameMatcher cope with unnamed Decl

2023-07-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154884/new/ https://reviews.llvm.org/D154884

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/xray/xray_loongarch64.cpp:30 +// are 2RI12-type and 2RI16-type. +inline static uint32_t +encodeInstruction2RIx(uint32_t Opcode, uint32_t Rd, uint32_t Rj, Early xray code unfortunately does not respect

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added inline comments. This revision now requires changes to proceed. Comment at: compiler-rt/lib/xray/xray_trampoline_loongarch64.S:20 + .type __xray_FunctionEntry,@function +__xray_FunctionEntry: + .cfi_startproc

[PATCH] D154786: [Clang][Driver] Pass through the --be8 endian flag to linker in BareMetal driver For Arm.

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/ARM.cpp:40 +bool arm::isArmBigEndian(const llvm::Triple , const ArgList ) { + bool IsBigEndian = false; + We do not need this variable. After an early return, we can just `return

[PATCH] D154983: [clang-extdef-mapping] register necessary targest for ms-style asm block

2023-07-11 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang-tools-extra. Herald added a project: All. danix800 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Without targets registered gives: `error: MS-style inline assembly is not

[PATCH] D148474: [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

2023-07-11 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D148474#4490041 , @dim wrote: > FWIW, this fix works for the test cases I had via > https://bugs.freebsd.org/269067 and > https://github.com/llvm/llvm-project/issues/60182, but I got the following > failure This was with

[PATCH] D148474: [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

2023-07-11 Thread Dimitry Andric via Phabricator via cfe-commits
dim requested changes to this revision. dim added a comment. This revision now requires changes to proceed. FWIW, this fix works for the test cases I had via https://bugs.freebsd.org/269067 and https://github.com/llvm/llvm-project/issues/60182, but I got the following failure during check-all:

[PATCH] D150479: [clang][modules] Skip submodule & framework re-definitions in module maps

2023-07-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 539156. jansvoboda11 added a comment. Skip re-definitions of frameworks too, add new tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150479/new/ https://reviews.llvm.org/D150479 Files:

[PATCH] D145302: [clangd] Add library for clangd main function

2023-07-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145302/new/ https://reviews.llvm.org/D145302

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/baremetal.cpp:348 +// RUN: %clang %s -### --target=powerpc-unknown-eabi 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-PPCEABI %s Without a sysroot, we may pick up powerpc-unknown-eabi-gcc (if

[PATCH] D154784: [clang] Fix crash caused by PseudoObjectExprBitfields::NumSubExprs overflow

2023-07-11 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 539152. yronglin added a comment. Address John's comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154784/new/ https://reviews.llvm.org/D154784 Files: clang/docs/ReleaseNotes.rst

[PATCH] D154239: [Doc][clang] Some PGO documentation improvements.

2023-07-11 Thread wael yehia 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 rG7ec844c881a2: [Doc][clang] Some PGO documentation improvements. (authored by w2yehia). Herald added a project: clang. Herald added a subscriber:

[clang] 7ec844c - [Doc][clang] Some PGO documentation improvements.

2023-07-11 Thread Wael Yehia via cfe-commits
Author: Wael Yehia Date: 2023-07-11T16:26:48Z New Revision: 7ec844c881a23bf0d2e4450ac9ca97091490084f URL: https://github.com/llvm/llvm-project/commit/7ec844c881a23bf0d2e4450ac9ca97091490084f DIFF: https://github.com/llvm/llvm-project/commit/7ec844c881a23bf0d2e4450ac9ca97091490084f.diff LOG:

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-11 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:288 + } + for (auto : LazySpecializations) { +Record.push_back(SpecInfo.DeclID); SAtacker wrote: > ChuanqiXu wrote: > > v.g.vassilev wrote: > > > We

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-07-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for your patience while WG14 finalized the feature and I wrapped my head around the moving parts involved. I think this is shaping up nicely, but there's still some diagnostic issues. The biggest ones are: - We should have an extension warning for array

[PATCH] D154893: [Clang] Fix some triviality computations

2023-07-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:1269 /// Determine whether this class has a non-trivial copy constructor /// (C++ [class.copy]p6, C++11 [class.copy]p12) bool hasNonTrivialCopyConstructor() const { These

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D41416#4488517 , @Hahnfeld wrote: > In D41416#4487516 , @ChuanqiXu wrote: > >> But some local in tree tests got failed. I took some time to investigate >> them but I didn't get

[PATCH] D154905: [clang] Implement `PointerLikeTraits` for `{File,Directory}EntryRef`

2023-07-11 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154905/new/ https://reviews.llvm.org/D154905

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/AST/DeclTemplate.h:786-788 +uint32_t DeclID = ~0U; +unsigned ODRHash = ~0U; +bool IsPartial = false; Hahnfeld wrote: > ChuanqiXu wrote: > > Maybe this can save some space. > Can you

[PATCH] D154503: [Sema] Fix handling of functions that hide classes

2023-07-11 Thread John Brawn via Phabricator via cfe-commits
john.brawn updated this revision to Diff 539142. john.brawn added a comment. Use BitVector, change how Decls are deleted, adjust test to avoid potentially-conflicting using-declarations. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154503/new/ https://reviews.llvm.org/D154503 Files:

[PATCH] D152658: [InstCombine] Change SimplifyDemandedVectorElts to use PoisonElts instead of UndefElts

2023-07-11 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:1653 - if (ShMask[I] >= 0) { -assert(ShMask[I] < (int)NumElts && "Not expecting narrowing shuffle"); Constant *NewCElt = NewVecC[ShMask[I]];

[PATCH] D152658: [InstCombine] Change SimplifyDemandedVectorElts to use PoisonElts instead of UndefElts

2023-07-11 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. Hi, thanks for your hard work! Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:1653 - if (ShMask[I] >= 0) { -assert(ShMask[I] < (int)NumElts && "Not expecting narrowing shuffle"); Constant *NewCElt =

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-11 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added inline comments. Comment at: clang/include/clang/AST/DeclTemplate.h:786-788 +uint32_t DeclID = ~0U; +unsigned ODRHash = ~0U; +bool IsPartial = false; ChuanqiXu wrote: > Maybe this can save some space. Can you elaborate why this would

[PATCH] D106409: [PowerPC] Truncate exponent parameter for vec_cts,vec_ctf

2023-07-11 Thread Zarko Todorovski 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 rG14742f2a689c: [PowerPC] Truncate exponent parameter for vec_cts,vec_ctf (authored by ZarkoCA). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] 14742f2 - [PowerPC] Truncate exponent parameter for vec_cts, vec_ctf

2023-07-11 Thread Zarko Todorovski via cfe-commits
Author: Zarko Todorovski Date: 2023-07-11T11:52:07-04:00 New Revision: 14742f2a689c825adebc54cbade9c89fbe426da8 URL: https://github.com/llvm/llvm-project/commit/14742f2a689c825adebc54cbade9c89fbe426da8 DIFF:

[PATCH] D154602: [clang][clangd] Don't crash/assert on -gsplit-dwarf=single without output

2023-07-11 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. In D154602#4483600 , @MaskRay wrote: > Thanks for the patch! But I share the concern that the test is added to a > wrong layer > (https://maskray.me/blog/2021-08-08-toolchain-testing#the-test-checks-at-the-wrong-layer).

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-11 Thread Christian Walther via Phabricator via cfe-commits
cwalther updated this revision to Diff 539132. cwalther added a comment. Oops, forgot to run git-clang-format. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154357/new/ https://reviews.llvm.org/D154357 Files: clang/lib/Driver/ToolChains/BareMetal.cpp

[PATCH] D154602: [clang][clangd] Don't crash/assert on -gsplit-dwarf=single without output

2023-07-11 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 539131. DmitryPolukhin added a comment. Moved test to clang/unittests/Driver/ToolChainTest.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154602/new/ https://reviews.llvm.org/D154602 Files:

[clang] 7f0ef7f - Fix profiling of overloaded postincrement / postdecrement.

2023-07-11 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-07-11T08:41:21-07:00 New Revision: 7f0ef7f304b1b91694f14e5c9c10de2aa6f38c95 URL: https://github.com/llvm/llvm-project/commit/7f0ef7f304b1b91694f14e5c9c10de2aa6f38c95 DIFF: https://github.com/llvm/llvm-project/commit/7f0ef7f304b1b91694f14e5c9c10de2aa6f38c95.diff

[PATCH] D154186: [clang][DeclPrinter] Fix AST print of delegating constructors

2023-07-11 Thread Timo Stripf via Phabricator via cfe-commits
strimo378 added inline comments. Comment at: clang/test/AST/ast-print-method-decl.cpp:15 + // CHECK-NEXT: }; +}; aaron.ballman wrote: > I'd also like to see test cases along the lines of: > ``` > struct B { > template > B(Ty); > B(int X) : B((float)X) {}

[PATCH] D154962: [clangd] Use canonical path as resolved path for includes.

2023-07-11 Thread Viktoriia Bakalova 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 rG7322f2d5ed54: [clangd] Use canonical path as resolved path for includes. (authored by VitaNuo). Repository: rG LLVM Github Monorepo CHANGES

[clang-tools-extra] 7322f2d - [clangd] Use canonical path as resolved path for includes.

2023-07-11 Thread Viktoriia Bakalova via cfe-commits
Author: Viktoriia Bakalova Date: 2023-07-11T15:36:20Z New Revision: 7322f2d5ed547f7281af2d79a229f6620b1708ac URL: https://github.com/llvm/llvm-project/commit/7322f2d5ed547f7281af2d79a229f6620b1708ac DIFF: https://github.com/llvm/llvm-project/commit/7322f2d5ed547f7281af2d79a229f6620b1708ac.diff

[PATCH] D150478: [clang][modules][deps] Parse "FW_Private" module map even after loading "FW" PCM

2023-07-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 539127. jansvoboda11 added a comment. Expose new preprocessor option as a `-cc1` flag, move test from `ClangScanDeps` to `Modules` directory. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150478/new/

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/DeclTemplate.cpp:337 +void RedeclarableTemplateDecl::loadLazySpecializationsImpl( + bool OnlyPartial/*=false*/) const { // Grab the most recent declaration to ensure we've

[PATCH] D154962: [clangd] Use canonical path as resolved path for includes.

2023-07-11 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo marked an inline comment as done. VitaNuo added a comment. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154962/new/ https://reviews.llvm.org/D154962 ___ cfe-commits mailing list

[PATCH] D150320: [clang][modules][deps] Avoid checks for relocated modules

2023-07-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 539122. jansvoboda11 added a comment. Rename the new preprocessor option, fix failing test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150320/new/ https://reviews.llvm.org/D150320 Files:

[PATCH] D154962: [clangd] Use canonical path as resolved path for includes.

2023-07-11 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 539121. VitaNuo added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154962/new/ https://reviews.llvm.org/D154962 Files: clang-tools-extra/clangd/Headers.cpp Index:

[PATCH] D150292: [clang][modules] Serialize `Module::DefinitionLoc`

2023-07-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 539120. jansvoboda11 added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150292/new/ https://reviews.llvm.org/D150292 Files: clang/include/clang/Serialization/ASTBitCodes.h

[PATCH] D145302: [clangd] Add library for clangd main function

2023-07-11 Thread Ivan Murashko via Phabricator via cfe-commits
ivanmurashko updated this revision to Diff 539119. ivanmurashko added a comment. rebase before the final push Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145302/new/ https://reviews.llvm.org/D145302 Files:

[PATCH] D154869: [Flang] [FlangRT] Implement FlangRT library as solution to Flang's runtime LLVM integration

2023-07-11 Thread Paul Scoropan via Phabricator via cfe-commits
pscoro updated this revision to Diff 539113. pscoro added a comment. Some small changes, still non functional Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154869/new/ https://reviews.llvm.org/D154869 Files:

[PATCH] D154969: [dataflow] document flow condition

2023-07-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Nice! Definitely should have been defined earlier... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154969/new/ https://reviews.llvm.org/D154969 ___ cfe-commits mailing list

[PATCH] D152021: [clang][AIX] Fix Overly Strict LTO Option Checking against `data-sections` when `mxcoff-roptr` is in Effect

2023-07-11 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 updated this revision to Diff 539105. qiongsiwu1 added a comment. Fixing inconsistent braces. Thanks for the feedback @hubert.reinterpretcast ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152021/new/ https://reviews.llvm.org/D152021

[PATCH] D152658: [InstCombine] Change SimplifyDemandedVectorElts to use PoisonElts instead of UndefElts

2023-07-11 Thread Manuel Brito via Phabricator via cfe-commits
ManuelJBrito added a comment. Herald added a subscriber: wangpc. ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152658/new/ https://reviews.llvm.org/D152658 ___ cfe-commits mailing list

[PATCH] D153892: [NFC] Initialize class member pointers to nullptr.

2023-07-11 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision. tahonermann added a comment. This revision is now accepted and ready to land. Thanks, Sindhu! This looks good to me! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153892/new/ https://reviews.llvm.org/D153892

[PATCH] D154969: [dataflow] document flow condition

2023-07-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:528 - /// Returns the token that identifies the flow condition of the environment.

[PATCH] D154915: [ARM][AArch64] Add ARM specific builtin for clz that is not undefined for 0 in ubsan.

2023-07-11 Thread Tomas Matheson via Phabricator via cfe-commits
tmatheson added a comment. Also thanks for fixing this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154915/new/ https://reviews.llvm.org/D154915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D154915: [ARM][AArch64] Add ARM specific builtin for clz that is not undefined for 0 in ubsan.

2023-07-11 Thread Tomas Matheson via Phabricator via cfe-commits
tmatheson added a comment. I would prefer the simplicity of adding a check in the intrinsic itself, rather than adding the target-specific builtins. Slightly worse codegen at -O0 doesn't matter imho. However I don't feel very strongly about it, so if others are happy with this then LGTM.

[PATCH] D154965: [clang][dataflow] Fix initializaing a reference field with an `InitListExpr`.

2023-07-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:720-725 for (auto It : llvm::zip(Fields, S->inits())) { const FieldDecl *Field =

[PATCH] D112932: Use llvm.is_fpclass to implement FP classification functions

2023-07-11 Thread Serge Pavlov 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 rG7d6c2e18114d: [clang] Use llvm.is_fpclass to implement FP classification functions (authored by sepavloff). Changed prior to commit:

[clang] 7d6c2e1 - [clang] Use llvm.is_fpclass to implement FP classification functions

2023-07-11 Thread Serge Pavlov via cfe-commits
Author: Serge Pavlov Date: 2023-07-11T21:34:53+07:00 New Revision: 7d6c2e18114de9900d1b012cf9c219803b183f63 URL: https://github.com/llvm/llvm-project/commit/7d6c2e18114de9900d1b012cf9c219803b183f63 DIFF: https://github.com/llvm/llvm-project/commit/7d6c2e18114de9900d1b012cf9c219803b183f63.diff

[PATCH] D154701: [clang] Overridden CXXMethodDecl::isVirtual() assertion failed before fully imported.

2023-07-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. It is possible to reproduce the same problem with this test added to ASTImporterTest.cpp: TEST_P(ASTImporterOptionSpecificTestBase, ImportVirtualOverriddenMethodTest) { const char *Code = R"( void f1(); class A { virtual void

[PATCH] D154905: [clang] Implement `PointerLikeTraits` for `{File,Directory}EntryRef`

2023-07-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 marked an inline comment as done. jansvoboda11 added inline comments. Comment at: clang/include/clang/Basic/DirectoryEntry.h:211 + + static constexpr int NumLowBitsAvailable = 3; +}; benlangmuir wrote: > I suggest not hard-coding it if you can get

[PATCH] D154503: [Sema] Fix handling of functions that hide classes

2023-07-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:542 +N = Decls.size(); + } + john.brawn wrote: > rjmccall wrote: > > john.brawn wrote: > > > rjmccall wrote: > > > > This is going to fire on every single ordinary lookup that finds

[PATCH] D154905: [clang] Implement `PointerLikeTraits` for `{File,Directory}EntryRef`

2023-07-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 539089. jansvoboda11 added a comment. Forward `NumLowBitsAvailable` to `PointerLikeTypeTraits` of the underlying pointer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154905/new/

[PATCH] D154969: [dataflow] document flow condition

2023-07-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ymandel. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. sammccall requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.

[PATCH] D154503: [Sema] Fix handling of functions that hide classes

2023-07-11 Thread John Brawn via Phabricator via cfe-commits
john.brawn added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:542 +N = Decls.size(); + } + rjmccall wrote: > john.brawn wrote: > > rjmccall wrote: > > > This is going to fire on every single ordinary lookup that finds multiple > > >

[PATCH] D154935: [clang][dataflow] Introduce `getFieldValue()` test helpers.

2023-07-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp:94 Environment Env(DAContext, *Fun); - Value *Val = Env.createValue(Ty); - ASSERT_NE(Val, nullptr); - StructValue *SVal =

[PATCH] D154965: [clang][dataflow] Fix initializaing a reference field with an `InitListExpr`.

2023-07-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I added a test for this as the ongoing

[PATCH] D154295: [Driver][MSVC] Support DWARF fission when using LTO on Windows

2023-07-11 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D154295#4482818 , @HaohaiWen wrote: > In D154295#4477203 , @hans wrote: > >> In D154295#4477165 , @HaohaiWen >> wrote: >> It would be nice

[PATCH] D154903: clangd: Provide the resource dir via environment variable

2023-07-11 Thread Paul Smith via Phabricator via cfe-commits
madscientist added a comment. Thanks for adding Sam. I tried to do this but failed: his Phabricator handle isn't available in CODE_OWNERS.txt and my attempts to add him via his email address failed. I have no Phabricator fu! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D154962: [clangd] Use canonical path as resolved path for includes.

2023-07-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/Headers.cpp:57-61 + auto CanonicalPath = + File ? getCanonicalPath(File->getFileEntry().getLastRef(), +

[PATCH] D154503: [Sema] Fix handling of functions that hide classes

2023-07-11 Thread John Brawn via Phabricator via cfe-commits
john.brawn added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:507 + // C++ [basic.scope.hiding]p2: + // A class name or enumeration name can be hidden by the name of shafik wrote: > This section does not exist anymore, it was replaced in >

[PATCH] D154186: [clang][DeclPrinter] Fix AST print of delegating constructors

2023-07-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for the fix! This generally LGTM, but I did find some extra test cases to add. Comment at: clang/test/AST/ast-print-method-decl.cpp:1 +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + I think the file should be

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: sammccall, kadircet. Herald added a project: All. hokein requested review of this revision. Herald added projects: clang, clang-tools-extra. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D154963 Files:

[PATCH] D154962: [clangd] Use canonical path as resolved path for includes.

2023-07-11 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. VitaNuo requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository: rG LLVM Github Monorepo

[PATCH] D154961: [clang][dataflow] Include fields initialized in an `InitListExpr` in `getModeledFields()`.

2023-07-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously, we were including these fields only

[PATCH] D151697: [clang] Add test for CWG1710 and related issues

2023-07-11 Thread Vlad Serebrennikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1bbaabb90dd7: [clang] Add test for CWG1710 and related issues (authored by Endill). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151697/new/

[clang] 1bbaabb - [clang] Add test for CWG1710 and related issues

2023-07-11 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-07-11T16:24:39+03:00 New Revision: 1bbaabb90dd72f78ea290b71dfe3bf2689ad7403 URL: https://github.com/llvm/llvm-project/commit/1bbaabb90dd72f78ea290b71dfe3bf2689ad7403 DIFF:

[PATCH] D154675: [Clang] Fix crash when emitting diagnostic for out of order designated initializers in C++

2023-07-11 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 but please land with a release note. Comment at: clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:66 .y = 1, // override-note {{previous}} - .y =

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9838 +def err_omp_loop_reduction_clause : Error< + "reduction clause not allowed with '#pragma omp loop bind(teams)'">; def warn_break_binds_to_switch : Warning<

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-07-11 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill added inline comments. Comment at: clang/test/CXX/drs/dr14xx.cpp:491 + float operator ""_E(const char *); + // expected-warning@+1 {{user-defined literal suffixes not starting with '_' are reserved; no literal will invoke this operator}} + float operator ""E(const

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-07-11 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill accepted this revision as: Endill. Endill added a comment. DR testing side looks good, but you should wait for more approvals. Thank you for addressing all the issues there! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152632/new/ https://reviews.llvm.org/D152632

[PATCH] D153659: [RISCV] Fix name mangling for LMUL!=1 vector types with attribute(rvv_vector_bits)

2023-07-11 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/D153659/new/ https://reviews.llvm.org/D153659

[PATCH] D153612: [clang][analyzer] Add and change NoteTags in StdLibraryFunctionsChecker.

2023-07-11 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:1305 + std::string Note = + llvm::formatv(Case.getNote().str().c_str(), +cast(Call.getDecl())->getDeclName());

[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-07-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This seems reasonable to me, but I do wonder if changing the return type from int to bool will cause surprises for anyone. I see why it's done, but this seems more like a C interface (to me) which would return an `int`; returning a `bool` gets promoted to `int`

[PATCH] D154950: [include-cleaner] Fix the `fixIncludes` API not respect main-file header.

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7f3d2cd7ec25: [include-cleaner] Fix the `fixIncludes` API not respect main-file header. (authored by hokein). Repository: rG LLVM Github Monorepo

[clang-tools-extra] 7f3d2cd - [include-cleaner] Fix the `fixIncludes` API not respect main-file header.

2023-07-11 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2023-07-11T15:02:26+02:00 New Revision: 7f3d2cd7ec254cda659c5e5a19a42105e370e04c URL: https://github.com/llvm/llvm-project/commit/7f3d2cd7ec254cda659c5e5a19a42105e370e04c DIFF: https://github.com/llvm/llvm-project/commit/7f3d2cd7ec254cda659c5e5a19a42105e370e04c.diff

[PATCH] D154950: [include-cleaner] Fix the `fixIncludes` API not respect main-file header.

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp:303 - EXPECT_EQ(fixIncludes(Results, Code, format::getLLVMStyle()), R"cpp( + EXPECT_EQ(fixIncludes(Results, "d.cc", Code, format::getLLVMStyle()), +R"cpp(#include "d.h"

[PATCH] D154950: [include-cleaner] Fix the `fixIncludes` API not respect main-file header.

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 539045. hokein added a comment. add a testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154950/new/ https://reviews.llvm.org/D154950 Files:

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-11 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. No concerns from the perspective of PowerPC here. Of course, my focus is primarily on the server side of things but I am not aware of any other group that could be adversely affected. CHANGES SINCE LAST ACTION

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-11 Thread Christian Walther via Phabricator via cfe-commits
cwalther updated this revision to Diff 539033. cwalther added a comment. Updated patch according to current discussion: - remove check for vendor, any vendor is accepted - replace cascaded `if` by `&&` - rebase on main a3f9ce6

[PATCH] D154786: [Clang][Driver] Pass through the --be8 endian flag to linker in BareMetal driver For Arm.

2023-07-11 Thread Simi Pallipurath via Phabricator via cfe-commits
simpal01 updated this revision to Diff 539031. simpal01 added a comment. Addressing Review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154786/new/ https://reviews.llvm.org/D154786 Files: clang/lib/Driver/ToolChains/Arch/ARM.cpp

[PATCH] D154952: [clang][dataflow] Various refactorings in TypeErasedDataflowAnalysisTest.cpp

2023-07-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:400 getASTContext( { - auto = *Env.createValue(E->getType()); - ConstructorVal.setProperty("is_set",

[PATCH] D154952: [clang][dataflow] Various refactorings in TypeErasedDataflowAnalysisTest.cpp

2023-07-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. These simplify the code in their own right, but they are also useful in that

[PATCH] D154950: [include-cleaner] Fix the `fixIncludes` API not respect main-file header.

2023-07-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp:303 - EXPECT_EQ(fixIncludes(Results, Code, format::getLLVMStyle()), R"cpp( +

[PATCH] D154948: [dataflow] improve determinism of generated SAT system

2023-07-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Thank you, Sam! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154948/new/ https://reviews.llvm.org/D154948 ___ cfe-commits mailing list

[PATCH] D154951: [clang][Interp] __builtin_bit_cast, Take 2

2023-07-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This implements `__builtin_bit_cast()`. The new

[PATCH] D154950: [include-cleaner] Fix the `fixIncludes` API not respect main-file header.

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang-tools-extra. The fixIncludes was using the `input` as the main file path, this will results in inserting header at wrong places.

[PATCH] D154948: [dataflow] improve determinism of generated SAT system

2023-07-11 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Analysis/FlowSensitive/DeterminismTest.cpp:62 +}; +struct Tree{ + int height(); Repository: rG

[PATCH] D154935: [clang][dataflow] Introduce `getFieldValue()` test helpers.

2023-07-11 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp:27 using namespace dataflow; +using test::getFieldValue; using

[PATCH] D153989: [compiler-rt] Move crt into builtins

2023-07-11 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Seems that it caused: https://github.com/llvm/llvm-project/issues/63799 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153989/new/ https://reviews.llvm.org/D153989 ___

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-11 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 539017. koops added a comment. 1. Taking care of Alexy & David suggestions: a) Using update_cc_test_checks.py to generate CHECK statements. b) Change in error message from "handled" to "allowed". c) Adding comments for the bind clause. d) Mangled names of the

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-11 Thread Shreyas via Phabricator via cfe-commits
SAtacker added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:288 + } + for (auto : LazySpecializations) { +Record.push_back(SpecInfo.DeclID); ChuanqiXu wrote: > v.g.vassilev wrote: > > We should not store the lazy

<    1   2   3   >