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

2023-03-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 509021. tbaeder set the repository for this revision to rG LLVM Github Monorepo. tbaeder added a comment. Add support for integer complex types as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146408/new/

[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/ByteCodeExprGen.cpp:1595 +return true; + } else if (const auto *CE = dyn_cast(Initializer)) { +if (!this->emitDupPtr(Initializer)) aaron.ballman wrote: > Member calls as well? Yes, and some

[PATCH] D136103: OpenMP asynchronous memory copy support

2023-03-28 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr updated this revision to Diff 509023. jplehr added a comment. Rebased and enabled tests for generic devices. Resulted in one test failure Failed Tests (3): libomptarget :: amdgcn-amd-amdhsa :: api/omp_target_memcpy_rect_async1.c libomptarget :: x86_64-pc-linux-gnu :: api/omp_target_memcpy_

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-28 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.h:111 +llvm::codegenoptions::DebugInfoKind +DebugLevelToInfoKind(const llvm::opt::Arg &A); + SBallantyne wrote: > awarzynski wrote: > > awarzynski wrote: > > > CamelCase or camel

[PATCH] D144862: Include highlighed, include on hover, code lense for used symbols

2023-03-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 509028. VitaNuo added a comment. Remove unneeded code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144862/new/ https://reviews.llvm.org/D144862 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-t

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-28 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne updated this revision to Diff 509029. SBallantyne added a comment. Update style to mach style guidelines Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146814/new/ https://reviews.llvm.org/D146814 Files: clang/include/clang/Driver/Opt

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-28 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.h:111 +llvm::codegenoptions::DebugInfoKind +DebugLevelToInfoKind(const llvm::opt::Arg &A); + awarzynski wrote: > SBallantyne wrote: > > awarzynski wrote: > > > awarzynski wrote:

[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 updated this revision to Diff 509030. alvinhochun retitled this revision from "[clang][MinGW] Add asan link flags before other libs and objects" to "[clang][MinGW] Add asan DLL lib before other libs and objects". alvinhochun added a comment. Updated per comments. Repository: rG L

[PATCH] D146412: [NFC] Fix potential use-after-free in DumpModuleInfoAction::ExecuteAction()

2023-03-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. > Should OutputStream be made into a shared_ptr so we can clarify the memory > ownership instead of leaving it as a raw pointer? That should also address > the use-after-free. Well, I was thinking about that and wasn't sure about it either. https://reviews.llvm.org/D

[PATCH] D145591: [clang][HIP][OpenMP] Add warning if mixed HIP / OpenMP offloading

2023-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145591/new/ https://reviews.llvm.org/D145591 ___

[PATCH] D146234: [clang] Fix crash when handling nested immediate invocations

2023-03-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 509039. Fznamznon added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146234/new/ https://reviews.llvm.org/D146234 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Sema/Se

[PATCH] D144862: Include highlighed, include on hover, code lense for used symbols

2023-03-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 509041. VitaNuo added a comment. Replace the used symbol computation impl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144862/new/ https://reviews.llvm.org/D144862 Files: clang-tools-extra/clangd/ClangdLSP

[clang] 481e202 - [clang][doc] Fix link to SYCL compiler design doc

2023-03-28 Thread Paulo Matos via cfe-commits
Author: Paulo Matos Date: 2023-03-28T18:09:52+02:00 New Revision: 481e20252461e730f36fb221123a853eda27cafc URL: https://github.com/llvm/llvm-project/commit/481e20252461e730f36fb221123a853eda27cafc DIFF: https://github.com/llvm/llvm-project/commit/481e20252461e730f36fb221123a853eda27cafc.diff L

[PATCH] D146922: [clang-tidy] Fix false positve for defaulted move constructor in performance-noexcept-move-constructor

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Try to move some code to separate file, some utilty/... Add tests with tyepdefs. Add tests with class derive from type that it gets from template. Probably this code will be used in few more checks in future. try implement some virtual base validation, add some cache so

[PATCH] D146922: [clang-tidy] Fix false positve for defaulted move constructor in performance-noexcept-move-constructor

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL requested changes to this revision. PiotrZSL added a comment. This revision now requires changes to proceed. Try refactoring code a lite bit, check suggestions, add tests for typedefs, and inheritance from template type. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[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 created this revision. Herald added subscribers: PiotrZSL, shchenz, kbarton, xazax.hun, nemanjai. Herald added a reviewer: njames93. Herald added a project: All. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-

[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 509057. qiongsiwu1 added a comment. Fixing LTO data sections 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 cl

[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. In D145726#4225082 , @garvitgupta08 wrote: > I do not have the commit access, can you commit on my behalf @nickdesaulniers Sure thing; I'll test it out with some Linux kernel builds, too. I'll try to get that done toda

[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#4204412 , @tbaeder wrote: > "subobject named 'foo'" sounds a bit weird to me, I'd expect just "subobject > 'foo'", but that's just a suggestion and I'll wait for a native spearker to > chime in on this. My expert brain

[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 updated this revision to Diff 509061. carlosgalvezp added a comment. Clean up check suffix in test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147062/new/ https://reviews.llvm.org/D147062 Files: clang-tools-extra/clang-tidy/cpp

[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 updated this revision to Diff 509064. carlosgalvezp added a comment. Fix typo in doc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147062/new/ https://reviews.llvm.org/D147062 Files: clang-tools-extra/clang-tidy/cppcoreguidelines

[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 509066. gandhi21299 added a comment. - gfx908 does not support return version of the builtin Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146840/new/ https://reviews.llvm.org/D146840 Files: clang/includ

[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 509067. gandhi21299 added a comment. - removed builtins-amdgcn-gfx908.cl Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146840/new/ https://reviews.llvm.org/D146840 Files: clang/include/clang/Basic/Builti

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

2023-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D146973#4227470 , @jhuber6 wrote: > In D146973#4227433 , @aaron.ballman > wrote: > >> I am not asking you to implement a library based off another >> implementation's specificat

[clang] 498e150 - [Fuchsia][CMake] Always use multiple distribution model.

2023-03-28 Thread Daniel Thornburgh via cfe-commits
Author: Daniel Thornburgh Date: 2023-03-28T10:31:22-07:00 New Revision: 498e1506981f42c32656150b9d8e0408d91f9f23 URL: https://github.com/llvm/llvm-project/commit/498e1506981f42c32656150b9d8e0408d91f9f23 DIFF: https://github.com/llvm/llvm-project/commit/498e1506981f42c32656150b9d8e0408d91f9f23.d

[PATCH] D147021: [Builtins] Add __builtin_implicit_object_fence.

2023-03-28 Thread David Goldblatt via Phabricator via cfe-commits
davidtgoldblatt created this revision. Herald added subscribers: jeroen.dobbelaere, kosarev. Herald added a project: All. davidtgoldblatt updated this revision to Diff 509069. davidtgoldblatt added a comment. davidtgoldblatt added a reviewer: rsmith. davidtgoldblatt published this revision for revi

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

2023-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2924 + default: +if (getTriple().getVendor() == llvm::Triple::Myriad) + return false; `return getTriple().getVendor() != llvm::Triple::Myriad;` Repository: rG LLVM Github

[PATCH] D146604: [NFC] Fix uninitalized member variable use in ASTReader::ParseTargetOptions()

2023-03-28 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir added inline comments. Comment at: clang/include/clang/Basic/TargetOptions.h:91 /// \brief Code object version for AMDGPU. - CodeObjectVersionKind CodeObjectVersion; + CodeObjectVersionKind CodeObjectVersion = CodeObjectVersionKind::COV_4; aaron.b

[PATCH] D147068: Fix merging of member-like constrained friends across modules.

2023-03-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: aaron.ballman. Herald added a project: All. rsmith requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When a friend declaration has a requires-clause, and either it's a non-template functi

[PATCH] D146148: Float_t and double_t types shouldn't be modified by #pragma clang fp eval_method

2023-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Yeah, that was the sort of thing I was worried about. The identifier thing is also a reasonable approach, and it'll be nice infrastructure for other, similar things. The ranges of special identifier we already call out on IdentifierInfo* are for builtin functions (wh

[PATCH] D146412: [NFC] Fix potential use-after-free in DumpModuleInfoAction::ExecuteAction()

2023-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D146412#4227644 , @Fznamznon wrote: >> Should OutputStream be made into a shared_ptr so we can clarify the memory >> ownership instead of leaving it as a raw pointer? That should also address >> the use-after-free. > >

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

2023-03-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. 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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146973/new/ https

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

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. No comments from me, looks ok. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147062/new/ https://reviews.llvm.org/D147062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-03-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: clang-language-wg, shafik. Herald added a project: All. erichkeane requested review of this revision. The current implementation 6da3d66f03f9162ef341cc67218be40e22fe9808

[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:11898 + // defined... in a templated entity + !(DeclIsDefn && NewFD->isTemplated()) && + // a member of a templated entity Note we're using `isTemplated` here as

[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: clang/test/Driver/integra

[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 forw

[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 expose

[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 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 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 c

[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] 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 declaratio

[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] 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 committing!

[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] 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] 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 + : Sty

[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] 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 an

[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 tes

[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: clang/lib/CodeGen/Cove

[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 before

[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/ https://review

[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. @cor3ntin

[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 = [] requir

[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: %%check_clang_ti

[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 t

[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] 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 format

[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] 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 format

[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: clang/test/SemaCXX/lambda-capture-type-deduct

[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/ https://reviews.llvm.o

[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 LOG:

[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 CHANG

[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 tr

[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 fi

[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 readability-mislead

[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] 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 > IgnoreCaptureDefaultByReferen

[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/ https://review

[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 = ty

[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 -tar

[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] 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

[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 LOG:

[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/ https://reviews

[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 pro

[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 af

[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 + : Style.Designate

[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] 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: clang/include/clang/Basic/Built

[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 alway

[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 typ

[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 L

[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: https://reviews.llv

[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 not

[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: > Eugene.Zelenk

[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: clang-tools-extra/clang-tidy/readability/Misleadin

[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 SI

[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] 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 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 cfe-commits@l

[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: https://github.com/llvm/llvm-project/commit/9f15f1f0f3f58da8600c78c60032299f5ee4d6c5.dif

[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 = NewFD->getTrailingRequiresClause()

[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 https://lis

[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 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 LAST

[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] 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 + : Style.Designat

<    1   2   3   >