[PATCH] D135433: [clang][Interp] Implement while and do-while loops

2022-10-07 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 466259. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135433/new/ https://reviews.llvm.org/D135433 Files: clang/lib/AST/Interp/ByteCodeStmtGen.cpp clang/lib/AST/Interp/ByteCodeStmtGen.h clang/test/AST/Interp/loops.cpp Index: clang/test/AST/Int

[clang] 3b276a0 - [ARM64EC][clang-cl] Add arm64EC test; NFC

2022-10-07 Thread via cfe-commits
Author: chenglin.bi Date: 2022-10-08T14:47:50+08:00 New Revision: 3b276a0decea1adcb822d5110f25f7256a6ade6c URL: https://github.com/llvm/llvm-project/commit/3b276a0decea1adcb822d5110f25f7256a6ade6c DIFF: https://github.com/llvm/llvm-project/commit/3b276a0decea1adcb822d5110f25f7256a6ade6c.diff L

[PATCH] D135433: [clang][Interp] Implement while and do-while loops

2022-10-07 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/loops.cpp:93 + } + static_assert(f4() == 5, ""); +}; aaron.ballman wrote: > Can you also add some tests that use nested loops with multiple levels of > `break` and `continue` use? > > Also, I th

[PATCH] D135466: [clang-format] Add support to remove unnecessary semicolons after function definition

2022-10-07 Thread Jakub Klinkovský via Phabricator via cfe-commits
lahwaacz added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:963 nextToken(/*LevelDifference=*/-AddLevels); HandleVerilogBlockLabel(); owenpan wrote: > The `while` loop would address > https://reviews.llvm.org/D135466#inline-13063

[PATCH] D135472: [ODRHash] Hash attributes on declarations.

2022-10-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I guess the reason why we didn't check odr violation for attributes is that the attributes was not a part of declarations in C++ before. But it is odd to skip the check for attributes from the perspective of users. So I think this one should be good. The only concern

[PATCH] D135384: [AIX] Enable the use of the -pg flag

2022-10-07 Thread Michael Francis via Phabricator via cfe-commits
francii updated this revision to Diff 466254. francii added a comment. Replace target pointers with opaque pointers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135384/new/ https://reviews.llvm.org/D135384 Files: clang/test/CodeGen/mcount-aix.c

[clang-tools-extra] 79ed24e - [clangd] Enable standard library index by default.

2022-10-07 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-10-08T06:45:59+02:00 New Revision: 79ed24eea37f00b02d427f8ca59570546a5037a4 URL: https://github.com/llvm/llvm-project/commit/79ed24eea37f00b02d427f8ca59570546a5037a4 DIFF: https://github.com/llvm/llvm-project/commit/79ed24eea37f00b02d427f8ca59570546a5037a4.diff LO

[PATCH] D133968: [clangd] Enable standard library index by default.

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG79ed24eea37f: [clangd] Enable standard library index by default. (authored by sammccall). Repository: rG LLVM Github Mo

[PATCH] D133968: [clangd] Enable standard library index by default.

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D133968#3794850 , @kadircet wrote: > thanks, LG but seems to be failing on windows :/ This seemed very plausible but then none of the actual tests hit this codepath, and everything passes on rerun :-\ Repository: rG LLV

[PATCH] D135508: [clangd] Heuristic to avoid desync if editors are confused about newline-at-eof

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (also the desyncs are incredibly annoying, and happen pretty much any time you clear all text out of a file) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135508/new/ https://reviews.llvm.org/D135508 ___

[PATCH] D135508: [clangd] Heuristic to avoid desync if editors are confused about newline-at-eof

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Sorry to dump more patches on you, but I want your opinion on whether we should carry such a hack. My initial inclination is no, but the class of bug is not very hard to understand, could plausibly come up in other clients, and the fix is fairly simple. I'd like to g

[PATCH] D135384: [AIX] Enable the use of the -pg flag

