[PATCH] D131046: [clang-tools-extra]Replace find/insert with try_emplace

2022-08-03 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang added inline comments. Comment at: clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp:140 +// This replacement is a duplicate of one suggested by another TU. +if (!InsertPos.second) { return; Pre

[PATCH] D130807: [InstrProf] Add the skipprofile attribute

2022-08-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130807/new/ https://reviews.llvm.org/D130807 ___

[PATCH] D130808: [InstrProf] Add new format for -fprofile-list=

2022-08-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/include/clang/Basic/ProfileList.h:31-38 + enum ExclusionType { +/// Profiling is allowed. +ALLOW, +/// Profiling is skipped using the \p s

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-08-03 Thread Thomas Etter via Phabricator via cfe-commits
thomasetter updated this revision to Diff 449565. thomasetter added a comment. Added a description to the release notes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130130/new/ https://reviews.llvm.org/D130130 Files: clang-tools-extra/clang-tidy/readability/AvoidConstParamsInDecls.c

[PATCH] D131052: [CMake] Allow setting the location of host tools with LLVM_NATIVE_TOOL_DIR

2022-08-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: sammccall, tstellar, smeenai, beanz. Herald added subscribers: carlosgalvezp, mgorny. Herald added a project: All. mstorsjo requested review of this revision. Herald added projects: LLVM, clang-tools-extra. Herald added a subscriber: cfe-com

[PATCH] D131046: [clang-tools-extra]Replace find/insert with try_emplace

2022-08-03 Thread ppenguin via Phabricator via cfe-commits
prehistoric-penguin updated this revision to Diff 449569. prehistoric-penguin added a comment. Fix per comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131046/new/ https://reviews.llvm.org/D131046 Files: clang-tools-extra/clang-apply-replac

[PATCH] D131046: [clang-tools-extra]Replace find/insert with try_emplace

2022-08-03 Thread ppenguin via Phabricator via cfe-commits
prehistoric-penguin updated this revision to Diff 449570. prehistoric-penguin added a comment. Update commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131046/new/ https://reviews.llvm.org/D131046 Files: clang-tools-extra/clang-apply-

[PATCH] D131046: [clang-tools-extra]Replace find/insert with try_emplace

2022-08-03 Thread ppenguin via Phabricator via cfe-commits
prehistoric-penguin added inline comments. Comment at: clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp:140 +// This replacement is a duplicate of one suggested by another TU. +if (!InsertPos.second) { return; --

[PATCH] D131046: [clang-tools-extra]Replace find/insert with try_emplace

2022-08-03 Thread ppenguin via Phabricator via cfe-commits
prehistoric-penguin updated this revision to Diff 449572. prehistoric-penguin added a comment. Format change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131046/new/ https://reviews.llvm.org/D131046 Files: clang-tools-extra/clang-apply-replacem

[PATCH] D128379: [clangd] Change the url for clang-tidy check documentation

2022-08-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks a lot, lgtm! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128379/new/ https://reviews.llvm.org/D128379

[PATCH] D131046: [NFC][clang-tools-extra]Replace find/insert with try_emplace

2022-08-03 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang accepted this revision. avogelsgesang added a comment. This revision is now accepted and ready to land. The change itself looks good. Please look into the CI failures before landing this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D131057: [Sema] -Wformat: support C23 printf %b %B

2022-08-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: aaron.ballman, dim, enh, erik.pilkington. Herald added a subscriber: StephenFan. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Close #56885. %b %

[PATCH] D131046: [NFC][clang-tools-extra]Replace find/insert with try_emplace

2022-08-03 Thread ppenguin via Phabricator via cfe-commits
prehistoric-penguin updated this revision to Diff 449579. prehistoric-penguin added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131046/new/ https://reviews.l

[PATCH] D131046: [NFC][clang-tools-extra]Replace find/insert with try_emplace

2022-08-03 Thread ppenguin via Phabricator via cfe-commits
prehistoric-penguin updated this revision to Diff 449581. prehistoric-penguin added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131046/new/ https://reviews.llvm.org/D131046 Files: clang-tools-extra/clang-apply-replacements/li

[clang] 11e52ec - [clang] Short-circuit trivial constructors when evaluating arrays

2022-08-03 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2022-08-03T10:38:15+02:00 New Revision: 11e52ecf74e942b738fa8496960bbb2f0a7373de URL: https://github.com/llvm/llvm-project/commit/11e52ecf74e942b738fa8496960bbb2f0a7373de DIFF: https://github.com/llvm/llvm-project/commit/11e52ecf74e942b738fa8496960bbb2f0a7373de.diff LO

[PATCH] D130791: [clang] Short-circuit trivial constexpr array constructors

2022-08-03 Thread Timm Bäder 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 rG11e52ecf74e9: [clang] Short-circuit trivial constructors when evaluating arrays (authored by tbaeder). Changed prior to commit: https://reviews.ll

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 449589. tbaeder added a comment. I just took the plunge and made `DiagnoseStaticAssertDetails()` take into account all static assertions, regardless of integer literals. It now also prints integers, booleans, chars and floats correctly. For example: test

[clang] f4b9c07 - [clang][NFC] Try to fix the docs build

2022-08-03 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2022-08-03T10:52:02+02:00 New Revision: f4b9c0735e339b177d98fe69cf210eea00c0af62 URL: https://github.com/llvm/llvm-project/commit/f4b9c0735e339b177d98fe69cf210eea00c0af62 DIFF: https://github.com/llvm/llvm-project/commit/f4b9c0735e339b177d98fe69cf210eea00c0af62.diff LO

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16574 + if (BoolValue) { +Str.push_back('t'); +Str.push_back('r'); I really hope there's a better way to do this that I just don't know about :) CHANGES SINCE LAST AC

[PATCH] D130754: [X86] Support ``-mindirect-branch-cs-prefix`` for call and jmp to indirect thunk

2022-08-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6350 + if (Args.hasArg(options::OPT_mindirect_branch_cs_prefix)) +CmdArgs.push_back("-mindirect-branch-cs-prefix"); MaskRay wrote: > This is not needed with the TableGen CC1Op

[PATCH] D125142: [clang][auto-init] Remove -enable flag for "zero" mode

2022-08-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D125142#3505767 , @jfb wrote: > I think the most relevant post from @rsmith is: > https://discourse.llvm.org/t/making-ftrivial-auto-var-init-zero-a-first-class-option/55143/40 > > He has a prototype: https://reviews.llvm.org/

[PATCH] D129131: Remove uses of llvm_shutdown

2022-08-03 Thread Nicolai Hähnle via Phabricator via cfe-commits
nhaehnle added inline comments. Comment at: polly/lib/External/isl/interface/extract_interface.cc:590 delete Clang; - llvm::llvm_shutdown(); Meinersbur wrote: > This file is imported from the upstream project > (https://repo.or.cz/isl.git/blob/29

[PATCH] D129131: Remove uses of llvm_shutdown

2022-08-03 Thread Nicolai Hähnle via Phabricator via cfe-commits
nhaehnle updated this revision to Diff 449609. nhaehnle added a comment. Address review comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129131/new/ https://reviews.llvm.org/D129131 Files: bolt/tools/driver/llvm-bolt.cpp bolt/tools/merge-

[PATCH] D131046: [NFC][clang-tools-extra]Replace find/insert with try_emplace

2022-08-03 Thread ppenguin via Phabricator via cfe-commits
prehistoric-penguin added a comment. CI failed since LLVM are still using c++14 to build CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DBUILD_EXAMPLES -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: iains, urnathan, erichkeane, aaron.ballman, tahonermann, ilya-biryukov, Mordante, tschuett, philnik. ChuanqiXu added projects: clang-modules, clang-language-wg. Herald added a subscriber: arphaman. Herald added a project: All. ChuanqiXu r

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:377-393 + │ │ ││ + ├─ frontend ─┼─

[PATCH] D130689: [LLVM] Update C++ standard to 17

2022-08-03 Thread Tobias Hieta via Phabricator via cfe-commits
thieta added a comment. @nikic @thakis I fixed this issue in https://reviews.llvm.org/D131063 and it can be built with CXX_STANDARD=17 and OSX_DEPLOYMENT_TARGET=10.11. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130689/new/ https://reviews.llvm.

[PATCH] D129973: [clang] Pass FoundDecl to DeclRefExpr creator for operator overloads

2022-08-03 Thread joanahalili via Phabricator via cfe-commits
joanahalili added a comment. Heads up: This commit causes clang crashes on our end. We are currently working on a reproducer and will post it as soon as its ready. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129973/new/ https://reviews.llvm.org/

[PATCH] D130630: [clang-tidy] Add readability-nested-ifs check

2022-08-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 449621. njames93 added a comment. Handle cases where the fix is incorrect due to operator precedence. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130630/new/ https://reviews.llvm.org/D130630 Files: clang-

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 449625. tbaeder added a comment. Whatever, I had time and you're still asleep, so I updated the output: test.cpp:30:1: error: static assertion failed due to requirement 'inv(true) == inv(false)' static_assert(inv(true) == inv(false)); ^ ~~~

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-03 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https:/

[PATCH] D131066: [clangd] Add option to disable inlay hints for init lists when building array.

2022-08-03 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, nridge. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang

[PATCH] D131066: [clangd] Add option to disable inlay hints for init lists when building array.

2022-08-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm not 100% sold on this way of setting this up. There is definitely a use case for splitting the current Designators option into 2, one of them just controlling arrays. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13106

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:468-469 + +(This may be an implementation defect. Although we could argue that header units have no name according to the spec, +it is natural that we couldn't search it. But this is not user friendly

[PATCH] D131067: [analyzer] Treat values passed as parameter as escaped

2022-08-03 Thread Thomas Weißschuh via Phabricator via cfe-commits
t-8ch created this revision. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. t-8ch requested review of this revision. Her

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-03 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:170 + /// Returns the `DeclCtx` of the block being analysed if provided, otherwise + ///

[PATCH] D130689: [LLVM] Update C++ standard to 17

2022-08-03 Thread Fraser Cormack via Phabricator via cfe-commits
frasercrmck added inline comments. Comment at: llvm/docs/ReleaseNotes.rst:55 +This means that the the following versions are now required to build LLVM +and there is no way to supress this error. + `suppress` Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 449637. tbaeder added a comment. Also print `nullptr` expressions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130894/new/ https://reviews.llvm.org/D130894 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-03 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:216 const auto *FuncDecl = Call->getDirectCallee(); assert(FuncDecl != nullptr); I think you need to set the `DeclCtx` field here (or at least, somewhere

[PATCH] D130951: [HLSL] CodeGen hlsl resource binding.

2022-08-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.h:46 public: + struct ResBinding { +llvm::Optional Reg; Does this apply to buffers only? In which case it might be better to either nest this into Buffer definition or rename into

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 449639. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130894/new/ https://reviews.llvm.org/D130894 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaDeclCXX.

[PATCH] D131012: No longer place const volatile global variables in a read only section

2022-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman planned changes to this revision. aaron.ballman added a comment. In D131012#3695110 , @anakryiko wrote: > This will severly break BPF users, as we have a heavy reliance on `const > volatile` variables being allocated to `.rodata`, which are

[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Sam Estep via Phabricator via cfe-commits
samestep added a comment. Looks awesome, thanks @ymandel! Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:23 #include "clang/AST/Stmt.h" -#include "clang/Analysis/CFG.h" #include "clang/Analysis/FlowSensitive/ControlFlowContext.h" I'

[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 4 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:34 + /// Builds a ControlFlowContext from an AST node. `D` is the function in which + /// `S` resides. All arguments must be non

[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 449648. ymandel marked 4 inline comments as done. ymandel added a comment. addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131039/new/ https://reviews.llvm.org/D131039 Files: clang/include/c

[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 449649. ymandel added a comment. adusted interface to return (nullable) pointer rather than reference. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131039/new/ https://reviews.llvm.org/D131039 Files: clang/

[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:34 + /// Builds a ControlFlowContext from an AST node. `D` is the function in which + /// `S` resides. All arguments must be non-null. st

[PATCH] D131070: [clang][sema] Fix collectConjunctionTerms()

2022-08-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added a reviewer: aaron.ballman. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Consider: A == 5 && A != 5 IfA is 5, the old collectConjunctionTerms() would call

[PATCH] D130863: [clangd] Make git ignore index directories

2022-08-03 Thread sums via Phabricator via cfe-commits
sums marked an inline comment as done. sums added a comment. Thank you for the reviews and discussion, everyone! TIL about `.git/info/exclude`. It'll let me exclude stuff without updating the checked in `.gitignore`. I was achieving the same effect for clangd by manually creating a `.gitignore`

[libunwind] 44b4f4d - [libunwind] Remove unused substitution in AIX libunwind config

2022-08-03 Thread Louis Dionne via cfe-commits
Author: Louis Dionne Date: 2022-08-03T09:28:39-04:00 New Revision: 44b4f4df31ab71457ecd7127e64526cd8237bfa4 URL: https://github.com/llvm/llvm-project/commit/44b4f4df31ab71457ecd7127e64526cd8237bfa4 DIFF: https://github.com/llvm/llvm-project/commit/44b4f4df31ab71457ecd7127e64526cd8237bfa4.diff

[clang] 84831bd - [SystemZ] Make 128 bit integers be aligned to 8 bytes.

2022-08-03 Thread Jonas Paulsson via cfe-commits
Author: Jonas Paulsson Date: 2022-08-03T15:39:54+02:00 New Revision: 84831bdfedbad8221a529a640d0f4bd9d0e3ba7b URL: https://github.com/llvm/llvm-project/commit/84831bdfedbad8221a529a640d0f4bd9d0e3ba7b DIFF: https://github.com/llvm/llvm-project/commit/84831bdfedbad8221a529a640d0f4bd9d0e3ba7b.diff

[PATCH] D130900: [SystemZ] Make 128 bit integers be aligned to 8 bytes.

2022-08-03 Thread Jonas Paulsson 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 rG84831bdfedba: [SystemZ] Make 128 bit integers be aligned to 8 bytes. (authored by jonpa). Herald added a project: clang. Herald added a subscriber: c

[clang] fb65b17 - [NFCI] Refactor how KeywordStatus is calculated

2022-08-03 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2022-08-03T06:41:43-07:00 New Revision: fb65b17932e1163adeda943a3a36f9b482b97f47 URL: https://github.com/llvm/llvm-project/commit/fb65b17932e1163adeda943a3a36f9b482b97f47 DIFF: https://github.com/llvm/llvm-project/commit/fb65b17932e1163adeda943a3a36f9b482b97f47.diff L

[PATCH] D131007: [NFCI] Refactor how KeywordStatus is calculated

2022-08-03 Thread Erich Keane 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 rGfb65b17932e1: [NFCI] Refactor how KeywordStatus is calculated (authored by erichkeane). Herald added a project: clang. Changed prior to commit: ht

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-08-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:99 +- The :doc:`readability-avoid-const-params-in-decls + ` check does not Please move it to `Changes in existing checks` section. CHANGES SINCE LAST ACTION https://r

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 449657. ChuanqiXu added a comment. Remove the discussion about the difference about macro in clang module and header units since we need more discussion about it. And the discussion is not necessary about the docs. CHANGES SINCE LAST ACTION https://rev

[PATCH] D129353: [clang-tidy] Improve check cert-dcl58-cpp.

2022-08-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This appears to be causing a crash with friend declarations. The crash happens during matching, see https://github.com/llvm/llvm-project/issues/56902 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129353/new/ https://revie

[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 449658. ymandel marked 2 inline comments as done. ymandel added a comment. update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131039/new/ https://reviews.llvm.org/D131039 Files: clang/include/clang/Analys

[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 449660. ymandel added a comment. tweaks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131039/new/ https://reviews.llvm.org/D131039 Files: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h cl

[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:34 + /// Builds a ControlFlowContext from an AST node. `D` is the function in which + /// `S` resides. All arguments must be non-null. static llvm::Expected build(cons

[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 449661. ymandel added a comment. comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131039/new/ https://reviews.llvm.org/D131039 Files: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h c

[PATCH] D131007: [NFCI] Refactor how KeywordStatus is calculated

2022-08-03 Thread Pavel Labath via Phabricator via cfe-commits
labath added a comment. This seems to break lldb tests, specifically the compilation of this source file. The compile fails with an assertion (`Keyword not known to come from a newer Standard o

[PATCH] D131007: [NFCI] Refactor how KeywordStatus is calculated

2022-08-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D131007#3696486 , @labath wrote: > This seems to break lldb tests, specifically the compilation of this > > source file.

[clang] bf6db18 - Fix char8_t in C mode regression from fb65b179

2022-08-03 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2022-08-03T07:15:30-07:00 New Revision: bf6db18e52815475baebff2c330763fedac6b5e4 URL: https://github.com/llvm/llvm-project/commit/bf6db18e52815475baebff2c330763fedac6b5e4 DIFF: https://github.com/llvm/llvm-project/commit/bf6db18e52815475baebff2c330763fedac6b5e4.diff L

[PATCH] D131007: [NFCI] Refactor how KeywordStatus is calculated

2022-08-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D131007#3696489 , @erichkeane wrote: > In D131007#3696486 , @labath wrote: > >> This seems to break lldb tests, specifically the compilation of this >>

[PATCH] D131007: [NFCI] Refactor how KeywordStatus is calculated

2022-08-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D131007#3696495 , @erichkeane wrote: > In D131007#3696489 , @erichkeane > wrote: > >> In D131007#3696486 , @labath wrote: >> >>> This seem

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. FWIW, complex numbers are already covered it seems: test.cpp:35:1: error: static assertion failed due to requirement '__real c == __imag c' static_assert(__real c == __imag c); ^ test.cpp:35:24: note: expression evaluates to 5 ==

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-03 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 449664. wyt added a comment. Update DeclCtx when pushing/popping calls. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131065/new/ https://reviews.llvm.org/D131065 Files: clang/include/clang/Analysis/FlowSensitiv

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-08-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D102107#3685694 , @dhruvachak wrote: > @jdoerfert With this patch, additional remarks are being generated. Please > check whether the new OMP121 remarks in the following tests are OK. > > Clang :: OpenMP/remarks_parallel_in

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-03 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 449666. wyt marked 3 inline comments as done. wyt added a comment. Formatting fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131065/new/ https://reviews.llvm.org/D131065 Files: clang/include/clang/Analysis

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-03 Thread weiyi via Phabricator via cfe-commits
wyt added a reviewer: samestep. wyt removed a subscriber: samestep. wyt added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:170-172 + const DeclContext &DeclCtxArg) : Environment(DACtx) { + DeclCtx = &DeclCtxAr

[PATCH] D130600: [clang][dataflow] Handle return statements

2022-08-03 Thread Sam Estep via Phabricator via cfe-commits
samestep updated this revision to Diff 449667. samestep added a comment. Rebase and address all comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130600/new/ https://reviews.llvm.org/D130600 Files: clang/include/clang/Analysis/FlowSensitive

[PATCH] D130705: [clang][ASTImporter] Improve import of functions with auto return type.

2022-08-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 449668. balazske added a comment. - Added a new test - Call the visitor only if the function has auto return type Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130705/new/ https://reviews.llvm.org/D130705 Fil

[PATCH] D130600: [clang][dataflow] Handle return statements

2022-08-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:134 StorageLocation *ThisPointeeLoc = nullptr; + StorageLocation *ReturnLoc = null

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 449669. tbaeder added a comment. Ignore what I said, they are supported now though. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130894/new/ https://reviews.llvm.org/D130894 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Diagnost

[PATCH] D130600: [clang][dataflow] Handle return statements

2022-08-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Please ignore my previous comments from an earlier revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130600/new/ https://reviews.llvm.org/D130600 ___ cfe-commits mailing li

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D130894#3696534 , @tbaeder wrote: > FWIW, complex numbers are already covered it seems: > > test.cpp:35:1: error: static assertion failed due to requirement '__real c > == __imag c' > static_assert(__real c == __imag c);

[clang] 692e030 - [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-08-03T15:17:49Z New Revision: 692e03039d1ee57c06c0cfae68b91bc5bfd99f6e URL: https://github.com/llvm/llvm-project/commit/692e03039d1ee57c06c0cfae68b91bc5bfd99f6e DIFF: https://github.com/llvm/llvm-project/commit/692e03039d1ee57c06c0cfae68b91bc5bfd99f6e.diff

[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

2022-08-03 Thread Yitzhak Mandelbaum 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 rG692e03039d1e: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls. (authored by ymandel). Repository: rG LLVM Github Monorepo

[PATCH] D130888: [Clang] Introduce -fexperimental-sanitize-metadata=

2022-08-03 Thread Marco Elver via Phabricator via cfe-commits
melver updated this revision to Diff 449671. melver marked 4 inline comments as done. melver added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130888/new/ https://reviews.llvm.org/D130888 Files: clang/include/clang

[PATCH] D130888: [Clang] Introduce -fexperimental-sanitize-metadata=

2022-08-03 Thread Marco Elver via Phabricator via cfe-commits
melver added inline comments. Comment at: clang/lib/Driver/SanitizerArgs.cpp:839 + // Parse -f(no-)?sanitize-metadata. + for (const auto *Arg : Args) { +if (Arg->getOption().matches( MaskRay wrote: > Use `Args.getLastArg(...)` This won't work if someone doe

[PATCH] D130933: Add docs for function attributes hot/cold

2022-08-03 Thread David Li via Phabricator via cfe-commits
davidxl accepted this revision. davidxl added a comment. This revision is now accepted and ready to land. LGTM from the content point of view. Please also address aaron's comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130933/new/ https://re

[PATCH] D130889: [llvm] Introduce a pass plugin registry and loader

2022-08-03 Thread wael yehia via Phabricator via cfe-commits
w2yehia added a comment. Looks good. Thanks. Comment at: llvm/lib/Passes/PassPluginLoader.cpp:23 +void PassPluginLoader::operator=(const std::string &Filename) { + sys::SmartScopedLock Lock(*PluginsLock); + auto PassPlugin = PassPlugin::Load(Filename); why do

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130894#3696590 , @xbolva00 wrote: > Use ‘5 ==6’ ? So add quotes .. +1 to the suggestion to use quotes for a bit of visual distinction between the diagnostic message and the code embedded within it.

[PATCH] D123967: Disable update_cc_test_checks.py tests in stand-alone builds

2022-08-03 Thread Tom Stellard via Phabricator via cfe-commits
tstellar updated this revision to Diff 449681. tstellar marked an inline comment as done. tstellar added a comment. Fix option spelling. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123967/new/ https://reviews.llvm.org/D123967 Files: clang/test

[PATCH] D123967: Disable update_cc_test_checks.py tests in stand-alone builds

2022-08-03 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added inline comments. Comment at: clang/test/utils/update_cc_test_checks/lit.local.cfg:19 +# for any of the clang source code. +config.unsupported = True else: h-vetinari wrote: > I couldn't tell from the diff where this is used (though admitte

[PATCH] D131076: [clang][modules] Don't depend on sharing FileManager during module build

2022-08-03 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: bnbarham. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Sharing the FileManager between the importer and the module build should onl

[PATCH] D129016: [PowerPC] implemented @llvm.ppc.kill.canary to corrupt stack guard

2022-08-03 Thread Paul Scoropan via Phabricator via cfe-commits
pscoro updated this revision to Diff 449683. pscoro added a comment. removed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129016/new/ https://reviews.llvm.org/D129016 Files: clang/include/clang/Basic/BuiltinsPPC.def clang/lib/Basic/T

[clang] a7bca18 - Fix assert during the call to getCanonicalDecl.

2022-08-03 Thread Jennifer Yu via cfe-commits
Author: Jennifer Yu Date: 2022-08-03T09:14:28-07:00 New Revision: a7bca18bc50cd2483fded0c77706980b2721ce6a URL: https://github.com/llvm/llvm-project/commit/a7bca18bc50cd2483fded0c77706980b2721ce6a DIFF: https://github.com/llvm/llvm-project/commit/a7bca18bc50cd2483fded0c77706980b2721ce6a.diff L

[PATCH] D131024: Fix assert in the call to isOpenMPRebuildMemberExpr

2022-08-03 Thread Jennifer Yu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa7bca18bc50c: Fix assert during the call to getCanonicalDecl. (authored by jyu2). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131024/new/ https://reviews.

[PATCH] D130123: Extend ptr32 support to be applied on typedef

2022-08-03 Thread Ariel Burton via Phabricator via cfe-commits
Ariel-Burton added a comment. In D130123#3691011 , @rnk wrote: > That sounds reasonable to me, I confirmed that MSVC really only lets you > apply these attributes directly to pointer types and to typedefs. > > Can you add a test for the other most common

[PATCH] D130123: Extend ptr32 support to be applied on typedef

2022-08-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D130123#3696752 , @Ariel-Burton wrote: > What is your expectation for your template code fragment? MSVC does not > accept it. Yes, I checked, MSVC rejects it, so clang should have test expectations to confirm that. It seems in

[PATCH] D131012: No longer place const volatile global variables in a read only section

2022-08-03 Thread Andrii Nakryiko via Phabricator via cfe-commits
anakryiko added a comment. In D131012#3696327 , @aaron.ballman wrote: > In D131012#3695110 , @anakryiko > wrote: > >> This will severly break BPF users, as we have a heavy reliance on `const >> volatile` variab

[PATCH] D130964: [X86][BF16] Enable __bf16 for x86 targets.

2022-08-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D130964#3695408 , @FreddyYe wrote: > In D130964#3694540 , @bkramer wrote: > >> In D130964#3694473 , @rjmccall >> wrote: >> >>> How are you ac

[clang] 6a79e2f - [clang] Add FileEntryRef::getNameAsRequested()

2022-08-03 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-03T09:41:08-07:00 New Revision: 6a79e2ff1989b48f4a8ebf3ac51092eb8ad29e37 URL: https://github.com/llvm/llvm-project/commit/6a79e2ff1989b48f4a8ebf3ac51092eb8ad29e37 DIFF: https://github.com/llvm/llvm-project/commit/6a79e2ff1989b48f4a8ebf3ac51092eb8ad29e37.diff

[PATCH] D131004: [clang] Add FileEntryRef::getNameAsRequested()

2022-08-03 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6a79e2ff1989: [clang] Add FileEntryRef::getNameAsRequested() (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131004/new/ https://re

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 449690. cor3ntin added a comment. Missed a comment (s/ValueDecl/auto/ on the LHS of a `cast`) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://reviews.llvm.org/D122768 Files: clang-tools-ex

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. I mostly only have minor nits, but otherwise this LGTM! Comment at: clang/docs/ReleaseNotes.rst:104-105 +- Support capturing structured bindings in lambdas +

[PATCH] D124435: [X86] Always extend the integer parameters in callee

2022-08-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. That is an interesting idea. I like that it integrates this into `-fclang-abi-compat`. The way that `-mno-conservative-small-integer-abi` ends up meaning opposite things based on the abi-compat setting worries me a lot, though. Repository: rG LLVM Github Monorepo

[PATCH] D129097: [clang][dataflow] Handle null pointers of type std::nullptr_t

2022-08-03 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua marked an inline comment as done. li.zhe.hua added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:96 /// /// `Type` must not be null. StorageLocation &getStableStorageLocation(QualType Type); ---

  1   2   >