[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-09 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. Herald added a project: All. royjacobson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I accidentally broke friend destructor declarations in D130936 . Fix it by

[PATCH] D131396: [pseudo] Use C++17 variant to simplify the DirectiveTree::Chunk class, NFC.

2022-08-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Nice! Comment at: clang-tools-extra/pseudo/lib/DirectiveTree.cpp:187 +Dumper dumper(OS); \ +dumper(T);

[PATCH] D131479: Handle explicitly defaulted consteval special members.

2022-08-09 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 451353. usaxena95 added a comment. Verify that non-consteval constructors (among others) cannot be used in a consteval context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131479/new/

[PATCH] D125418: [Arm64EC 6/?] Implement C/C++ mangling for Arm64EC function definitions.

2022-08-09 Thread chenglin.bi via Phabricator via cfe-commits
bcl5980 added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:5128 +// to the function itself; it points to a stub for the compiler. +// FIXME: We also need to emit an entry thunk. +SmallString<256> MangledName; efriedma wrote: >

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 451352. manojgupta added a comment. Going back to older handlesTarget() style in Baremetal. Apparently RISCV can be both Baremetal or RISCVToolchain for the same tuple. I do not know of the nuances so trying not to disturb that for now. Repository: rG

[PATCH] D131479: Handle explicitly defaulted consteval special members.

2022-08-09 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 451333. usaxena95 added a comment. Added tests for multiple constructors in a templated class. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131479/new/ https://reviews.llvm.org/D131479 Files:

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

2022-08-09 Thread ChenZheng via Phabricator via cfe-commits
shchenz added inline comments. Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:10744 +Store = DAG.getStore( +Op->getOperand(0), DL, +DAG.getNode(ISD::XOR, DL, VT, Load, DAG.getAllOnesConstant(DL, VT)), Nit: Maybe we need to set the

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

2022-08-09 Thread Phoebe Wang 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 rGe4888a37d367: [X86][BF16] Enable __bf16 for x86 targets. (authored by FreddyYe, committed by pengfei). Changed prior to commit:

[clang] e4888a3 - [X86][BF16] Enable __bf16 for x86 targets.

2022-08-09 Thread Phoebe Wang via cfe-commits
Author: Freddy Ye Date: 2022-08-10T09:00:47+08:00 New Revision: e4888a37d36780872d685c68ef8b26b2e14d6d39 URL: https://github.com/llvm/llvm-project/commit/e4888a37d36780872d685c68ef8b26b2e14d6d39 DIFF: https://github.com/llvm/llvm-project/commit/e4888a37d36780872d685c68ef8b26b2e14d6d39.diff

[PATCH] D131528: [Clang] Restrict non fixed enum to a value outside the range of the enumeration values warning to context requiring a constant expression

2022-08-09 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Lg CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131528/new/ https://reviews.llvm.org/D131528 ___ cfe-commits mailing list

[PATCH] D131466: [clang] add APValue type check in `TryPrintAsStringLiteral`

2022-08-09 Thread YingChi Long 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 rG55d3b79d159b: [clang] add APValue type check in `TryPrintAsStringLiteral` (authored by inclyc). Repository: rG LLVM Github Monorepo CHANGES

[clang] 55d3b79 - [clang] add APValue type check in `TryPrintAsStringLiteral`

2022-08-09 Thread YingChi Long via cfe-commits
Author: YingChi Long Date: 2022-08-10T08:42:59+08:00 New Revision: 55d3b79d159bab53b140860279486db8a1c0e4f3 URL: https://github.com/llvm/llvm-project/commit/55d3b79d159bab53b140860279486db8a1c0e4f3 DIFF: https://github.com/llvm/llvm-project/commit/55d3b79d159bab53b140860279486db8a1c0e4f3.diff

[PATCH] D131525: [analyzer] Fix false positive in use-after-move checker

2022-08-09 Thread Malavika Samak via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc74a204826da: [analyzer] Fix false positive in use-after-move checker (authored by malavikasamak). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github

[clang] c74a204 - [analyzer] Fix false positive in use-after-move checker

2022-08-09 Thread via cfe-commits
Author: malavikasamak Date: 2022-08-09T17:26:30-07:00 New Revision: c74a204826da331cb18023c626b0717d5b8a927d URL: https://github.com/llvm/llvm-project/commit/c74a204826da331cb18023c626b0717d5b8a927d DIFF: https://github.com/llvm/llvm-project/commit/c74a204826da331cb18023c626b0717d5b8a927d.diff

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc planned changes to this revision. inclyc added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5431 +static bool CheckTypeTraitArgNumber(TypeTrait Kind, size_t N) { + if (Kind <= UTT_Last) +return N == 1; I think we should report a

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 451325. manojgupta added a comment. Fix clang-format complains. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131225/new/ https://reviews.llvm.org/D131225 Files: clang/lib/Driver/Driver.cpp

[PATCH] D129570: Add new clang-tidy check to find implicit conversions from enum to integer.

2022-08-09 Thread Artem Tamazov via Phabricator via cfe-commits
artem.tamazov accepted this revision. artem.tamazov 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/D129570/new/ https://reviews.llvm.org/D129570

[PATCH] D131298: [clang-doc] Read docstrings for record members

2022-08-09 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. LGTM, modulo the small fixes I've left inline Comment at: clang-tools-extra/clang-doc/Serialize.cpp:439 +static void populateMemberTypeInfo(MemberTypeInfo , const FieldDecl *D) { + assert(D); + ASTContext& Context = D->getASTContext();

[PATCH] D131533: [Flang][Driver] Enable PIC in the frontend

2022-08-09 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem created this revision. mnadeem added a project: Flang. Herald added a subscriber: jdoerfert. Herald added a reviewer: sscalpone. Herald added a reviewer: awarzynski. Herald added a project: All. mnadeem requested review of this revision. Herald added subscribers: cfe-commits, MaskRay.

[PATCH] D131532: [Sema] Only invoke DiagnoseNullConversions for CPlusPlus (-Wnull-conversion)

2022-08-09 Thread Justin Stitt via Phabricator via cfe-commits
justinstitt created this revision. Herald added a subscriber: pengfei. Herald added a project: All. justinstitt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. -Wnull-conversion is not supported in C and therefore DiagnoseNullConversions

[PATCH] D131528: [Clang] Restrict non fixed enum to a value outside the range of the enumeration values warning to context requiring a constant expression

2022-08-09 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 451318. shafik added a comment. - Adding test to confirm the warning does not trigger outside of a constant expression context. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131528/new/ https://reviews.llvm.org/D131528 Files:

[PATCH] D131514: [analyzer] {NFC} Add more test cases for equality tracking

2022-08-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Tests always welcome! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131514/new/ https://reviews.llvm.org/D131514

[PATCH] D130936: [SemaCXX] Validate destructor is valid for dependent classes

2022-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. This does not work for friend declarations. template struct A { friend T::S::~S(); private: static constexpr int secret = 42; }; struct Q { struct S { ~S(); }; }; Q::S::~S() { void foo(int); foo(A::secret); }

[libunwind] df9a23e - [libunwind] Use `_dl_find_object` if available

2022-08-09 Thread Adrian Vogelsgesang via cfe-commits
Author: Adrian Vogelsgesang Date: 2022-08-09T16:19:13-07:00 New Revision: df9a23e2feda18f0308b6d4dbd591ebe6b605aa4 URL: https://github.com/llvm/llvm-project/commit/df9a23e2feda18f0308b6d4dbd591ebe6b605aa4 DIFF:

[PATCH] D131298: [clang-doc] Read docstrings for record members

2022-08-09 Thread Brett Wilson via Phabricator via cfe-commits
brettw updated this revision to Diff 451299. brettw marked an inline comment as done. brettw added a comment. I updated the comment test that's not currently working with a TODO. There are some open questions in the code review about some bigger questions about this tool. Since this has been

[PATCH] D130108: git-clang-format: format index not worktree when using --staged

2022-08-09 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. This revision is now accepted and ready to land. Please mark review comments as done if you have addressed them. Comment at: clang/tools/clang-format/git-clang-format:401 + # Copy the environment, because the files have

[PATCH] D131464: [test] Make tests pass regardless of gnu++14/gnu++17 default

2022-08-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/test/AST/ast-dump-openmp-begin-declare-variant_11.c:2 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify=c_mode -ast-dump %s | FileCheck %s --check-prefix=C -// RUN: %clang_cc1 -triple

[PATCH] D131528: [Clang] Restrict non fixed enum to a value outside the range of the enumeration values warning to context requiring a constant expression

2022-08-09 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Should there be a test case to verify that the warning isn't triggered in a non-constexpr context anymore? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131528/new/ https://reviews.llvm.org/D131528 ___ cfe-commits

[PATCH] D131448: Introduce iterator sentinel to make graph traversal implementation more efficient and cleaner

2022-08-09 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin added a comment. lgtm for the MLInlineAdvisor bit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131448/new/ https://reviews.llvm.org/D131448 ___ cfe-commits mailing list

[PATCH] D131307: [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2022-08-09 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. @zatrazz please see D131528 which should prevent the diagnostic for triggering for the example you showed us. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131307/new/

[PATCH] D131528: [Clang] Restrict non fixed enum to a value outside the range of the enumeration values warning to context requiring a constant expression

2022-08-09 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik created this revision. shafik added reviewers: erichkeane, aaron.ballman, zatrazz. Herald added a project: All. shafik requested review of this revision. In D131307 we allowed the diagnostic to be turned into a warning for a transition period. This had

[PATCH] D131274: [clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++"

2022-08-09 Thread Louis Dionne via Phabricator via cfe-commits
ldionne updated this revision to Diff 451287. ldionne added a comment. Fix more tests that failed on internal bots (but I can't reproduce the failure locally for some reason) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131274/new/

[PATCH] D129570: Add new clang-tidy check to find implicit conversions from enum to integer.

2022-08-09 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 updated this revision to Diff 451284. pfultz2 added a comment. Fix typo and merge from main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129570/new/ https://reviews.llvm.org/D129570 Files:

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 451282. python3kgae added a comment. Treat resource binding as "HLSLSemantic". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files:

[PATCH] D130516: [llvm] compression classes

2022-08-09 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D130516#3710903 , @ckissane wrote: > In D130516#3703691 , @dblaikie > wrote: > >> This is looking pretty close to what I've been picturing - the only thing >> remaining is that I

[PATCH] D130516: [llvm] compression classes

2022-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I have only taken very brief look at the new version. Having an enum class `CompressionKind` with a parallel `CompressionAlgorithm` seems redundant. `friend CompressionAlgorithm *CompressionKind::operator->() const;` looks magical. I hope that someone insisting on

[PATCH] D130516: [llvm] compression classes

2022-08-09 Thread Cole Kissane via Phabricator via cfe-commits
ckissane added a comment. In D130516#3703691 , @dblaikie wrote: > This is looking pretty close to what I've been picturing - the only thing > remaining is that I think we could get rid of `CompressionKind` and access > the `CompressionAlgorithm`

[PATCH] D127284: [clang-repl] Support statements on global scope in incremental mode.

2022-08-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. ping... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127284/new/ https://reviews.llvm.org/D127284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:224 // FIXME: Support references here. - Env.ReturnLoc = Env.getStorageLocation(*Call, SkipPast::Reference); + ReturnLoc = getStorageLocation(*Call, SkipPast::Reference);

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Sam Estep via Phabricator via cfe-commits
samestep updated this revision to Diff 451267. samestep added a comment. Remove Call parameter from pushCallInternal method Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131438/new/ https://reviews.llvm.org/D131438 Files:

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:224 // FIXME: Support references here. - Env.ReturnLoc = Env.getStorageLocation(*Call, SkipPast::Reference); + ReturnLoc = getStorageLocation(*Call, SkipPast::Reference);

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. Nice! We went from branches in the loop to branches before the loop first. And now the branches are at compile time during overload resolution. I love it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Sam Estep via Phabricator via cfe-commits
samestep updated this revision to Diff 451265. samestep added a comment. Pull type-specific logic into overloads Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131438/new/ https://reviews.llvm.org/D131438 Files:

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:219-245 // FIXME: Support references here. - Env.ReturnLoc = Env.getStorageLocation(*Call, SkipPast::Reference); + ReturnLoc = getStorageLocation(*Call,

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:219-245 // FIXME: Support references here. - Env.ReturnLoc = Env.getStorageLocation(*Call, SkipPast::Reference); + ReturnLoc = getStorageLocation(*Call,

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131438/new/ https://reviews.llvm.org/D131438 ___ cfe-commits mailing list

[PATCH] D113107: Support of expression granularity for _Float16.

2022-08-09 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. @pengfei , @rjmccall Thanks for the reviews. Sorry the updated patch took so long, I was on my sabbatical and returned back this week. I think I have responded to all the raised issues. Let me know if there is more to be done on this patch. Again thanks for the

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:219-245 // FIXME: Support references here. - Env.ReturnLoc = Env.getStorageLocation(*Call, SkipPast::Reference); + ReturnLoc = getStorageLocation(*Call, SkipPast::Reference);

[PATCH] D113107: Support of expression granularity for _Float16.

2022-08-09 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/test/CodeGen/X86/Float16-arithmetic.c:5-14 + // CHECK-LABEL: @add1 + // CHECK: [[A:%.*]] = alloca half + // CHECK-NEXT: [[B:%.*]] = alloca half + // CHECK: [[A_LOAD:%.*]] = load half, ptr [[A]] + // CHECK-NEXT: [[A_EXT:%.*]]

[PATCH] D113107: Support of expression granularity for _Float16.

2022-08-09 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 451261. zahiraam marked 7 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https://reviews.llvm.org/D113107 Files: clang/docs/LanguageExtensions.rst clang/include/clang/Basic/TargetInfo.h

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 451262. python3kgae added a comment. Move resource binding attribute validation to Sema. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files:

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

2022-08-09 Thread Ofek Shilon via Phabricator via cfe-commits
OfekShilon added a comment. > It looks like something might have gone wrong because the diff looks like > it's now a diff against something other than the main branch (it looks like > it's adding the SimpleHandler lines in Attr.td, but those lines already exist > in main). Sorry about that,

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Sam Estep via Phabricator via cfe-commits
samestep updated this revision to Diff 451259. samestep added a comment. Use ArrayRef Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131438/new/ https://reviews.llvm.org/D131438 Files:

[PATCH] D130108: git-clang-format: format index not worktree when using --staged

2022-08-09 Thread Mészáros Gergely via Phabricator via cfe-commits
Maetveis updated this revision to Diff 451257. Maetveis added a comment. Address formatting and stylistic comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130108/new/ https://reviews.llvm.org/D130108 Files:

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Sam Estep via Phabricator via cfe-commits
samestep added a comment. In D131438#3710697 , @xazax.hun wrote: > I feel like this is a repeated pattern. The CSA solved a very similar issue > by introducing the CallEvent class hierarchy. I also remember seeing many > disparate code snippets

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:248-258 + for (unsigned ArgIndex = 0; ArgIndex < NumArgs; ++ParamIt, ++ArgIndex) { assert(ParamIt != FuncDecl->param_end()); -const Expr *Arg = *ArgIt; -auto

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:248-258 + for (unsigned ArgIndex = 0; ArgIndex < NumArgs; ++ParamIt, ++ArgIndex) { assert(ParamIt != FuncDecl->param_end()); -const Expr *Arg = *ArgIt; -auto

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:248-258 + for (unsigned ArgIndex = 0; ArgIndex < NumArgs; ++ParamIt, ++ArgIndex) { assert(ParamIt != FuncDecl->param_end()); -const Expr *Arg = *ArgIt; -auto

[PATCH] D131517: [clang-tidy] readability-implicit-bool-conversion: support implicit conversion to std::optional

2022-08-09 Thread Perry Huang via Phabricator via cfe-commits
huangperry added a comment. In D131517#3710734 , @Eugene.Zelenko wrote: > Please mention changes in Release Notes and add test case, but don't rely on > STL implementation, see other tests as example for mock implementations. Will do! Repository:

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

2022-08-09 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. The revert doesn't apply cleanly, can someone try to fix it up: https://github.com/llvm/llvm-project/issues/56928#issuecomment-1205483442 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129973/new/

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

2022-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130933#3710682 , @OfekShilon wrote: > Addressed Aaron's comments (thanks!). Hope I got the update-diff procedure > right. It looks like something might have gone wrong because the diff looks like it's now a diff

[PATCH] D130516: [llvm] compression classes

2022-08-09 Thread Cole Kissane via Phabricator via cfe-commits
ckissane updated this revision to Diff 451247. ckissane added a comment. - address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130516/new/ https://reviews.llvm.org/D130516 Files:

[PATCH] D131464: [test] Make tests pass regardless of gnu++14/gnu++17 default

2022-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/ast-dump-openmp-begin-declare-variant_11.c:2 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify=c_mode -ast-dump %s | FileCheck %s --check-prefix=C -// RUN: %clang_cc1 -triple

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131314#3710514 , @inclyc wrote: > In D131314#3710331 , @aaron.ballman > wrote: > >> In D131314#3707131 , @inclyc wrote: >> >>> ping >>

[PATCH] D122139: [pseudo] Introduce parse forest.

2022-08-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/pseudo/include/clang-pseudo/Forest.h:158 + size_t nodeCount() const { return NodeCount; } + size_t bytes() const { return Arena.getBytesAllocated() + sizeof(this); } + RKSimon wrote: > @hokein Static

[PATCH] D131466: [clang] add APValue type check in `TryPrintAsStringLiteral`

2022-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! I think this change should be backported to Clang 15.x since the breakage happened in that release and the fix is pretty straightforward. After this lands, I'll file the issue for it to get that process started. Thank

[clang-tools-extra] c2c5c39 - [pseudo] Fix a suspicious usage of `sizeof(this)`.

2022-08-09 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-08-09T21:46:56+02:00 New Revision: c2c5c39c401b39d2057ebb19b843f53deb950f6e URL: https://github.com/llvm/llvm-project/commit/c2c5c39c401b39d2057ebb19b843f53deb950f6e DIFF: https://github.com/llvm/llvm-project/commit/c2c5c39c401b39d2057ebb19b843f53deb950f6e.diff

[PATCH] D131517: [clang-tidy] readability-implicit-bool-conversion: support implicit conversion to std::optional

2022-08-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention changes in Release Notes and add test case, but don't rely on STL implementation, see other tests as example for mock implementations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131517/new/

[PATCH] D131280: [clang][dataflow] Parameterize analysis by explicit map of analyzable functions.

2022-08-09 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:71-74 +/// Builds a map of top-level functions and methods of top-level classes sounds +/// in the given AST, mapping from fully qualified function name to the +///

[PATCH] D131517: implicit conversion to std::optional

2022-08-09 Thread Perry Huang via Phabricator via cfe-commits
huangperry created this revision. Herald added a subscriber: carlosgalvezp. Herald added a project: All. huangperry requested review of this revision. Herald added a project: clang-tools-extra. GitHub Issue #56009 Show implicit conversion warning to and from std::optional objects when running

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I feel like this is a repeated pattern. The CSA solved a very similar issue by introducing the CallEvent class hierarchy. I also remember seeing many disparate code snippets littered throughout the clang codebase that tries to deal with the problem of not having

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

2022-08-09 Thread Ofek Shilon via Phabricator via cfe-commits
OfekShilon updated this revision to Diff 451237. OfekShilon added a comment. Addressed Aaron's comments (thanks!). Hope I got the update-diff procedure right. I don't have commit permissions, would appreciate if someone could push this. CHANGES SINCE LAST ACTION

[PATCH] D131466: [clang] add APValue type check in `TryPrintAsStringLiteral`

2022-08-09 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray accepted this revision. lichray 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/D131466/new/ https://reviews.llvm.org/D131466

[PATCH] D131280: [clang][dataflow] Parameterize analysis by explicit map of analyzable functions.

2022-08-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In D131280#3710080 , @ymandel wrote: > I think we should try to reuse for the reasons you mention. We can evolve it > with more features as needed. I'm kind of allergic to `const char *` so I > propose that I first send a

[PATCH] D130108: git-clang-format: format index not worktree when using --staged

2022-08-09 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/tools/clang-format/git-clang-format:182-194 new_tree = run_clang_format_and_save_to_tree(changed_lines, revision=commits[1],

[PATCH] D131438: [clang][dataflow] Analyze constructor bodies

2022-08-09 Thread Sam Estep via Phabricator via cfe-commits
samestep updated this revision to Diff 451233. samestep added a comment. Narrow public signature of pushCall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131438/new/ https://reviews.llvm.org/D131438 Files:

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-08-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 451232. erichkeane added a comment. Ok, fixed the test failure in clang, AND it managed to fix all the failures in libcxx! HOWEVER, it appears that libcxx/test/libcxx/modules_include.sh.cpp is now hanging? I don't know much about the modules

[PATCH] D43630: [Driver] Fix search paths on x32

2022-08-09 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 abandoned this revision. jrtc27 added a comment. Herald added a subscriber: pengfei. Herald added a project: All. Superseded by D52050 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43630/new/

[PATCH] D130513: [Flang] Add -fconvert option to swap endianness for unformatted files

2022-08-09 Thread Jonathon Penix via Phabricator via cfe-commits
jpenix-quic updated this revision to Diff 451225. jpenix-quic added a comment. Rebase to address conflicts, use string substitution blocks in my tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130513/new/ https://reviews.llvm.org/D130513 Files:

[PATCH] D131307: [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2022-08-09 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D131307#3709644 , @erichkeane wrote: > > That IS Undefined Behavior, but I think was unintended by this patch. The > intent of this patch (and its parent) was to diagnose this UB during > `constexpr` evaluation.

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

2022-08-09 Thread vient via Phabricator via cfe-commits
vient added a comment. FWIW this also causes compilation error on correct code using Boost: https://github.com/llvm/llvm-project/issues/56878 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129973/new/ https://reviews.llvm.org/D129973

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 451222. manojgupta added a comment. Address maskray comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131225/new/ https://reviews.llvm.org/D131225 Files: clang/lib/Driver/Driver.cpp

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

2022-08-09 Thread Daniel Ruoso via Phabricator via cfe-commits
ruoso added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:70-76 +* Primary module interface unit. + +* Module implementation unit. + +* Module partition interface unit. + +* Module partition implementation unit. ChuanqiXu wrote: > ruoso wrote: >

[PATCH] D131514: [analyzer] {NFC} Add more test cases for equality tracking

2022-08-09 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: martong, steakhal, NoQ. ASDenysPetrov added a project: clang. Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. Herald added a project:

[PATCH] D128807: [clang][transformer] Finish plumbing `Note` all the way to the output.

2022-08-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D128807#3627625 , @courbet wrote: > In D128807#3625676 , @ymandel wrote: > >>> For my particular case, I just need multiple notes per rule. I don't need >>> them to be associated to a

[PATCH] D130372: [analyzer] Add a new factory function RangeSet::Factory::invert

2022-08-09 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. The //motivation //for this revision is lost due to the logical mistake in the later. However, this revision could be used for other improvements in the future. I will not merge it until new //motivation //has become. CHANGES SINCE LAST ACTION

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: llvm/lib/Support/Triple.cpp:1938 +return false; + + if (getVendor() != UnknownVendor) The prevailing style doesn't add a blank line for every `if` statement.

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. In D131314#3710331 , @aaron.ballman wrote: > In D131314#3707131 , @inclyc wrote: > >> ping > > FWIW, we usually only ping a review that hasn't had any activity in a week or > more (it's

[PATCH] D131006: [analyzer] Use DisequalityMap while inferring constraints

2022-08-09 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @martong This solution has an essential logical mistake. It relies on the erroneous assumption that if `x > 0 && x != y` then `y` is in range `[MIN, 0]` but that's **not** true. `x` and `y` could be `1` and `2` respectively. My idea will only work with concrete

[PATCH] D128372: [Clang-Tidy] Empty Check

2022-08-09 Thread Abraham Corea Diaz via Phabricator via cfe-commits
abrahamcd updated this revision to Diff 451212. abrahamcd added a comment. Minor formatting/naming fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128372/new/ https://reviews.llvm.org/D128372 Files:

[PATCH] D131448: Introduce iterator sentinel to make graph traversal implementation more efficient and cleaner

2022-08-09 Thread Roman Rusyaev via Phabricator via cfe-commits
rusyaev-roman added a comment. In sum, this change brings the following improvements for all graph traversal iterators that are used in 'range-based for loop': - avoid creating an empty iterator (that holds containers inside) to compare with the end iterator - make 'empty()' call explicit

[PATCH] D128372: [Clang-Tidy] Empty Check

2022-08-09 Thread Abraham Corea Diaz via Phabricator via cfe-commits
abrahamcd updated this revision to Diff 451209. abrahamcd marked 5 inline comments as done. abrahamcd added a comment. Adds check for the compatibility of qualifiers on the clear method and the object it is called on. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131448: Introduce iterator sentinel to make graph traversal implementation more efficient and cleaner

2022-08-09 Thread Roman Rusyaev via Phabricator via cfe-commits
rusyaev-roman updated this revision to Diff 451208. rusyaev-roman added a comment. Herald added subscribers: bzcheeseman, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, stephenneuendorffer, liufengdb, aartbik, mgester,

[PATCH] D131464: [test] Make tests pass regardless of gnu++14/gnu++17 default

2022-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/AST/ast-dump-openmp-begin-declare-variant_11.c:2 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify=c_mode -ast-dump %s | FileCheck %s --check-prefix=C -// RUN: %clang_cc1 -triple

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default dialect

2022-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Posted "C++/ObjC++: switch to gnu++17 as the default dialect" https://discourse.llvm.org/t/c-objc-switch-to-gnu-17-as-the-default-dialect/64360 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131465/new/

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

2022-08-09 Thread Tobias Hieta via Phabricator via cfe-commits
thieta added a comment. I think a week or two of moratorium would be good for sure. I think we can table this discussion for now and I will write a RFC post in discourse when I have time and we can discuss the details there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2022-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130689#3710340 , @MaskRay wrote: > In D130689#3710291 , @aaron.ballman > wrote: > >> In D130689#3710281 , @royjacobson >> wrote: >>

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

2022-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D130689#3710291 , @aaron.ballman wrote: > In D130689#3710281 , @royjacobson > wrote: > >> In D130689#3709834 , @thieta wrote: >> >>> In

[PATCH] D131466: [clang] add APValue type check in `TryPrintAsStringLiteral`

2022-08-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/SemaCXX/try-print-as-string-literal-type-check.cpp:7 +struct X { + char arr[2]; + constexpr X() {} The `ArrayRef Inits` points to here does not ends with `Int`, so `!Inits.back().getInt()` gets assertion

[PATCH] D86049: RFC: Implement optional exportable wrapper function generation for objc_direct methods.

2022-08-09 Thread Michael Wyman via Phabricator via cfe-commits
mwyman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2251-2256 +def ObjCDirectVisible : Attr { + let Spellings = [Clang<"objc_direct_visible">]; + let Subjects = SubjectList<[ObjCMethod], ErrorDiag>; + let LangOpts = [ObjC]; + let Documentation =

  1   2   3   >