2022-10-07 Thread Michael Francis via Phabricator via cfe-commits
francii updated this revision to Diff 466252. francii added a comment. Removed __mcount.aix usage Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135384/new/ https://reviews.llvm.org/D135384 Files: clang/test/CodeGen/mcount-aix.c llvm/lib/Transf

[PATCH] D135508: [clangd] Heuristic to avoid desync if editors are confused about newline-at-eof

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. As strange

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2022-10-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:68 + + auto BPointeeUQTy = BPointeeTy->getUnqualifiedDesugaredType(); + auto TPointeeUQTy = TPointeeTy->getUnqualifiedDesugaredType(); Please don'

[PATCH] D134597: [CMake] install clang resource headers into `CLANG_RESOURCE_DIR/include` if `CLANG_RESOURCE_DIR` is not empty

2022-10-07 Thread LJC via Phabricator via cfe-commits
paperchalice updated this revision to Diff 466249. paperchalice added a comment. Herald added subscribers: llvm-commits, openmp-commits, Sanitizers, Enna1. Herald added projects: Sanitizers, OpenMP, LLVM. Let other projects consider CLANG_RESOURCE_DIR too. Repository: rG LLVM Github Monorepo

[clang] 5e5d214 - BareMetal: detect usr/include/c++/v1 path in sysroot

2022-10-07 Thread Manoj Gupta via cfe-commits
Author: Manoj Gupta Date: 2022-10-07T21:25:18-07:00 New Revision: 5e5d21462d1ea7dbaa13bcd9bcf0156cee45b97c URL: https://github.com/llvm/llvm-project/commit/5e5d21462d1ea7dbaa13bcd9bcf0156cee45b97c DIFF: https://github.com/llvm/llvm-project/commit/5e5d21462d1ea7dbaa13bcd9bcf0156cee45b97c.diff L

[PATCH] D134478: BareMetal: detect usr/include/c++/v1 path in sysroot

2022-10-07 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5e5d21462d1e: BareMetal: detect usr/include/c++/v1 path in sysroot (authored by manojgupta). Changed prior to commit: https://reviews.llvm.org/D134478?vs=465647&id=466250#toc Repository: rG LLVM Gith

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-10-07 Thread Zixuan Wu via Phabricator via cfe-commits
zixuan-wu added a comment. It's fine for CSKY to use config file. I only have 2 points. 1. I agree sysroot should be separated from GCC because sysroot is not dependent to GCC and there is even not gcc when we use llvm runtime. This rule should also apply to multilib logic. Sysroot can detect m

[PATCH] D121445: [Clang][CSKY] Add the CSKY target and compiler driver

2022-10-07 Thread Zixuan Wu via Phabricator via cfe-commits
zixuan-wu added a comment. In D121445#3824657 , @MaskRay wrote: > mips computed sysroot from GCCInstallation very early in 2013 > rG08450bd55ccdc4aee4f5f73cde97e25b3c4ce5b9 > and > A

[PATCH] D135384: [AIX] Enable the use of the -pg flag

2022-10-07 Thread Michael Francis via Phabricator via cfe-commits
francii updated this revision to Diff 466248. francii added a comment. Removed use of -no-opaque-pointers and call to "__mcount.aix" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135384/new/ https://reviews.llvm.org/D135384 Files: clang/test/Cod

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a reviewer: rsmith. ChuanqiXu added a comment. In D134267#3815453 , @dblaikie wrote: >> This also tries to fix the problem I raised a year ago: >> https://discourse.llvm.org/t/make-command-line-support-for-c-20-module-uniform-with-gcc/591

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-10-07 Thread Kees Cook via Phabricator via cfe-commits
kees added a comment. In D135411#3841841 , @samitolvanen wrote: > That being said, I did compile a 64-bit MIPS kernel using this pass, but I > didn't try booting it. I would expect to run into quite a few issues > initially. I've done a test build wit

[PATCH] D133968: [clangd] Enable standard library index by default.

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 466243. sammccall added a comment. tickle premerge test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133968/new/ https://reviews.llvm.org/D133968 Files: clang-tools-extra/clangd/Config.h clang-tools-ext

