[PATCH] D146408: [clang][Interp] Start supporting complex types

2023-03-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/PrimType.h:108 +switch (Expr) { \ + TYPE_SWITCH_CASE(PT_Sint8, B) \ + TYPE_SWITCH_CASE(PT_Uint8,

[PATCH] D147111: [clang-format] Add MinDigits suboptions to IntegerLiteralSeparator

2023-03-28 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: MyDeveloperDay, HazardyKnusperkeks, rymiel. owenpan added a project: clang-format. Herald added a project: All. owenpan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Closes

[PATCH] D126959: [C++20][Modules] Introduce an implementation module.

2023-03-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Lex/ModuleMap.cpp:935 + // with any legal user-defined module name). + StringRef IName = ".ImplementationUnit"; + assert(!Modules[IName] && "multiple implementation units?"); iains wrote: > ChuanqiXu

[PATCH] D126959: [C++20][Modules] Introduce an implementation module.

2023-03-28 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked an inline comment as done. iains added inline comments. Comment at: clang/lib/Lex/ModuleMap.cpp:935 + // with any legal user-defined module name). + StringRef IName = ".ImplementationUnit"; + assert(!Modules[IName] && "multiple implementation units?");

[PATCH] D145726: Fix assembler error when -g and -gdwarf-* is passed with -fno-integrated-as.

2023-03-28 Thread garvit gupta via Phabricator via cfe-commits
garvitgupta08 added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:980-981 +StringRef BaseInput = StringRef(II.getBaseInput()); +types::ID InputType = types::lookupTypeForExtension( +llvm::sys::path::extension(BaseInput).drop_front()); +if

[PATCH] D145726: Fix assembler error when -g and -gdwarf-* is passed with -fno-integrated-as.

2023-03-28 Thread garvit gupta via Phabricator via cfe-commits
garvitgupta08 added a comment. In D145726#4228406 , @MaskRay wrote: > Please update the commit message and comment about what binutils versions > reject the construct. I already added this - "Due to this we started seeing below assembler error with GNU

[PATCH] D126959: [C++20][Modules] Introduce an implementation module.

2023-03-28 Thread Iain Sandoe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6e4f870a21e3: re-land [C++20][Modules] Introduce an implementation module. (authored by iains). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126959/new/

[clang] 6e4f870 - re-land [C++20][Modules] Introduce an implementation module.

2023-03-28 Thread Iain Sandoe via cfe-commits
Author: Iain Sandoe Date: 2023-03-29T08:52:28+05:30 New Revision: 6e4f870a21e344fdcd61fe613b0aeeafb8a84ed2 URL: https://github.com/llvm/llvm-project/commit/6e4f870a21e344fdcd61fe613b0aeeafb8a84ed2 DIFF: https://github.com/llvm/llvm-project/commit/6e4f870a21e344fdcd61fe613b0aeeafb8a84ed2.diff

[clang] 279c7a2 - Revert "[C++20] [Modules] Don't load declaration eagerly for named modules"

2023-03-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-03-29T11:15:38+08:00 New Revision: 279c7a2f17937836ed13e359c3fb381bef7defaf URL: https://github.com/llvm/llvm-project/commit/279c7a2f17937836ed13e359c3fb381bef7defaf DIFF: https://github.com/llvm/llvm-project/commit/279c7a2f17937836ed13e359c3fb381bef7defaf.diff

[PATCH] D146926: [clang-format] Add option to decorate reflowed block comments

2023-03-28 Thread Adheesh Wadkar via Phabricator via cfe-commits
apwadkar added inline comments. Comment at: clang/lib/Format/BreakableToken.cpp:406 Decoration = "* "; - if (Lines.size() == 1 && !FirstInLine) { + if ((Lines.size() == 1 && !FirstInLine) || !Style.DecorateReflowedComments) { // Comments for which FirstInLine is false

[clang] 766d048 - [clang-repl] Use std::move when converting Error to Expected

2023-03-28 Thread Anubhab Ghosh via cfe-commits
Author: Anubhab Ghosh Date: 2023-03-29T08:18:36+05:30 New Revision: 766d048d819a78443da73f67afa04e0a108412b6 URL: https://github.com/llvm/llvm-project/commit/766d048d819a78443da73f67afa04e0a108412b6 DIFF: https://github.com/llvm/llvm-project/commit/766d048d819a78443da73f67afa04e0a108412b6.diff

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-28 Thread Anubhab Ghosh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd978730d8e2c: [clang-repl] Add a command to load dynamic libraries (authored by argentite). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141824/new/

[clang] d978730 - [clang-repl] Add a command to load dynamic libraries

2023-03-28 Thread Anubhab Ghosh via cfe-commits
Author: Anubhab Ghosh Date: 2023-03-29T08:04:50+05:30 New Revision: d978730d8e2c10c76867b83bec2f1143d895ee7d URL: https://github.com/llvm/llvm-project/commit/d978730d8e2c10c76867b83bec2f1143d895ee7d DIFF: https://github.com/llvm/llvm-project/commit/d978730d8e2c10c76867b83bec2f1143d895ee7d.diff

[PATCH] D147030: [Clang][Driver] Default Generic_GCC::IsIntegratedAssemblerDefault to true

2023-03-28 Thread Brad Smith 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 rGd44371c00d87: [Clang][Driver] Default Generic_GCC::IsIntegratedAssemblerDefault to true (authored by brad). Repository: rG LLVM Github Monorepo

[clang] d44371c - [Clang][Driver] Default Generic_GCC::IsIntegratedAssemblerDefault to true

2023-03-28 Thread Brad Smith via cfe-commits
Author: Brad Smith Date: 2023-03-28T22:26:18-04:00 New Revision: d44371c00d87f73aba4ba0feafb4a18151d6f831 URL: https://github.com/llvm/llvm-project/commit/d44371c00d87f73aba4ba0feafb4a18151d6f831 DIFF: https://github.com/llvm/llvm-project/commit/d44371c00d87f73aba4ba0feafb4a18151d6f831.diff

[PATCH] D145852: [Clang][AST] Fix __has_unique_object_representations computation for unnamed bitfields.

2023-03-28 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/SemaCXX/type-traits.cpp:2886-2889 +struct UnnamedEmptyBitfield { + int named; + int : 0; +}; royjacobson wrote: > royjacobson wrote: > > shafik wrote: > > > aaron.ballman wrote: > > > > I think there's one

[PATCH] D126959: [C++20][Modules] Introduce an implementation module.

2023-03-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added inline comments. Comment at: clang/lib/Lex/ModuleMap.cpp:935 + // with any legal user-defined module name). + StringRef IName = ".ImplementationUnit"; + assert(!Modules[IName] && "multiple implementation units?");

[PATCH] D146758: Fix codegen for coroutine with function-try-block

2023-03-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. Since the patch itself is good and not large. Let me handle the trivial refactoring later. Comment at: clang/lib/CodeGen/CGCoroutine.cpp:724-730 + Stmt

[PATCH] D147097: [SYCL] Always set NoUnwind attribute for SYCL.

2023-03-28 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. > That's a good question. I haven't looked into this issue deep enough, but I > think using -fexceptions requires using delayed diagnostics to avoid false > diagnostics during host code analysis. I am assuming you mean `-fno-exceptions` (or, in `clang -cc1`, the absence

[PATCH] D147097: [SYCL] Always set NoUnwind attribute for SYCL.

2023-03-28 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. @hvdijk, thanks a lot for fixing this. In D147097#4229121 , @hvdijk wrote: > Is the rationale I gave in the description correct, or would it be better for > SYCL device code to unconditionally build without `-fexceptions` and get

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-28 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D146358#4229120 , @hazohelet wrote: > In D146358#4227938 , @cjdb wrote: > >> In D146358#4204412 , @tbaeder >> wrote: >> >>> "subobject named

[PATCH] D147097: [SYCL] Always set NoUnwind attribute for SYCL.

2023-03-28 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. Is the rationale I gave in the description correct, or would it be better for SYCL device code to unconditionally build without `-fexceptions` and get the `nounwind` attribute added that way? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-28 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D146358#4227938 , @cjdb wrote: > In D146358#4204412 , @tbaeder wrote: > >> "subobject named 'foo'" sounds a bit weird to me, I'd expect just "subobject >> 'foo'", but that's just a

[PATCH] D147097: [SYCL] Always set NoUnwind attribute for SYCL.

2023-03-28 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk created this revision. hvdijk added a reviewer: bader. hvdijk added a project: clang. Herald added subscribers: Naghasan, Anastasia, ebevhan, yaxunl. Herald added a project: All. hvdijk requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers:

[PATCH] D144190: [AIX][clang] Storage Locations for Constant Pointers

2023-03-28 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:125 + // The `-mroptr` option places constants in RO sections as much as possible. + // Then `-bforceimprw` changes such sections to RW if they contain imported Old

[PATCH] D144190: [AIX][clang] Storage Locations for Constant Pointers

2023-03-28 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/docs/ReleaseNotes.rst:317 + ``-fno-data-sections``. When ``-mxcoff-roptr`` is in effect at link time, + read-only data sections with relocatable address values that resolve to + imported symbols are made

[PATCH] D146678: Summary: Fix ArgsAsWritten being null for ConceptSpecializationExpr in certain circumstances when parsing ASTs

2023-03-28 Thread Walter Gray via Phabricator via cfe-commits
yeswalrus added a comment. In D146678#4220408 , @erichkeane wrote: > In D146678#4220360 , @yeswalrus > wrote: > >> -I can handle it. - >> Edit: I cannot handle it, I don't have commit access. If you could

[PATCH] D146678: Summary: Fix ArgsAsWritten being null for ConceptSpecializationExpr in certain circumstances when parsing ASTs

2023-03-28 Thread Walter Gray via Phabricator via cfe-commits
yeswalrus updated this revision to Diff 509175. yeswalrus retitled this revision from "Fix unexpected nullptr in ConceptSpecializationExpr's ArgsAsWritten field" to "Summary: Fix ArgsAsWritten being null for ConceptSpecializationExpr in certain circumstances when parsing ASTs". yeswalrus added

[PATCH] D146758: Fix codegen for coroutine with function-try-block

2023-03-28 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added inline comments. Comment at: clang/lib/CodeGen/CGCoroutine.cpp:724-730 + Stmt *BodyStmt = S.getBody(); + CompoundStmt *Body = dyn_cast(BodyStmt); + if (Body == nullptr) { +Body = +CompoundStmt::Create(getContext(), {BodyStmt},

[PATCH] D146758: Fix codegen for coroutine with function-try-block

2023-03-28 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB updated this revision to Diff 509173. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146758/new/ https://reviews.llvm.org/D146758 Files: clang/include/clang/AST/StmtCXX.h clang/lib/AST/ASTImporter.cpp clang/lib/AST/StmtCXX.cpp

[PATCH] D144190: [AIX][clang] Storage Locations for Constant Pointers

2023-03-28 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:647 +def err_roptr_requires_data_sections: Error<"-mxcoff-roptr is supported only with -fdata-sections">; +def err_roptr_cannot_build_shared: Error<"-mxcoff-roptr is not

[PATCH] D147070: Improve requirement clause limitation on non templated function

2023-03-28 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/dcl.decl/dcl.decl.general/p4-20.cpp:27 + +namespace GH61748 { +template Maybe a union case just for completeness: ``` template union U { void f() requires true; }; ``` CHANGES SINCE LAST ACTION

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-28 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 509160. ayzhao marked an inline comment as done. ayzhao added a comment. fix stray whitespace change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146465/new/ https://reviews.llvm.org/D146465 Files:

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-28 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked 2 inline comments as done. ayzhao added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:1582-1596 + MultiExprArg ExprsToPass; + if (Exprs.size() == 1 && isa(Exprs[0])) { +// C++20 [expr.static.cast]p4: +// An expression E can be explicitly

[PATCH] D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-28 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 509158. ayzhao added a comment. use ParenListExpr and fix getSubExprAsWritten(...) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146465/new/ https://reviews.llvm.org/D146465 Files: clang/lib/AST/Expr.cpp

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-28 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1665-1669 + const auto DesignatedInitializerIndentWidth = + Style.DesignatedInitializerIndentWidth < 0 + ? Style.ContinuationIndentWidth + :

[PATCH] D146669: [-Wunsafe-buffer-usage] Hide fixits/suggestions behind an extra flag, -fsafe-buffer-usage-suggestions.

2023-03-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. So in a nutshell, this is the intended behavior: | code | diagnostic | EmitFixits && EmitSuggestions | !EmitFixits && EmitSuggestions | !EmitFixits && !EmitSuggestions | |

[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Anshil Gandhi 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 rGa955a3189637: [AMDGPU] Replace target feature for global fadd32 (authored by gandhi21299). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] a955a31 - [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Anshil Gandhi via cfe-commits
Author: Anshil Gandhi Date: 2023-03-28T15:58:30-06:00 New Revision: a955a31896370b67c6490251eca0095295d55f1f URL: https://github.com/llvm/llvm-project/commit/a955a31896370b67c6490251eca0095295d55f1f DIFF: https://github.com/llvm/llvm-project/commit/a955a31896370b67c6490251eca0095295d55f1f.diff

[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Brian Sumner via Phabricator via cfe-commits
b-sumner added a comment. No objection here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146840/new/ https://reviews.llvm.org/D146840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D147070: Improve requirement clause limitation on non templated function

2023-03-28 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. LGTM Comment at: clang/lib/Sema/SemaDecl.cpp:11877 // member-declarator shall be present only if the declarator declares a // templated function ([dcl.fct]). if (Expr *TRC =

[clang] 9f15f1f - [analyzer] Teach scan-build how to pass -analyzer-config to xcodebuild.

2023-03-28 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2023-03-28T14:34:28-07:00 New Revision: 9f15f1f0f3f58da8600c78c60032299f5ee4d6c5 URL: https://github.com/llvm/llvm-project/commit/9f15f1f0f3f58da8600c78c60032299f5ee4d6c5 DIFF:

[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Sounds good, thanks the review @rampitec Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146840/new/ https://reviews.llvm.org/D146840 ___ cfe-commits mailing list

[PATCH] D147081: [clang-tidy] Fix issues in bugprone-assert-side-effect

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 509141. PiotrZSL added a comment. Fix auto Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147081/new/ https://reviews.llvm.org/D147081 Files: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp

[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec accepted this revision. rampitec added a comment. This revision is now accepted and ready to land. LGTM. Please wait for @b-sumner. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146840/new/ https://reviews.llvm.org/D146840

[PATCH] D146995: [clang-format][NFC] Refactor unit tests for "LambdaBodyIndentation: OuterScope" option.

2023-03-28 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. > You need to state a name and email for the commit. Name: Jon Phillips Email: jonap2...@gmail.com Also, thanks for relating the child diff to this one. I couldn't see how to do it at first but have seen the option now. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D146887: [clang-tidy] Fix if-constexpr false-positive in readability-misleading-indentation

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 509136. PiotrZSL added a comment. Move tests to new file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146887/new/ https://reviews.llvm.org/D146887 Files:

[PATCH] D147081: [clang-tidy] Fix issues in bugprone-assert-side-effect

2023-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp:66 + + const auto *FuncDecl = CExpr->getDirectCallee(); + if (!FuncDecl || !FuncDecl->getDeclName().isIdentifier()) PiotrZSL wrote: >

[PATCH] D147081: [clang-tidy] Fix issues in bugprone-assert-side-effect

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp:66 + + const auto *FuncDecl = CExpr->getDirectCallee(); + if (!FuncDecl || !FuncDecl->getDeclName().isIdentifier()) Eugene.Zelenko wrote: > Please do

[PATCH] D146459: [clang][PowerPC] Remove remaining Darwin support

2023-03-28 Thread David Tenty via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2fe49ea0d07d: [clang][PowerPC] Remove remaining Darwin support (authored by daltenty). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior to commit:

[clang] 2fe49ea - [clang][PowerPC] Remove remaining Darwin support

2023-03-28 Thread David Tenty via cfe-commits
Author: David Tenty Date: 2023-03-28T17:12:49-04:00 New Revision: 2fe49ea0d07d503aedd0872bf0a66724552d4dcf URL: https://github.com/llvm/llvm-project/commit/2fe49ea0d07d503aedd0872bf0a66724552d4dcf DIFF: https://github.com/llvm/llvm-project/commit/2fe49ea0d07d503aedd0872bf0a66724552d4dcf.diff

[PATCH] D147081: [clang-tidy] Fix issues in bugprone-assert-side-effect

2023-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp:66 + + const auto *FuncDecl = CExpr->getDirectCallee(); + if (!FuncDecl || !FuncDecl->getDeclName().isIdentifier()) Please do not use `auto` if

[PATCH] D145803: [clang][DebugInfo] Emit DW_AT_type of preferred name if available

2023-03-28 Thread Michael Buch via Phabricator via cfe-commits
Michael137 added a comment. In D145803#4220124 , @wolfgangp wrote: > In D145803#4219894 , @probinson > wrote: > >> This is pretty different from the "always desugar to the canonical type" >> habit that has

[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 509127. gandhi21299 added a comment. - Adding tests for gfx90a and gfx940 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146840/new/ https://reviews.llvm.org/D146840 Files:

[PATCH] D146875: [clang-tidy] Fix example provided by add_new_check.py

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I know that it would be better, best would be to remove that --fix-notes completely and enable those notes fixes with basic --fix, as it only create confusion. Originally it were like this: "Added an option to control whether to apply the fixes found in notes attached

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-28 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1665-1669 + const auto DesignatedInitializerIndentWidth = + Style.DesignatedInitializerIndentWidth < 0 + ? Style.ContinuationIndentWidth + :

[PATCH] D147081: [clang-tidy] Fix issues in bugprone-assert-side-effect

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. - Fixed problem when

[PATCH] D144190: [AIX][clang] Storage Locations for Constant Pointers

2023-03-28 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 added a comment. The new option is renamed to `-mxcoff-roptr` to avoid confusions if we are using it during a pure linking job on non-AIX platforms. The option name now implies that it applies to XCOFF only, so silently ignoring the option on other platforms is not that serious a

[PATCH] D144190: [AIX][clang] Storage Locations for Constant Pointers

2023-03-28 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 updated this revision to Diff 509118. qiongsiwu1 edited the summary of this revision. qiongsiwu1 added a comment. Renaming the `-mroptr` option to `-mxcoff-roptr`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144190/new/

[clang-tools-extra] 4d4c0f9 - [clang-tidy] Add option to ignore capture default by reference in cppcoreguidelines-avoid-capture-default-when-capturing-this

2023-03-28 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-03-28T20:36:34Z New Revision: 4d4c0f9734607bb0423593b060b8fa73c06fe3d3 URL: https://github.com/llvm/llvm-project/commit/4d4c0f9734607bb0423593b060b8fa73c06fe3d3 DIFF: https://github.com/llvm/llvm-project/commit/4d4c0f9734607bb0423593b060b8fa73c06fe3d3.diff

[PATCH] D147062: [clang-tidy] Add option to ignore capture default by reference in cppcoreguidelines-avoid-capture-default-when-capturing-this

2023-03-28 Thread Carlos Galvez 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 rG4d4c0f973460: [clang-tidy] Add option to ignore capture default by reference in… (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo

[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added a comment. Can you please also add gfx90a and gfx940 tests? Otherwise LGTM *if* @b-sumner has no objections. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146840/new/ https://reviews.llvm.org/D146840

[PATCH] D146908: [clang][MinGW] Add asan DLL lib before other libs and objects

2023-03-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/test/Driver/mingw-sanitizers.c:2 +// RUN: touch %t.a +// RUN: %clang -target i686-windows-gnu %s -### -fsanitize=address -lcomponent %/t.a 2>&1 | FileCheck --check-prefixes=ASAN-ALL,ASAN-I686 -DINPUT=%/t.a %s +// RUN: %clang

[PATCH] D145726: Fix assembler error when -g and -gdwarf-* is passed with -fno-integrated-as.

2023-03-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers requested changes to this revision. nickdesaulniers added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:980-981 +StringRef BaseInput = StringRef(II.getBaseInput()); +types::ID InputType =

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-28 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. How is this attribute going to handle a trampoline that performs a virtual dispatch from C++ call into Swift? In that case, the target is not known. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146595/new/

[PATCH] D147062: [clang-tidy] Add option to ignore capture default by reference in cppcoreguidelines-avoid-capture-default-when-capturing-this

2023-03-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D147062#4228403 , @ccotter wrote: > If https://github.com/isocpp/CppCoreGuidelines/issues/2060 is accepted to > only consider `[=]`, then I assume we'd want to change the default value of >

[PATCH] D146908: [clang][MinGW] Add asan DLL lib before other libs and objects

2023-03-28 Thread Alvin Wong via Phabricator via cfe-commits
alvinhochun added inline comments. Comment at: clang/test/Driver/mingw-sanitizers.c:2 +// RUN: touch %t.a +// RUN: %clang -target i686-windows-gnu %s -### -fsanitize=address -lcomponent %/t.a 2>&1 | FileCheck --check-prefixes=ASAN-ALL,ASAN-I686 -DINPUT=%/t.a %s +// RUN: %clang

[PATCH] D146887: [clang-tidy] Fix if-constexpr false-positive in readability-misleading-indentation

2023-03-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp requested changes to this revision. carlosgalvezp added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/misleading-indentation.cpp:1 -// RUN: %check_clang_tidy %s

[PATCH] D145726: Fix assembler error when -g and -gdwarf-* is passed with -fno-integrated-as.

2023-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Please update the commit message and comment about what binutils versions reject the construct. Comment at: clang/test/Driver/gcc_forward.c:49 +// DEBUG-NOT: "-gdwarf-4" \ No newline at end of file No newline at end of file Please

[PATCH] D147062: [clang-tidy] Add option to ignore capture default by reference in cppcoreguidelines-avoid-capture-default-when-capturing-this

2023-03-28 Thread Chris Cotter via Phabricator via cfe-commits
ccotter accepted this revision. ccotter added a comment. This revision is now accepted and ready to land. If https://github.com/isocpp/CppCoreGuidelines/issues/2060 is accepted to only consider `[=]`, then I assume we'd want to change the default value of IgnoreCaptureDefaultByReference to be

[PATCH] D146844: [clang-format] Handle '_' in ud-suffix for IntegerLiteralSeparator

2023-03-28 Thread Owen Pan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4d21868b0968: [clang-format] Handle _ in ud-suffix for IntegerLiteralSeparator (authored by owenpan). Repository: rG LLVM Github Monorepo

[clang] 4d21868 - [clang-format] Handle '_' in ud-suffix for IntegerLiteralSeparator

2023-03-28 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-03-28T13:13:02-07:00 New Revision: 4d21868b09681dffb9997f1a8d0c0dac12a226d3 URL: https://github.com/llvm/llvm-project/commit/4d21868b09681dffb9997f1a8d0c0dac12a226d3 DIFF: https://github.com/llvm/llvm-project/commit/4d21868b09681dffb9997f1a8d0c0dac12a226d3.diff

[PATCH] D146844: [clang-format] Handle '_' in ud-suffix for IntegerLiteralSeparator

2023-03-28 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D146844#4226558 , @MyDeveloperDay wrote: > I'm not going to use it, but I like what you've done ;-) Thanks! I won't use it either. :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146844/new/

[PATCH] D147070: Improve requirement clause limitation on non templated function

2023-03-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Thanks for the double check on the review! I'm going to wait for the libcxx bot to come back (and for it to not be a commit at end of day!), but then will commit (unless there is new info). Comment at:

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: akhuang, bwyma, zturner. aaron.ballman added a comment. In D146595#4225702 , @aprantl wrote: > In D146595#4225630 , @aaron.ballman > wrote: > >> It's less about other debug

[PATCH] D147070: Improve requirement clause limitation on non templated function

2023-03-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D147070#4228303 , @erichkeane wrote: > Took Corentin's advice and tried to test the lambda condition. THIS made me > discover that we didn't properly implement this for lambdas at all! So this > patch NOW also implements

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3272 +3 - toward negative infinity +4 - to nearest, ties away from zero +The effect of passing some other value to ``__builtin_flt_rounds`` is I suspect this won't end up being

[PATCH] D147037: [Clang][ICE] Corrected invalid invalid parameter index on some attributes with invalid indices applied to varargs functions

2023-03-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:3764-3767 if (!checkFunctionOrMethodParameterIndex(S, D, AL, 1, IdxExpr, Idx)) return; - + if (Idx.getASTIndex() >= getFunctionOrMethodNumParams(D)) +return; aaron.ballman

[PATCH] D147037: [Clang][ICE] Corrected invalid invalid parameter index on some attributes with invalid indices applied to varargs functions

2023-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: erichkeane. aaron.ballman added a comment. Thanks for working on this fix! A few things: - Please add a summary description to the patch, and be sure to include a reference to the github issue in the summary. - All functional changes (e.g., not typo fixes, fixes

[PATCH] D146875: [clang-tidy] Fix example provided by add_new_check.py

2023-03-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/add_new_check.py:278 with io.open(filename, 'w', encoding='utf8', newline='\n') as f: -f.write("""// RUN: %%check_clang_tidy %%s %(check_name_dashes)s %%t +f.write("""// RUN:

[PATCH] D147070: Improve requirement clause limitation on non templated function

2023-03-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Parser/cxx2b-lambdas.cpp:21 auto L12 = [] consteval {}; -auto L13 = []() requires true {}; +auto L13 = []() requires true {}; // expected-error{{non-templated function cannot have a requires clause}} auto L14 = []

[PATCH] D147070: Improve requirement clause limitation on non templated function

2023-03-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 509101. erichkeane added a comment. Took Corentin's advice and tried to test the lambda condition. THIS made me discover that we didn't properly implement this for lambdas at all! So this patch NOW also implements the restriction for lambdas.

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-03-28 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. I'm trying to add the test case from: https://github.com/llvm/llvm-project/issues/45481#issuecomment-981028897, but lit test fails in `` not found. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147073/new/

[PATCH] D145545: [clang][Interp] Fix local variable (destructor) management in loop bodies

2023-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:209 + + return this->visitStmt(S); +} tbaeder wrote: > aaron.ballman wrote: > > It's a bit of a surprise that we visit the entire body of the compound > > statement

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-03-28 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 509098. zequanwu added a comment. - Handle invalid start location. - Add a test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147073/new/ https://reviews.llvm.org/D147073 Files:

[PATCH] D146995: [clang-format][NFC] Refactor unit tests for "LambdaBodyIndentation: OuterScope" option.

2023-03-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D146995#4227532 , @jp4a50 wrote: > If you guys are happy with this, could you please merge it for me? You need to state a name and email for the commit. > Edit: Also could you please advise about the failing CI

[PATCH] D146908: [clang][MinGW] Add asan DLL lib before other libs and objects

2023-03-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. LGTM overall. I wondered if the modified test runs correctly on Windows (any test that touches paths is prone to break) but I see that it seems to have run successfully on both Windows

[PATCH] D146408: [clang][Interp] Start supporting complex types

2023-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I don't think the `_BitInt` test case should block this patch if that turns out to cause problems. Comment at: clang/lib/AST/Interp/EvalEmitter.cpp:212-214 +}); +return false; + } else if (ElemTy->isFloatingType()) {

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1665-1669 + const auto DesignatedInitializerIndentWidth = + Style.DesignatedInitializerIndentWidth < 0 + ? Style.ContinuationIndentWidth + :

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Looks good to me, not giving my formal approval since the ongoing discussion about the style guide. Comment at: clang/include/clang/Format/Format.h:823 + /// \endcode + /// \version 16.0 + bool AlwaysBreakBeforeFunctionParameters;

[PATCH] D146926: [clang-format] Add option to decorate reflowed block comments

2023-03-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/BreakableToken.cpp:406 Decoration = "* "; - if (Lines.size() == 1 && !FirstInLine) { + if ((Lines.size() == 1 && !FirstInLine) || !Style.DecorateReflowedComments) { // Comments for which FirstInLine

[PATCH] D145726: Fix assembler error when -g and -gdwarf-* is passed with -fno-integrated-as.

2023-03-28 Thread garvit gupta via Phabricator via cfe-commits
garvitgupta08 added a comment. In D145726#4228216 , @nickdesaulniers wrote: > @garvitgupta08 what's your email address so that I may attribute your > authorship correctly when committing on your behalf? quic_garvg...@quicinc.com. Thanks for

[PATCH] D145726: Fix assembler error when -g and -gdwarf-* is passed with -fno-integrated-as.

2023-03-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. @garvitgupta08 what's your email address so that I may attribute your authorship correctly when committing on your behalf? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145726/new/ https://reviews.llvm.org/D145726

[PATCH] D147070: Improve requirement clause limitation on non templated function

2023-03-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:11886-11887 + // - an enumerator for an enumeration that is a templated entity, or + // - the closure type of a lambda-expression ([expr.prim.lambda.closure]) + // appearing in the

[PATCH] D147070: Improve requirement clause limitation on non templated function

2023-03-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. LGTM except the arguably missing tests. Comment at: clang/lib/Sema/SemaDecl.cpp:11886-11887 + // - an enumerator for an enumeration that is a templated entity, or + // - the closure type of a lambda-expression ([expr.prim.lambda.closure]) +

[PATCH] D144190: [AIX][clang] Storage Locations for Constant Pointers

2023-03-28 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 updated this revision to Diff 509091. qiongsiwu1 added a comment. Simplify LTO data section error check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144190/new/ https://reviews.llvm.org/D144190 Files: clang/docs/ReleaseNotes.rst

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 509090. jhuber6 added a comment. Changing to use the `gpu-none-llvm` subfolder name that @sivachandra recommended. Also adding a `--sysroot` argument to show that this include path shows up first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-03-28 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: hans, shafik, rsmith, MaggieYi, gulfem. Herald added a project: All. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. https://github.com/llvm/llvm-project/issues/45481

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D146973#4228070 , @tra wrote: > I'm OK with injecting the path *now* with an understanding that it's a > short-term "happens to work" way to move forward while we're working on a > better solution. So, the proposed path

[PATCH] D147030: [Clang][Driver] Default Generic_GCC::IsIntegratedAssemblerDefault to true

2023-03-28 Thread Brad Smith via Phabricator via cfe-commits
brad updated this revision to Diff 509084. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147030/new/ https://reviews.llvm.org/D147030 Files: clang/lib/Driver/ToolChains/Gnu.cpp clang/test/Driver/integrated-as.c Index:

  1   2   3   >