[PATCH] D153298: [clang-tidy] Extend bugprone-exception-escape diagnostics

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 534169. PiotrZSL added a comment. Use std::map Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153298/new/ https://reviews.llvm.org/D153298 Files: clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cp

[PATCH] D153510: [Clang][RISCV] Check type support for local variable declaration of RVV type

2023-06-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:4968 +void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { + const TargetInfo &TI = Context.getTargetInfo(); + if (Ty->isRVVType(/* Bitwidth */ 64, /* IsFloat */ false) &&

[PATCH] D153510: [Clang][RISCV] Check type support for local variable declaration of RVV type

2023-06-24 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:4968 +void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { + const TargetInfo &TI = Context.getTargetInfo(); + if (Ty->isRVVType(/* Bitwidth */ 64, /* IsFloat */ false) && --

[PATCH] D153510: [Clang][RISCV] Check type support for local variable declaration of RVV type

2023-06-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:4968 +void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { + const TargetInfo &TI = Context.getTargetInfo(); + if (Ty->isRVVType(/* Bitwidth */ 64, /* IsFloat */ false) &&

[PATCH] D153690: [clang][Sema] Remove dead diagnostic for loss of __unaligned qualifier

2023-06-24 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added reviewers: aaron.ballman, cjdb, tbaeder, efriedma, rnk. Herald added a project: All. hazohelet requested review of this revision. Herald added a project: clang. D120936 has made the loss of `__unaligned` qualifier

[PATCH] D153267: [clang][Diagnostics] Provide parameter source range to arity-mismatch notes

2023-06-24 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D153267#4445417 , @cjdb wrote: > Thanks! This LGTM now. Do you need assistance with merging? Thanks for the review! I have commit access now, so I'll be landing this myself. CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D153359: [clang][Diagnostics] Fix distant source ranges in bad-conversion notes

2023-06-24 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet marked an inline comment as done. hazohelet added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:10821 +// FIXME: No test case for this. Can we remove this block? if (FromQs.hasUnaligned() != ToQs.hasUnaligned()) { cjdb wrote: >

[PATCH] D153691: [Driver][ARM] Warn about -mabi= for assembler input

2023-06-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: michaelplatings, peter.smith, simon_tatham, nathanchance. Herald added a subscriber: kristof.beyls. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.

[PATCH] D153510: [Clang][RISCV] Check type support for local variable declaration of RVV type

2023-06-24 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 534172. eopXD added a comment. Add check for RVV types that require at least zve32x Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153510/new/ https://reviews.llvm.org/D153510 Files: clang/include/clang/Sema/Se

[PATCH] D153510: [Clang][RISCV] Check type support for local variable declaration of RVV type

2023-06-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:4967 +void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { + const TargetInfo &TI = Context.getTargetInfo(); What about the bool types? Is it sufficient

[PATCH] D153653: [clang][Interp] Make CXXTemporaryObjectExprs leave a value behind

2023-06-24 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 534174. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153653/new/ https://reviews.llvm.org/D153653 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/records.cpp Index: clang/test/AST/Interp/records.cpp ==

[PATCH] D153510: [Clang][RISCV] Check type support for local variable declaration of RVV type

2023-06-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Does the code do the right FP checks for tuples? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153510/new/ https://reviews.llvm.org/D153510 ___ cfe-commits mailing list cfe-

[PATCH] D153693: [clang][Interp] Handle InitListExprs of composite type

2023-06-24 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. They might appear freestanding, not as part of an

[clang] e5c7904 - [C++20][Modules] Implement P2615R1 revised export diagnostics.

2023-06-24 Thread Iain Sandoe via cfe-commits
Author: Iain Sandoe Date: 2023-06-24T09:01:59+01:00 New Revision: e5c7904fa0bfa5a24f192cfa7b9116560e1f5d43 URL: https://github.com/llvm/llvm-project/commit/e5c7904fa0bfa5a24f192cfa7b9116560e1f5d43 DIFF: https://github.com/llvm/llvm-project/commit/e5c7904fa0bfa5a24f192cfa7b9116560e1f5d43.diff L

[PATCH] D152946: [C++20][Modules] Implement P2615R1 revised export diagnostics.

2023-06-24 Thread Iain Sandoe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. iains marked an inline comment as done. Closed by commit rGe5c7904fa0bf: [C++20][Modules] Implement P2615R1 revised export diagnostics. (authored by iains). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] f3aa6cc - [clang-tidy] Add misc-header-include-cycle check

2023-06-24 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-06-24T08:06:48Z New Revision: f3aa6cc0f5d56752242203c2a9231c1bc230c15e URL: https://github.com/llvm/llvm-project/commit/f3aa6cc0f5d56752242203c2a9231c1bc230c15e DIFF: https://github.com/llvm/llvm-project/commit/f3aa6cc0f5d56752242203c2a9231c1bc230c15e.diff LOG: [

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf3aa6cc0f5d5: [clang-tidy] Add misc-header-include-cycle check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://rev

[PATCH] D153510: [Clang][RISCV] Check type support for local variable declaration of RVV type

2023-06-24 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 534179. eopXD added a comment. Add test coverage for tuple types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153510/new/ https://reviews.llvm.org/D153510 Files: clang/include/clang/Sema/Sema.h clang/lib/S

[clang-tools-extra] 071b129 - Revert "[clang-tidy] Add misc-header-include-cycle check"

2023-06-24 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-06-24T08:41:52Z New Revision: 071b129b64537eedf94b8fdf92e09a8fcb7a827f URL: https://github.com/llvm/llvm-project/commit/071b129b64537eedf94b8fdf92e09a8fcb7a827f DIFF: https://github.com/llvm/llvm-project/commit/071b129b64537eedf94b8fdf92e09a8fcb7a827f.diff LOG: R

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 534183. PiotrZSL added a comment. Reorder warnigns & copy .cpp file to Output Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/m

[PATCH] D153536: [Clang] Implement P2169 A nice placeholder with no name

2023-06-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534185. cor3ntin added a comment. - Address Shafik's an Erich's comments - Add missing serialization code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153536/new/ https://reviews.llvm.org/D153536 Files: cl

[PATCH] D153695: [clang][Interp] Fix passing parameters of composite type

2023-06-24 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We pass these as pointers, so we need to be caref

[PATCH] D153536: [Clang] Implement P2169 A nice placeholder with no name

2023-06-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 3 inline comments as done. cor3ntin added inline comments. Comment at: clang/lib/AST/Decl.cpp:1831 + // Objective-C as an extension. + if (isa(this) && getLangOpts().ObjC) return true; shafik wrote: > It is not obvious to me if this is a dr

[PATCH] D153694: [clang][CodeGen] Remove no-op EmitCastToVoidPtr

2023-06-24 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 created this revision. Herald added a project: All. barannikov88 updated this revision to Diff 534190. barannikov88 added a comment. barannikov88 added reviewers: nikic, JOE1994. barannikov88 published this revision for review. Herald added subscribers: cfe-commits, StephenFan. Herald

[PATCH] D153641: [clang-format] Preserve AmpAmpTokenType in nested parentheses

2023-06-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. In D153641#465 , @rymiel wrote: > @HazardyKnusperkeks I'm not sure why it didn't recurse already, given that > you even do

[clang-tools-extra] 7f6e005 - [clang-tidy] Add misc-header-include-cycle check

2023-06-24 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-06-24T11:00:13Z New Revision: 7f6e0052a97f13a5f595f3fd0c135c2c4db119d4 URL: https://github.com/llvm/llvm-project/commit/7f6e0052a97f13a5f595f3fd0c135c2c4db119d4 DIFF: https://github.com/llvm/llvm-project/commit/7f6e0052a97f13a5f595f3fd0c135c2c4db119d4.diff LOG: [

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7f6e0052a97f: [clang-tidy] Add misc-header-include-cycle check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://rev

[PATCH] D153694: [clang][CodeGen] Remove no-op EmitCastToVoidPtr (NFC)

2023-06-24 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/CGAtomic.cpp:90 +StoragePtr = CGF.Builder.CreateAddrSpaceCast( +StoragePtr, llvm::PointerType::getUnqual(CGF.getLLVMContext()), "atomic_bitfield_base"); I suppose a

[PATCH] D153699: [clang] Fix pretty-printing for variables declared in a for-loop condition

2023-06-24 Thread Vaibhav Thakkar via Phabricator via cfe-commits
vaithak created this revision. Herald added a project: All. vaithak requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D153699 Files: clang/lib/AST/StmtPrinter.cpp clang/test

[PATCH] D153590: Don't use float_t and double_t with #pragma clang fp eval_method.

2023-06-24 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. This change causes test regressions on 32-bit x86: FAIL: Clang :: Sema/fp-eval-pragma-with-float-double_t-3.c (14665 of 17845) TEST 'Clang :: Sema/fp-eval-pragma-with-float-double_t-3.c' FAILED Script: -- : 'RUN: at line

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534201. cor3ntin added a comment. Address Shafik's comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D105759 Files: clang-tools-extra/test/clang-tidy/checkers/modern

[PATCH] D153197: [AVR] Expand shifts during AVRISelLowering

2023-06-24 Thread Patryk Wychowaniec via Phabricator via cfe-commits
Patryk27 added a comment. Now that I think about it, there //might// be a simpler way! So, the underlying issue is that sometimes LLVM spawns new shifts during the instruction selection pass - for instance given this IR¹: define i64 @test(i64 %x, i32 %y) { start: %0 = or i32 %y, 38

[PATCH] D153694: [clang][CodeGen] Remove no-op EmitCastToVoidPtr (NFC)

2023-06-24 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:1473 QualType SrcRecordTy, QualType DestTy) { auto *ClassDecl = barannikov88 wrot

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Mike Crowe via Phabricator via cfe-commits
mikecrowe marked 7 inline comments as done. mikecrowe added a comment. I'm still working on the remaining items. Comment at: clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp:230 +return conversionNotPossible("'%m' is not supported in format string"); + } else {

[PATCH] D153694: [clang][CodeGen] Remove no-op EmitCastToVoidPtr (NFC)

2023-06-24 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 534205. barannikov88 added a comment. - Remove unused argument of EmitDynamicCastToVoid - While here, adjust the name to start with lowercase letter Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153694/new/

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst:117 + +.. option:: PrintFunction + mikecrowe wrote: > PiotrZSL wrote: > > mikecrowe wrote: > > > Is `PrintFunction` (and the soon-to-arrive `PrintlnF

[PATCH] D153701: [clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-06-24 Thread Yurong via Phabricator via cfe-commits
yronglin created this revision. Herald added a project: All. yronglin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: yronglin Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D153701 Files: clang/docs/Re

[clang-tools-extra] 67e05d3 - [clang-tidy] Fix false negative in readability-convert-member-functions-to-static

2023-06-24 Thread Piotr Zegar via cfe-commits
Author: Nathan James Date: 2023-06-24T14:35:11Z New Revision: 67e05d380c2253319c22451d340e2e3c2043b6d8 URL: https://github.com/llvm/llvm-project/commit/67e05d380c2253319c22451d340e2e3c2043b6d8 DIFF: https://github.com/llvm/llvm-project/commit/67e05d380c2253319c22451d340e2e3c2043b6d8.diff LOG:

[PATCH] D130665: [clang-tidy] Fix false negative in readability-convert-member-functions-to-static

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG67e05d380c22: [clang-tidy] Fix false negative in readability-convert-member-functions-to… (authored by njames93, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D130665?vs=448

[PATCH] D153701: [clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-06-24 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 534212. yronglin added a comment. Update c++ status Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153701/new/ https://reviews.llvm.org/D153701 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/De

[PATCH] D153702: [Clang] Implement P2738R1 - constexpr cast from void*

2023-06-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a project: All. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D153702 Files: clang/docs/ReleaseNotes.rst clang/incl

[PATCH] D153694: [clang][CodeGen] Remove no-op EmitCastToVoidPtr (NFC)

2023-06-24 Thread Youngsuk Kim via Phabricator via cfe-commits
JOE1994 added inline comments. Comment at: clang/lib/CodeGen/CGAtomic.cpp:90 +StoragePtr = CGF.Builder.CreateAddrSpaceCast( +StoragePtr, llvm::PointerType::getUnqual(CGF.getLLVMContext()), "atomic_bitfield_base"); barannikov88 wro

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Mike Crowe via Phabricator via cfe-commits
mikecrowe marked 4 inline comments as done. mikecrowe added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp:384-397 +const auto StringDecl = type(hasUnqualifiedDesugaredType(recordType( +hasDeclaration(cxxRecordDecl(ha

[PATCH] D153641: [clang-format] Preserve AmpAmpTokenType in nested parentheses

2023-06-24 Thread Emilia Kond via Phabricator via cfe-commits
rymiel updated this revision to Diff 534220. rymiel added a comment. Add annotator test cases involving a lambda Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153641/new/ https://reviews.llvm.org/D153641 Files: clang/lib/Format/UnwrappedLinePars

[PATCH] D153228: [clang-format] Fixed bad performance with enabled qualifier fixer.

2023-06-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. For us to land this for you we'll need your name and email Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153228/new/ https://reviews.llvm.org/D153228 ___ cfe-commits maili

[PATCH] D153699: [clang] Fix pretty-printing for variables declared in a for-loop condition

2023-06-24 Thread Vaibhav Thakkar via Phabricator via cfe-commits
vaithak updated this revision to Diff 534223. vaithak added a comment. rebased on the latest changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153699/new/ https://reviews.llvm.org/D153699 Files: clang/lib/AST/StmtPrinter.cpp clang/test/PCH

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst:29 +- It assumes that the format string is correct for the arguments. If you + get any warnings when compiling with ``-Wformat`` then misbehaviour is + possib

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Mike Crowe via Phabricator via cfe-commits
mikecrowe added a comment. @Eugene.Zelenko, I will make the documentation changes you've suggested, but I can't say I really understand which document elements require single backticks and which require dual backticks. https://llvm.org/docs/SphinxQuickstartTemplate.html seems to imply that sing

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D149280#4446591 , @mikecrowe wrote: > @Eugene.Zelenko, > I will make the documentation changes you've suggested, but I can't say I > really understand which document elements require single backticks and which > requir

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseStdPrintCheck.cpp:37 + + if (PrintfLikeFunctions.empty() && FprintfLikeFunctions.empty()) { +PrintfLikeFunctions.push_back("::printf"); tho

[PATCH] D153582: [SystemZ][z/OS] Add required options/macro/etc for z/os compilation step

2023-06-24 Thread Sean via Phabricator via cfe-commits
SeanP updated this revision to Diff 534232. SeanP added a comment. Removed __ptr32 address space from data layout. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153582/new/ https://reviews.llvm.org/D153582 Files: clang/include/clang/Driver/Options.td clang/lib/Basic/Targets/OSTarge

[PATCH] D153296: [AST] Stop evaluate constant expression if the condition expression which in switch statement contains errors

2023-06-24 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. In D153296#612 , @erichkeane wrote: > So I think I'm pretty confident that the only time we would call > `EvaluateDependentExpr` is when we are in an error condition, so I'm > convinced the fix 'as is' is incorrect. The c

[PATCH] D153699: [clang] Fix pretty-printing for variables declared in a for-loop condition

2023-06-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thanks! `Node->getConditionVariableDeclStmt()` is how `StmtPrinter::VisitWhileStmt` prints the declaration in the condition. https://reviews.llvm.org/D102502 added `PCH/for-loop-init-ternar

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-24 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n created this revision. xen0n added reviewers: SixWeining, wangleiat, hev, xry111, MaskRay. Herald added a subscriber: tpr. Herald added a project: All. xen0n requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This kind of CLI flags dupli

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-24 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n updated this revision to Diff 534241. xen0n added a comment. Fix faulty refactor (unintended always-error case). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153707/new/ https://reviews.llvm.org/D153707 Files: clang/include/clang/Basic/Di

[PATCH] D148958: Size and element numbers are often swapped when calling calloc

2023-06-24 Thread Alf via Phabricator via cfe-commits
gAlfonso-bit updated this revision to Diff 534242. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148958/new/ https://reviews.llvm.org/D148958 Files: clang/test/Analysis/malloc.mm clang/test/Analysis/uninit-vals.m clang/test/CodeGen/alloc-size.c compiler-rt/lib/profile/InstrProfil

[PATCH] D148958: Size and element numbers are often swapped when calling calloc

2023-06-24 Thread Alf via Phabricator via cfe-commits
gAlfonso-bit updated this revision to Diff 534244. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148958/new/ https://reviews.llvm.org/D148958 Files: clang/test/Analysis/malloc.mm clang/test/Analysis/uninit-vals.m clang/test/CodeGen/alloc-size.c compiler-rt/lib/profile/InstrProfil

[PATCH] D153699: [clang] Fix pretty-printing for variables declared in a for-loop condition

2023-06-24 Thread Vaibhav Thakkar via Phabricator via cfe-commits
vaithak added a comment. Please commit this change for me as I don't have commit access. Thanks 👍 My details: "Vaibhav Thakkar" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153699/new/ https://reviews.llvm.org/D153699 ___

[PATCH] D147714: [Attr] Introduce [[clang::nonportable_musttail]] as less strict version of [[clang::musttail]]

2023-06-24 Thread YAMAMOTO Takashi via Phabricator via cfe-commits
yamt added a comment. > musttail provide assurances that the tail call can be optimized on all > targets. Such a definition doesn't make much sense because for some targets tail call optimization isn't available at all. Eg. Wasm w/o tail call proposal, xtensa windowed abi. So I'm not sure what

[PATCH] D147714: [Attr] Introduce [[clang::nonportable_musttail]] as less strict version of [[clang::musttail]]

2023-06-24 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D147714#4446780 , @yamt wrote: >> musttail provide assurances that the tail call can be optimized on all >> targets. > > Such a definition doesn't make much sense because for some targets tail call > optimization isn't avail

[PATCH] D147714: [Attr] Introduce [[clang::nonportable_musttail]] as less strict version of [[clang::musttail]]

2023-06-24 Thread Josh Haberman via Phabricator via cfe-commits
haberman added a comment. > Such a definition doesn't make much sense because for some targets tail call > optimization isn't available at all. > Eg. Wasm w/o tail call proposal, xtensa windowed abi. That is true. But what is the correct behavior if you try to use `[[clang::musttail]]` on such

[PATCH] D147714: [Attr] Introduce [[clang::nonportable_musttail]] as less strict version of [[clang::musttail]]

2023-06-24 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D147714#4446809 , @haberman wrote: >> Such a definition doesn't make much sense because for some targets tail call >> optimization isn't available at all. >> Eg. Wasm w/o tail call proposal, xtensa windowed abi. > > That is t

[PATCH] D153510: [Clang][RISCV] Check type support for local variable declaration of RVV type

2023-06-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:4967 +void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { + const TargetInfo &TI = Context.getTargetInfo(); craig.topper wrote: > What about the bool ty

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Mike Crowe via Phabricator via cfe-commits
mikecrowe marked 2 inline comments as done. mikecrowe added a comment. Thanks for the further reviews. Comment at: clang-tools-extra/clang-tidy/modernize/UseStdPrintCheck.cpp:37 + + if (PrintfLikeFunctions.empty() && FprintfLikeFunctions.empty()) { +PrintfLikeFunctions.pus

[PATCH] D147714: [Attr] Introduce [[clang::nonportable_musttail]] as less strict version of [[clang::musttail]]

2023-06-24 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> If all you want is (1), that doesn't require any attribute (the optimizer >> will do it automatically). Not entirely true, as compiler can do anything. In some cases you really need *musttail* (in llvm IR) to get or preserve tail call. CHANGES SINCE LAST ACTION

[PATCH] D147714: [Attr] Introduce [[clang::nonportable_musttail]] as less strict version of [[clang::musttail]]

2023-06-24 Thread Josh Haberman via Phabricator via cfe-commits
haberman added a comment. I think I misunderstood @yamt's comment in https://reviews.llvm.org/D147714#4446780. I take back what I wrote above. I agree that `[[clang::nonportable_musttail]]` is a nicer semantic, and the restrictions around the existing `[[clang:musttail]]` don't seem to buy us v

[PATCH] D153001: [clang][ThreadSafety] Add __builtin_instance_member (WIP)

2023-06-24 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. I'm wondering why you chose this over a direct equivalent to `this`, say `__builtin_instance()`, such that instead of `__builtin_instance_member(M)` one would write `__builtin_instance().M` or `__builtin_instance()->M`? While allowing to reference the same fields,

[PATCH] D152504: [clang][ThreadSafety] Analyze cleanup functions

2023-06-24 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang/lib/Analysis/ThreadSafety.cpp:2436 +CF.getVarDecl()->getLocation()); + break; +} tbaeder wrote: > This handles the function call, but without the instance p

[PATCH] D152785: [COFF] Support -gsplit-dwarf for COFF on Windows

2023-06-24 Thread Haohai, Wen via Phabricator via cfe-commits
HaohaiWen added a comment. @MaskRay, any other comments? I'd like to land this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152785/new/ https://reviews.llvm.org/D152785 ___ cfe-commits mailing li

[clang] df8d6d9 - [clang] Fix pretty-printing for variables declared in a for-loop condition

2023-06-24 Thread Fangrui Song via cfe-commits
Author: Vaibhav Thakkar Date: 2023-06-24T19:27:10-07:00 New Revision: df8d6d95ca64c70b3acc5a4266326966f3e6f93e URL: https://github.com/llvm/llvm-project/commit/df8d6d95ca64c70b3acc5a4266326966f3e6f93e DIFF: https://github.com/llvm/llvm-project/commit/df8d6d95ca64c70b3acc5a4266326966f3e6f93e.dif

[PATCH] D153714: [NFC] Add missing cpu tests in predefined-arch-macros.c

2023-06-24 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a project: All. FreddyYe requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Added tests for penryn, nehalem, westmere, sandybridge, ivybridge, haswell, bonnell, silvermont. Repository: rG LLVM G

[clang] 3eee5aa - [COFF] Support -gsplit-dwarf for COFF on Windows

2023-06-24 Thread via cfe-commits
Author: Haohai Wen Date: 2023-06-25T11:54:39+08:00 New Revision: 3eee5aa528abd67bb6d057e25ce1980d0d38c445 URL: https://github.com/llvm/llvm-project/commit/3eee5aa528abd67bb6d057e25ce1980d0d38c445 DIFF: https://github.com/llvm/llvm-project/commit/3eee5aa528abd67bb6d057e25ce1980d0d38c445.diff LO

[PATCH] D152785: [COFF] Support -gsplit-dwarf for COFF on Windows

2023-06-24 Thread Haohai, Wen via Phabricator via cfe-commits
HaohaiWen closed this revision. HaohaiWen added a comment. Thanks. This patch has been landed. https://github.com/llvm/llvm-project/commit/3eee5aa528abd67bb6d057e25ce1980d0d38c445 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152785/new/ https://r