[PATCH] D135273: [Clang][ObjC] Add optionality to property attribute strings.

2022-10-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. This LGTM for apple's runtime assuming it knows how to handle the new string. Comment at: clang/lib/AST/ASTContext.cpp:7857 + if (PD->isOptional()) { +S += ",?"; -

[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:169 +// For renaming, we're only interested in foo's declaration, so drop the other one +void filterBaseUsingDecl(llvm::DenseSet& Decls) { + if (Decls.size() == 2) { sammc

[PATCH] D135506: [clangd] FindTarget: UsingEnumDecl is not an alias

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: tom-anders. Herald added subscribers: jeroen.dobbelaere, kadircet, arphaman. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project:

[PATCH] D135440: [SourceManager] Speedup getFileIDLocal with a separate Offset Table.

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. It'd be great to have some numbers for overall memory increase based on clang rather than clangd, that's a more critical case and has a different memory pattern. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135440/new/

[PATCH] D129443: [clang-format] Add option for aligning requires clause body

2022-10-07 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D129443#3842427 , @HazardyKnusperkeks wrote: > We can //fix// that regression, and I will adopt this change for my company > to keep the requires expressions where they are. :) Then we have three options: 1. Only fix the "r

[PATCH] D134638: [Clang][LoongArch] Add inline asm support for constraints k/m/ZB/ZC

2022-10-07 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. A polite ping... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134638/new/ https://reviews.llvm.org/D134638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D135440: [SourceManager] Speedup getFileIDLocal with a separate Offset Table.

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a reviewer: aaron.ballman. sammccall added a subscriber: aaron.ballman. sammccall added a comment. This looks good to me, I think we should ask @aaron.ballman about the memory increase. If we wanted to eliminate SLocEntry::Offset then we could add SourceManager::getOffset(FileID

[PATCH] D134303: [AST] Preserve more structure in UsingEnumDecl node.

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a reviewer: hokein. sammccall added a comment. ping, +additional potential reviewer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134303/new/ https://reviews.llvm.org/D134303 ___ cfe-comm

[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (Thanks for fixing this BTW!) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135489/new/ https://reviews.llvm.org/D135489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

2022-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Want to probe a bit at the behavior we're aiming for here. TL;DR is I think the handling is basically right but considering the general case tells us how to simplify filterBaseUsingDecl. --- The testcase is great to illustrate the common case. The thing we need to gen

[PATCH] D135466: [clang-format] Add support to remove unnecessary semicolons after function definition

2022-10-07 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. @MyDeveloperDay Cool! In D135466#3843792 , @HazardyKnusperkeks wrote: > Maybe even extend the option to other unnecessary semicolons like `int x = > 5;;` or other noop statements, one just has to be careful not to remove the >

[PATCH] D129755: Thread safety analysis: Support copy-elided production of scoped capabilities through arbitrary calls

2022-10-07 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem added a comment. In D129755#3844059 , @aaronpuchert wrote: > In D129755#3843144 , @gulfem wrote: > >> We also started seeing `-Wthread-safety-precise` error in our Fuchsia code. >> https://luci-milo.appsp

[PATCH] D135500: [Clang] reject bit-fields as instruction operands in Microsoft style inline asm blocks.

2022-10-07 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann created this revision. tahonermann added reviewers: erichkeane, aaron.ballman. Herald added a project: All. tahonermann requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. MSVC allows bit-fields to be specified as instruction operan

[PATCH] D135091: Create storage for the `_cmd` argument to the helper function for generated getters/setters of `direct` Objective-C properties.

2022-10-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1125 +llvm::Type *selType = CGF.ConvertType(CGF.getContext().getObjCSelType()); +return llvm::UndefValue::get(selType); + } mwyman wrote: > nlopes wrote: > > mwyman wrote: > > > nlo

[PATCH] D135429: [HLSL] [DirectX backend] Move generateGlobalCtorDtorCalls into DirectX backend.

2022-10-07 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D135429#3844179 , @efriedma wrote: > In D135429#3844172 , @efriedma > wrote: > >>> The pass will be always enabled in >>> registerPipelineEarlySimplificationEPCallback (Not contro

[PATCH] D135488: [codegen][WIP] Display stack layouts in console

2022-10-07 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. In D135488#3844117 , @nickdesaulniers wrote: > Thanks for the patch, here's the output I observe from the LKML thread > : > https://paste.debian.net/

[PATCH] D135091: Create storage for the `_cmd` argument to the helper function for generated getters/setters of `direct` Objective-C properties.

2022-10-07 Thread Michael Wyman via Phabricator via cfe-commits
mwyman marked 2 inline comments as done. mwyman added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1125 +llvm::Type *selType = CGF.ConvertType(CGF.getContext().getObjCSelType()); +return llvm::UndefValue::get(selType); + } nlopes wrote: > mw

[PATCH] D135091: Create storage for the `_cmd` argument to the helper function for generated getters/setters of `direct` Objective-C properties.

2022-10-07 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 466212. mwyman edited the summary of this revision. mwyman added a comment. Updated to use `PoisonValue` rather than `UndefValue`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135091/new/ https://reviews.llvm.org/D135091 Files: clang/lib/CodeGen/

[PATCH] D135429: [HLSL] [DirectX backend] Move generateGlobalCtorDtorCalls into DirectX backend.

2022-10-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. In D135429#3844172 , @efriedma wrote: >> The pass will be always enabled in >> registerPipelineEarlySimplificationEPCallback (Not controlled by >> optimization level), is it possible that things registered in >> registerPipeli

[PATCH] D135488: [codegen][WIP] Display stack layouts in console

2022-10-07 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. (I totally think we should ship this, perhaps a Note: diagnostic that says to "rebuild with debug info and -fmy-new-flag-for-more-info") Probably not much precedence for those kind of warnings, but idk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D135429: [HLSL] [DirectX backend] Move generateGlobalCtorDtorCalls into DirectX backend.

2022-10-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > The pass will be always enabled in > registerPipelineEarlySimplificationEPCallback (Not controlled by optimization > level), is it possible that things registered in > registerPipelineEarlySimplificationEPCallback be skipped? I think we won't end up running it at -O

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2022-10-07 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 466204. isuckatcs edited the summary of this revision. isuckatcs added a comment. Updated CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2022-10-07 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs created this revision. isuckatcs added reviewers: njames93, baloghadamsoftware, aaron.ballman, LegalizeAdulthood. Herald added subscribers: carlosgalvezp, manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, rnkovacs, xazax.hun. Herald added a project: All. isuckatcs requeste

[PATCH] D135488: [codegen][WIP] Display stack layouts in console

2022-10-07 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks for the patch, here's the output I observe from the LKML thread : https://paste.debian.net/1256338/. I think the stack slot numbers printed at the end aren't correct; the two large

[PATCH] D135476: [clang-tidy] Support concepts in `bugprone-forwarding-reference-overload`

2022-10-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a subscriber: MyDeveloperDay. Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/forwarding-reference-overload.rst:54 constructor could hide in this case. We also suppress warnings for constructors -like C3 a

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-10-07 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D133457#3832590 , @mstorsjo wrote: > @akhuang I noticed that > https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/MSVC.cpp#L199-L200 > has got an explicit check for `Args.hasArg(options::OPT__SLASH_MD,

[PATCH] D135405: fix handling of braced-init temporaries for modernize-use-emplace

2022-10-07 Thread Peter Wolf via Phabricator via cfe-commits
BigPeet updated this revision to Diff 466198. BigPeet added a comment. fixed wrong arc diff handling :-/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135405/new/ https://reviews.llvm.org/D135405 Files: clang-tools-extra/clang-tidy/modernize/Use

[PATCH] D135405: fix handling of braced-init temporaries for modernize-use-emplace

2022-10-07 Thread Peter Wolf via Phabricator via cfe-commits
BigPeet updated this revision to Diff 466197. BigPeet added a comment. applying clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135405/new/ https://reviews.llvm.org/D135405 Files: clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck

[PATCH] D129755: Thread safety analysis: Support copy-elided production of scoped capabilities through arbitrary calls

2022-10-07 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D129755#3843144 , @gulfem wrote: > We also started seeing `-Wthread-safety-precise` error in our Fuchsia code. > https://luci-milo.appspot.com/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.x64-release/b8800959115965408

[PATCH] D122078: [clang-tidy] Ignore concepts in `misc-redundant-expression`

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. Hi! A friendly ping =) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122078/new/ https://reviews.llvm.org/D122078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[PATCH] D135493: [Clang] Support constexpr builtin fmin

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 466193. Izaron added a comment. Aligned slashes in defines Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135493/new/ https://reviews.llvm.org/D135493 Files: clang/docs/LanguageExtensions.rst clang/lib/AST/E

[PATCH] D135440: [SourceManager] Speedup getFileIDLocal with a separate Offset Table.

2022-10-07 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/include/clang/Basic/SourceManager.h:697 + /// FileID lookup. + SmallVector LocalLocOffsetTable; nickdesaulniers wrote: > `LocalSLocEntryTable` is a vec of `SrcMgr::SLocEntry`. `SrcMgr::SLocEntry`'s > `

[PATCH] D135493: [Clang] Support constexpr builtin fmin

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. This is a mirror of my previous patch about builtin **max**. I promised to make the patch for builtin **min** =) Here: https://reviews.llvm.org/D134369#3806131 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135493/new/ https

[PATCH] D135493: [Clang] Support constexpr builtin fmin

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added reviewers: efriedma, jcranmer-intel, aaron.ballman, cor3ntin. Herald added a project: All. Izaron requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Support constexpr version of __builtin_fmin and its

[PATCH] D135429: [HLSL] [DirectX backend] Move generateGlobalCtorDtorCalls into DirectX backend.

2022-10-07 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D135429#3843906 , @efriedma wrote: > You might actually want to run this twice, once early, and once in the > backend. Early to get high-quality optimization, late in case optimizations > don't run for some reason. (Not

[PATCH] D135488: [codegen][WIP] Display stack layouts in console

2022-10-07 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D135488#3843992 , @paulkirth wrote: > Roland mentioned there's probably a clever way to do this using only DWARF, > but that it's probably simpler to do in the compiler backend. That's essentially what I do in: https

[PATCH] D135440: [SourceManager] Speedup getFileIDLocal with a separate Offset Table.

2022-10-07 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/include/clang/Basic/SourceManager.h:696 + /// An in-parallel SlocEntry offset table, merely used for speeding up the + /// FileID lookup. + SmallVector LocalLocOffsetTable; Add to this comment that the s

[PATCH] D135488: [codegen][WIP] Display stack layouts in console

2022-10-07 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added subscribers: nickdesaulniers, phosek. paulkirth added a comment. @nickdesaulniers @phosek You may be interested in this super hacky prototype. There's a bunch of things to improve(tests, output, code structure, plumbing...), but when we emit the diagnostic for `-Wframe-larger-tha

[PATCH] D135118: [clang/Sema] Fix non-deterministic order for certain kind of diagnostics

2022-10-07 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. In D135118#3840259 , @akyrtzi wrote: > In D135118#3839442 , @nikic wrote: > >> FYI this caused a noticeable compile-time regression (about 0.4% geomean at >> `-O0`): >> http://llvm-compi

[PATCH] D135486: [Clang] Use C++17 in constant-builtins-fmax.cpp test

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc585a44651f4: [Clang] Use C++17 in constant-builtins-fmax.cpp test (authored by Izaron). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135486/new/ https://r

[clang] c585a44 - [Clang] Use C++17 in constant-builtins-fmax.cpp test

2022-10-07 Thread Evgeny Shulgin via cfe-commits
Author: Evgeny Shulgin Date: 2022-10-07T21:31:38Z New Revision: c585a44651f485c1a10fefdc6625ad998c05c61c URL: https://github.com/llvm/llvm-project/commit/c585a44651f485c1a10fefdc6625ad998c05c61c DIFF: https://github.com/llvm/llvm-project/commit/c585a44651f485c1a10fefdc6625ad998c05c61c.diff LOG

[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

2022-10-07 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:169 +// For renaming, we're only interested in foo's declaration, so drop the other one +void filterBaseUsingDecl(llvm::DenseSet& Decls) { + if (Decls.size() == 2) { I'm

[PATCH] D135490: [clang/Sema] Follow-up for fix of non-deterministic order of `-Wunused-variable` diagnostic

2022-10-07 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi created this revision. Herald added a subscriber: mgrang. Herald added a project: All. akyrtzi requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Commit `371883f46dc23f8464cbf578e2d12a4f92e61917` caused a noticeable compile-time regre

[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

2022-10-07 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Fixes h

[PATCH] D130324: [ODRHash] Hash `ObjCProtocolDecl` and diagnose discovered mismatches.

2022-10-07 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Should we also update `ODRHash::isDeclToBeProcessed`? Comment at: clang/lib/AST/ODRDiagsEmitter.cpp:313 +DeclarationName SecondProtocolName = SecondProtocol->getDeclName(); +if (FirstProtocolName != SecondProtocolName) { + SourceLocati

[PATCH] D135488: [codegen][WIP] Display stack layouts in console

2022-10-07 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth created this revision. Herald added subscribers: mgrang, hiraditya. Herald added a project: All. paulkirth requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Issue #58168 describes the difficulty diagnosing stack si

[PATCH] D135486: [Clang] Use C++17 in constant-builtins-fmax.cpp test

2022-10-07 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. Thanks, this is necessary because the Playstation platforms default to C++14, not C++17. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135486/new/ https://reviews.llvm.org/D135486 ___

[PATCH] D135429: [HLSL] [DirectX backend] Move generateGlobalCtorDtorCalls into DirectX backend.

2022-10-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. You might actually want to run this twice, once early, and once in the backend. Early to get high-quality optimization, late in case optimizations don't run for some reason. (Not sure how that works if `T.getEnvironment() == Triple::EnvironmentType::Library`, though,

[PATCH] D135091: Create storage for the `_cmd` argument to the helper function for generated getters/setters of `direct` Objective-C properties.

2022-10-07 Thread Nuno Lopes via Phabricator via cfe-commits
nlopes added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1125 +llvm::Type *selType = CGF.ConvertType(CGF.getContext().getObjCSelType()); +return llvm::UndefValue::get(selType); + } mwyman wrote: > nlopes wrote: > > Please consider using Poi

[PATCH] D130325: [ODRHash] Hash `ObjCMethodDecl` and diagnose discovered mismatches.

2022-10-07 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. This look good to me, but you might want to get a review from someone who worked on this before. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D135486: [Clang] Use C++17 in constant-builtins-fmax.cpp test

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. Thanks, will land the patch after `Build 288902: pre-merge checks` is passed =) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135486/new/ https://reviews.llvm.org/D135486 ___ cfe-

[PATCH] D135486: [Clang] Use C++17 in constant-builtins-fmax.cpp test

2022-10-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. Looks fine Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135486/new/ https://reviews.llvm.org/D135486 _

[PATCH] D135384: [AIX] Enable the use of the -pg flag

2022-10-07 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm added inline comments. Comment at: clang/lib/Basic/Targets/OSTargets.h:754 : OSTargetInfo(Triple, Opts) { +this->MCountName = "__mcount.aix"; this->TheCXXABI.set(TargetCXXABI::XL); Suggest sticking with the normal mcount name and rem

[PATCH] D135476: [clang-tidy] Support concepts in `bugprone-forwarding-reference-overload`

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron marked an inline comment as done. Izaron added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/forwarding-reference-overload.rst:54 constructor could hide in this case. We also suppress warnings for constructors -like C3 and C4 that are gua

[PATCH] D135476: [clang-tidy] Support concepts in `bugprone-forwarding-reference-overload`

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 466175. Izaron added a comment. Follow 80 characters limit. Thanks to @Eugene.Zelenko! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135476/new/ https://reviews.llvm.org/D135476 Files: clang-tools-extra/clang

[clang] 9a01cca - Add support for CUDA-11.8 and sm_{87,89,90} GPUs.

2022-10-07 Thread Artem Belevich via cfe-commits
Author: Artem Belevich Date: 2022-10-07T13:59:28-07:00 New Revision: 9a01cca66036087e4da37c221a4b911818910524 URL: https://github.com/llvm/llvm-project/commit/9a01cca66036087e4da37c221a4b911818910524 DIFF: https://github.com/llvm/llvm-project/commit/9a01cca66036087e4da37c221a4b911818910524.diff

[clang] f3a2cbc - Refactored CUDA version housekeeping to use less boilerplate.

2022-10-07 Thread Artem Belevich via cfe-commits
Author: Artem Belevich Date: 2022-10-07T13:59:23-07:00 New Revision: f3a2cbcf97f5c7a58f9d4c5588c2bea8028f8c58 URL: https://github.com/llvm/llvm-project/commit/f3a2cbcf97f5c7a58f9d4c5588c2bea8028f8c58 DIFF: https://github.com/llvm/llvm-project/commit/f3a2cbcf97f5c7a58f9d4c5588c2bea8028f8c58.diff

[PATCH] D135306: [CUDA] Add support for CUDA-11.8 and sm_{87,89,90} GPUs.

2022-10-07 Thread Artem Belevich 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 rG9a01cca66036: Add support for CUDA-11.8 and sm_{87,89,90} GPUs. (authored by tra). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D135328: [CUDA] Refactored CUDA version housekeeping to use less boilerplate.

2022-10-07 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf3a2cbcf97f5: Refactored CUDA version housekeeping to use less boilerplate. (authored by tra). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135328/new/ htt

[PATCH] D129755: Thread safety analysis: Support copy-elided production of scoped capabilities through arbitrary calls

2022-10-07 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 466172. aaronpuchert added a comment. This revision is now accepted and ready to land. - Pass `til::LiteralPtr *Self` for automatic object destructors into handling of `require_capability` and `locks_excluded` attributes. - Add `[[maybe_unused]]` attribu

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-10-07 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added inline comments. This revision is now accepted and ready to land. Comment at: llvm/lib/Transforms/Instrumentation/KCFI.cpp:48-49 + SmallVector KCFICalls; + for (inst_iterator I = inst_begin(F), E = inst_end(F); I !=

[PATCH] D134369: [Clang] Support constexpr builtin fmax

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. In D134369#3843824 , @efriedma wrote: > You might need to explicitly specify -std=c++17 in the RUN line. (That bot > has a different target triple, and I think with that triple the default C++ > standard isn't C++17?) Thanks @e

[PATCH] D135486: [Clang] Use C++17 in constant-builtins-fmax.cpp test

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. ASAP fix from previous review request, see comment: https://reviews.llvm.org/D134369#3843824 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135486/new/ https://reviews.llvm.org/D135486 __

[PATCH] D135306: [CUDA] Add support for CUDA-11.8 and sm_{87,89,90} GPUs.

2022-10-07 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 466171. tra added a comment. Updated a failing test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135306/new/ https://reviews.llvm.org/D135306 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Buil

[PATCH] D135486: [Clang] Use C++17 in constant-builtins-fmax.cpp test

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added reviewers: efriedma, jcranmer-intel, aaron.ballman, cor3ntin. Herald added a project: All. Izaron requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add `-std=c++17` to the test so that buildbot won't

[PATCH] D134369: [Clang] Support constexpr builtin fmax

2022-10-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. You might need to explicitly specify -std=c++17 in the RUN line. (That bot has a different target triple, and I think with that triple the default C++ standard isn't C++17?) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

Re: [PATCH] D135245: [clang][Tooling] Move STL recognizer to its own library

2022-10-07 Thread Kadir Çetinkaya via cfe-commits
sorry for that, bb4f0af97dba600c50a0f727b25a760e8185c578 should fix it On Fri, Oct 7, 2022 at 7:46 PM Kamau Bridgeman via Phabricator < revi...@reviews.llvm.org> wrote: > kamaub added a comment. > > This change causes a linking failure during the `check-all` testing of > 'clang-tools-extra' on th

[PATCH] D134369: [Clang] Support constexpr builtin fmax

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. I've got an email about "Buildbot failure" with this link: https://lab.llvm.org/buildbot/#/builders/216/builds/10955 Line 51: 'static_assert' with no message is a C++17 extension Why is it failing if pre-merge checks has been passed? =( Repository: rG LLVM Github M

[PATCH] D135422: Fix clang-format misattributing preprocessor directives to macros

2022-10-07 Thread Jacob Abraham via Phabricator via cfe-commits
jacob-abraham updated this revision to Diff 466166. jacob-abraham added a comment. Fix patch, sorry about that CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135422/new/ https://reviews.llvm.org/D135422 Files: clang/lib/Format/UnwrappedLineFormatter.cpp clang/test/Format/macro.cpp

[PATCH] D135422: Fix clang-format misattributing preprocessor directives to macros

2022-10-07 Thread Jacob Abraham via Phabricator via cfe-commits
jacob-abraham updated this revision to Diff 466165. jacob-abraham added a comment. Added regression test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135422/new/ https://reviews.llvm.org/D135422 Files: clang/test/Format/macro.cpp Index: clang/test/Format/macro.cpp

[PATCH] D135466: [clang-format] Add support to remove unnecessary semicolons after function definition

2022-10-07 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Maybe even extend the option to other unnecessary semicolons like `int x = 5;;` or other noop statements, one just has to be careful not to remove the semicolon when it's the sole if/loop body. Comment at: clang/include/clang/Format/Format.

[PATCH] D135326: Half-done attempt to move tail padding callback from TargetCXXABI to TargetInfo

2022-10-07 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Basic/Targets/OSTargets.h:169 +if (T.getOS() == llvm::Triple::WatchOS || +this->getCXXABI().getKind() == TargetCXXABI::AppleARM64) + return TargetInfo::UseTailPaddingUnlessPOD11; dblaikie wrot

[PATCH] D134369: [Clang] Support constexpr builtin fmax

2022-10-07 Thread Evgeny Shulgin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0edff6faa266: [Clang] Support constexpr builtin fmax (authored by Izaron). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134369/new/ https://reviews.llvm.or

[clang] 0edff6f - [Clang] Support constexpr builtin fmax

2022-10-07 Thread Evgeny Shulgin via cfe-commits
Author: Evgeny Shulgin Date: 2022-10-07T20:27:17Z New Revision: 0edff6faa26664772c41fed8d7759bba703f4987 URL: https://github.com/llvm/llvm-project/commit/0edff6faa26664772c41fed8d7759bba703f4987 DIFF: https://github.com/llvm/llvm-project/commit/0edff6faa26664772c41fed8d7759bba703f4987.diff LOG

[PATCH] D135328: [CUDA] Refactored CUDA version housekeeping to use less boilerplate.

2022-10-07 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/D135328/new/ https://reviews.llvm.org/D135328 __

[PATCH] D129755: Thread safety analysis: Support copy-elided production of scoped capabilities through arbitrary calls

2022-10-07 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D129755#3843146 , @aaronpuchert wrote: > In D129755#3842729 , @hans wrote: > >> We're hitting a false positive in grpc after this: >> >> > ../../third_party/grpc/src/src/core/lib/gprpp/

[PATCH] D135370: Narrow inline namespace filtration for unqualified friend declarations

2022-10-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Should we also add a release note or do we think this isn't enough of a compile-time performance improvement to warrant that? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

  1   2   >