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

2022-11-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D128372#3957982 , @cjdb wrote: > @njames93 if you don't have any further concerns, I am going to merge this on > Friday afternoon, as it will have been four months since there has been a > maintainer's input. @cjdb I

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-11-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:152 + case CK_FloatingToIntegral: { +llvm::RoundingMode RM = getRoundingMode(CE); +Optional ToT = classify(CE->getType()); According to C standard (6.3.1.4p1): ```

[PATCH] D137340: [clang-tidy] Add misc-use-anonymous-namespace check

2022-11-30 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. carlosgalvezp marked an inline comment as done. Closed by commit rG65d6d67fc9a9: [clang-tidy] Add misc-use-anonymous-namespace check (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D139025: [NFC][RISCV] Extract utility to calculate value through MajorVersion and MinorVersion

2022-11-30 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD marked an inline comment as done. eopXD added inline comments. Comment at: llvm/include/llvm/Support/RISCVISAInfo.h:25 + unsigned getVersionValue() { +return MajorVersion * 100 + MinorVersion * 1000; + } asb wrote: > Would this be better as

[PATCH] D139025: [NFC][RISCV] Extract utility to calculate value through MajorVersion and MinorVersion

2022-11-30 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 479175. eopXD added a comment. Address comment from Jessica, thanks Craig for explaining. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139025/new/ https://reviews.llvm.org/D139025 Files:

[PATCH] D137340: [clang-tidy] Add misc-use-anonymous-namespace check

2022-11-30 Thread Dave Brown via Phabricator via cfe-commits
bigdavedev accepted this revision. bigdavedev added a comment. This revision is now accepted and ready to land. Looks good to me. All comments/suggestions/concerns addressed. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc/use-anonymous-namespace.rst:7-9 +that could

[clang] df43ec3 - [Driver] Add test for -stdlib++-isystem with -nostdinc

2022-11-30 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2022-11-30T23:09:28-08:00 New Revision: df43ec30ab66f5af7bbf87e121e0fe26aad478b4 URL: https://github.com/llvm/llvm-project/commit/df43ec30ab66f5af7bbf87e121e0fe26aad478b4 DIFF: https://github.com/llvm/llvm-project/commit/df43ec30ab66f5af7bbf87e121e0fe26aad478b4.diff

[PATCH] D136176: Implement support for option 'fexcess-precision'.

2022-11-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:821 +(Precision == LangOptions::ExcessPrecisionKind::FPP_Standard || + Precision == LangOptions::ExcessPrecisionKind::FPP_Fast)) { if (Ty->isAnyComplexType()) {

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/3)

2022-11-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:197 +llvm::cl::opt P1689TargetedCommand( +"p1689-targeted-command", llvm::cl::Optional, +llvm::cl::desc("Only supported for P1689, the targeted command of which "

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/3)

2022-11-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 479168. ChuanqiXu added a comment. Address comments. Parse flags after "--" as the command line argument for compilation database. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137534/new/ https://reviews.llvm.org/D137534 Files:

[PATCH] D138947: [Clang] Adjust assert from Sema::BuildCXXTypeConstructExpr

2022-11-30 Thread Davide Italiano via Phabricator via cfe-commits
davide accepted this revision. davide added a comment. This revision is now accepted and ready to land. LGTM with the comment reworded. Thanks. Comment at: clang/lib/Sema/SemaExprCXX.cpp:1463 + assert((!ListInitialization || Exprs.size() == 1) && + "Too many

[PATCH] D138947: [Clang] Remove invalid assert from Sema::BuildCXXTypeConstructExpr

2022-11-30 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 479161. shafik added a comment. Bring back assert but w/ the check for `InitListExpr` removed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138947/new/ https://reviews.llvm.org/D138947 Files: clang/lib/Sema/SemaExprCXX.cpp

[PATCH] D139073: [X86] AMD Zen 4 Initial enablement

2022-11-30 Thread Ganesh Gopalasubramanian via Phabricator via cfe-commits
GGanesh created this revision. GGanesh added reviewers: RKSimon, craig.topper, andreadb. Herald added subscribers: Enna1, StephenFan, pengfei, gbedwell, javed.absar, hiraditya. Herald added a project: All. GGanesh requested review of this revision. Herald added projects: clang, Sanitizers, LLVM.

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-11-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:13896 + Diag(var->getLocation(), diag::err_constexpr_var_requires_const_init) + << var << Init->getSourceRange(); + } rnk wrote: > zahiraam wrote: > > efriedma

[PATCH] D138807: [RISCV] Support vector crypto extension ISA string and assembly

2022-11-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Anything that uses OP-P needs to have a DecoderNamespace assigned and RISCVDisassembler::getInstruction will need to lookup that table when V/Zve is enabled. Otherwise we will have a conflict if the P extension is ever commited to LLVM. Comment

[PATCH] D137838: [RFC][Support] Move TargetParsers to new component

2022-11-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Please check these builds all work: - default - `-DLLVM_LINK_LLVM_DYLIB=on` - `-DBUILD_SHARED_LIBS=on` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137838/new/

[PATCH] D138810: [RISCV] Support vector crypto extension C intrinsics

2022-11-30 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat updated this revision to Diff 479144. 4vtomat added a comment. Fixed the comment from Craig Topper and Philip Reames Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138810/new/ https://reviews.llvm.org/D138810 Files:

[PATCH] D138807: [RISCV] Support vector crypto extension ISA string and assembly

2022-11-30 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat updated this revision to Diff 479142. 4vtomat added a comment. Fixed the comment from Craig Topper and Philip Reames Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138807/new/ https://reviews.llvm.org/D138807 Files:

[PATCH] D139045: [HIP] use detected GPU in --offload-arch

2022-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D139045#3961931 , @tra wrote: >> This patch detects system GPU and use them in --offload-arch if not >> specified. If system GPU cannot be detected clang will fall back to gfx803. > > I don't think auto-probing is something we

[PATCH] D136811: [-Wunsafe-buffer-usage] WIP: RFC: NFC: User documentation.

2022-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/docs/SafeBuffers.rst:213 + +The attribute is NOT warranted when the function has runtime protection against +overflows, assuming hardened libc++, assuming that containers constructed aaron.ballman wrote: > NoQ wrote:

[PATCH] D137346: [-Wunsafe-buffer-usage] Initial commit - Transition away from raw buffer accesses.

2022-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:50 + M.addMatcher( + stmt(forEachDescendant( +stmt( aaron.ballman wrote: > Errr, this looks expensive to me, but maybe I'm forgetting (I can't recall if > it's

[PATCH] D137346: [-Wunsafe-buffer-usage] Initial commit - Transition away from raw buffer accesses.

2022-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h:29 + /// Invoked when an unsafe operation over raw pointers is found. + virtual void handleUnsafeOperation(const Stmt *Operation) = 0; +}; NoQ wrote: > xazax.hun

[PATCH] D137346: [-Wunsafe-buffer-usage] Initial commit - Transition away from raw buffer accesses.

2022-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 479134. NoQ marked 4 inline comments as done. NoQ added a comment. Add range highlighting, unhardcode language mode. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137346/new/ https://reviews.llvm.org/D137346 Files:

[PATCH] D139025: [NFC][RISCV] Extract utility to calculate value through MajorVersion and MinorVersion

2022-11-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D139025#3961990 , @eopXD wrote: > In D139025#3961214 , @jrtc27 wrote: > >> Should this live in RISCVISAInfo.h rather than be a Clang-specific thing >> given it's just for

[PATCH] D137346: [-Wunsafe-buffer-usage] Initial commit - Transition away from raw buffer accesses.

2022-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h:34 +// through the handler class. +void checkUnsafeBufferUsage(const Decl *D, UnsafeBufferUsageHandler ); + aaron.ballman wrote: > Do we need the interface to accept

[PATCH] D138987: [AMX] Support AMX-FP16 new intrinsic interface

2022-11-30 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 rG94c5df8a7618: [AMX] Support AMX-FP16 new intrinsic interface (authored by xiangzhangllvm, committed by pengfei). Herald added a project: clang.

[PATCH] D138418: [LoongArch] Add remaining intrinsics for CRC check instructions

2022-11-30 Thread Gong LingQin 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 rG624401612c3a: [LoongArch] Add remaining intrinsics for CRC check instructions (authored by gonglingqin). Changed prior to commit:

[clang] 94c5df8 - [AMX] Support AMX-FP16 new intrinsic interface

2022-11-30 Thread Phoebe Wang via cfe-commits
Author: Xiang1 Zhang Date: 2022-12-01T09:47:53+08:00 New Revision: 94c5df8a7618b4d0fae8796d393bcc0d32c845ee URL: https://github.com/llvm/llvm-project/commit/94c5df8a7618b4d0fae8796d393bcc0d32c845ee DIFF: https://github.com/llvm/llvm-project/commit/94c5df8a7618b4d0fae8796d393bcc0d32c845ee.diff

[clang] 6244016 - [LoongArch] Add remaining intrinsics for CRC check instructions

2022-11-30 Thread via cfe-commits
Author: gonglingqin Date: 2022-12-01T09:40:50+08:00 New Revision: 624401612c3ae1b3e96a691ac37631fb10197313 URL: https://github.com/llvm/llvm-project/commit/624401612c3ae1b3e96a691ac37631fb10197313 DIFF: https://github.com/llvm/llvm-project/commit/624401612c3ae1b3e96a691ac37631fb10197313.diff

[PATCH] D138901: [clang] Propely handle tests for open DRs in make_cxx_dr_status

2022-11-30 Thread H. Vetinari via Phabricator via cfe-commits
h-vetinari added a comment. I'd also use newlines more liberally since the two-space indentation is pretty dense already. Comment at: clang/www/make_cxx_dr_status:190-191 + % (dr.issue, unresolved_status, dr.status) +if not avail.startswith('Sup') and not

[PATCH] D138947: [Clang] Remove invalid assert from Sema::BuildCXXTypeConstructExpr

2022-11-30 Thread Davide Italiano via Phabricator via cfe-commits
davide added a comment. `Exprs.size() == 1` is still valid in every example we've seen, so yes, you might want to keep it (and update the assertion message) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138947/new/ https://reviews.llvm.org/D138947

[PATCH] D137738: [clang-tidy] Suppress google-objc-avoid-throwing-exception in system macros 﫢

2022-11-30 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6c2140943cbe: [clang-tidy] Suppress google-objc-avoid-throwing-exception in system macros 﫢 (authored by stephanemoore). Changed prior to commit: https://reviews.llvm.org/D137738?vs=475222=479104#toc

[clang-tools-extra] 6c21409 - [clang-tidy] Suppress google-objc-avoid-throwing-exception in system macros 﫢

2022-11-30 Thread Stephane Moore via cfe-commits
Author: Stephane Moore Date: 2022-11-30T16:44:45-08:00 New Revision: 6c2140943cbe257c85f7121349c5bca950a26e0d URL: https://github.com/llvm/llvm-project/commit/6c2140943cbe257c85f7121349c5bca950a26e0d DIFF:

[PATCH] D139025: [NFC][RISCV] Extract utility to calculate value through MajorVersion and MinorVersion

2022-11-30 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD added a comment. In D139025#3961214 , @jrtc27 wrote: > Should this live in RISCVISAInfo.h rather than be a Clang-specific thing > given it's just for squeezing version info into the preprocessor? I can't > think of a use for it outside that at

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-11-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:13896 + Diag(var->getLocation(), diag::err_constexpr_var_requires_const_init) + << var << Init->getSourceRange(); + } zahiraam wrote: > efriedma wrote: > > zahiraam

[PATCH] D139045: [HIP] use detected GPU in --offload-arch

2022-11-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > This patch detects system GPU and use them in --offload-arch if not > specified. If system GPU cannot be detected clang will fall back to gfx803. I don't think auto-probing is something we want to do by default. IMO, we should be following `-march=native` behavior here

[PATCH] D97854: [RFC][nsan] A Floating-point numerical sanitizer.

2022-11-30 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. This looks very interesting. I had a discussion with someone at the recent LLVM Dev Meeting about the possibility of something like this. However, rather than tracking error based on data precision, I am interested in tracking errors introduced by fast-math

[PATCH] D135171: FreeBSD: enable __float128 on x86

2022-11-30 Thread Brooks Davis via Phabricator via cfe-commits
brooks added a comment. @arichardson please commit. I do not have commit access. Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135171/new/ https://reviews.llvm.org/D135171 ___ cfe-commits mailing

[PATCH] D139052: [NFC][Profile] Access profile through VirtualFileSystem

2022-11-30 Thread Steven Wu via Phabricator via cfe-commits
steven_wu created this revision. steven_wu added reviewers: davidxl, tejohnson, xur, akyrtzi. Herald added subscribers: Enna1, ormris, wenlei, ributzka, pengfei, hiraditya. Herald added a project: All. steven_wu requested review of this revision. Herald added projects: clang, LLVM. Herald added a

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-11-30 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:13896 + Diag(var->getLocation(), diag::err_constexpr_var_requires_const_init) + << var << Init->getSourceRange(); + } efriedma wrote: > zahiraam wrote: > >

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-11-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Looking at this again, I just thought of something: in C mode, we probably don't want to generate global constructors, so we might want to continue to print an error in that case. Comment at: clang/lib/Sema/SemaDecl.cpp:13896 +

[PATCH] D139045: [HIP] use detected GPU in --offload-arch

2022-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added subscribers: kosarev, kerbowa, jvesely. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: MaskRay. Currently HIP uses gfx803 as offload arch if not specified. This is not

[clang] b95646f - Revert "Use-after-return sanitizer binary metadata"

2022-11-30 Thread Marco Elver via cfe-commits
Author: Marco Elver Date: 2022-11-30T23:35:50+01:00 New Revision: b95646fe7058471cc0ecda1efa25003009af0317 URL: https://github.com/llvm/llvm-project/commit/b95646fe7058471cc0ecda1efa25003009af0317 DIFF: https://github.com/llvm/llvm-project/commit/b95646fe7058471cc0ecda1efa25003009af0317.diff

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-11-30 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam marked 3 inline comments as done. zahiraam added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:13896 + Diag(var->getLocation(), diag::err_constexpr_var_requires_const_init) + << var << Init->getSourceRange(); + }

[PATCH] D136078: Use-after-return sanitizer binary metadata

2022-11-30 Thread Wolfgang Pieb via Phabricator via cfe-commits
wolfgangp added a comment. covered.cpp and uar.cpp seem to fail on ubuntu bots here . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136078/new/

[clang] b6a73d0 - [analyzer] Test depends on windows as host, not target

2022-11-30 Thread Paul Robinson via cfe-commits
Author: Paul Robinson Date: 2022-11-30T14:11:51-08:00 New Revision: b6a73d06bad46cf11a15a873f4fca732570af458 URL: https://github.com/llvm/llvm-project/commit/b6a73d06bad46cf11a15a873f4fca732570af458 DIFF: https://github.com/llvm/llvm-project/commit/b6a73d06bad46cf11a15a873f4fca732570af458.diff

[PATCH] D128457: [clangd] Add new IncludeType to IncludeHeaderWithReferences

2022-11-30 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 479066. dgoldman added a comment. Herald added a project: clang. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128457/new/ https://reviews.llvm.org/D128457 Files:

[clang] 2fbcf8b - [Hexagon] Convert tests to check 'target=hexagon-.*'

2022-11-30 Thread Paul Robinson via cfe-commits
Author: Paul Robinson Date: 2022-11-30T13:36:10-08:00 New Revision: 2fbcf8b9b38c84fd1c3a250b4ef76f7e7adad0d3 URL: https://github.com/llvm/llvm-project/commit/2fbcf8b9b38c84fd1c3a250b4ef76f7e7adad0d3 DIFF: https://github.com/llvm/llvm-project/commit/2fbcf8b9b38c84fd1c3a250b4ef76f7e7adad0d3.diff

[PATCH] D139029: [clang-format] Don't move comments if AlignTrailingComments: Kind: Leave

2022-11-30 Thread Maíra Canal via Phabricator via cfe-commits
mairacanal added a comment. In D139029#3961512 , @HazardyKnusperkeks wrote: > Thanks, nice work. > > Do you need someone to push it for you? In that case we need a name and an > email address for the commit. Yes, I would need someone to push for me.

[PATCH] D139029: [clang-format] Don't move comments if AlignTrailingComments: Kind: Leave

2022-11-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Thanks, nice work. Do you need someone to push it for you? In that case we need a name and an email address for the commit. CHANGES SINCE LAST ACTION

[PATCH] D138402: [clang-format] Correctly count a tab's width in a comment

2022-11-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 479054. HazardyKnusperkeks marked an inline comment as done. HazardyKnusperkeks added a reviewer: klimek. HazardyKnusperkeks added a comment. Pulled the `verifyFormat` into this change. CHANGES SINCE LAST ACTION

[PATCH] D139029: [clang-format] Don't move comments if AlignTrailingComments: Kind: Leave

2022-11-30 Thread Maíra Canal via Phabricator via cfe-commits
mairacanal updated this revision to Diff 479055. mairacanal added a comment. - Instead of using Changes[i].NewlinesBefore use Changes[i].Tok->NewlinesBefore - Create test cases of multiple blank lines - Separate \n\n on test cases CHANGES SINCE LAST ACTION

[PATCH] D139029: [clang-format] Don't move comments if AlignTrailingComments: Kind: Leave

2022-11-30 Thread Maíra Canal via Phabricator via cfe-commits
mairacanal added a comment. In D139029#3961446 , @HazardyKnusperkeks wrote: > In D139029#3961444 , > @HazardyKnusperkeks wrote: > >> In D139029#3961438 , @mairacanal

[PATCH] D136078: Use-after-return sanitizer binary metadata

2022-11-30 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/test/Instrumentation/SanitizerBinaryMetadata/common.h:1-3 +#include +#include +#include tests in `clang/test` cannot assume that standard headers are available, the tests should be hermetic. could you revert

[PATCH] D138295: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

2022-11-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2228-2230 + Width = Target->getPointerWidth( + LangAS::Default); // C++ 3.9.1p11: sizeof(nullptr_t) + Align = Target->getPointerAlign(LangAS::Default); // == sizeof(void*)

[clang] a602f76 - [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

2022-11-30 Thread Alex Richardson via cfe-commits
Author: Alex Richardson Date: 2022-11-30T20:24:01Z New Revision: a602f76a2406cc3edd6b297ede3583b26513a34c URL: https://github.com/llvm/llvm-project/commit/a602f76a2406cc3edd6b297ede3583b26513a34c DIFF: https://github.com/llvm/llvm-project/commit/a602f76a2406cc3edd6b297ede3583b26513a34c.diff

[PATCH] D138295: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

2022-11-30 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arichardson marked an inline comment as done. Closed by commit rGa602f76a2406: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}() (authored by arichardson). Changed prior to commit:

[PATCH] D139029: [clang-format] Don't move comments if AlignTrailingComments: Kind: Leave

2022-11-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D139029#3961444 , @HazardyKnusperkeks wrote: > In D139029#3961438 , @mairacanal > wrote: > >> In D139029#3961372 , >>

[PATCH] D139029: [clang-format] Don't move comments if AlignTrailingComments: Kind: Leave

2022-11-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D139029#3961438 , @mairacanal wrote: > In D139029#3961372 , > @HazardyKnusperkeks wrote: > >> Can you please add a test with more than one newline? > > Hi

[PATCH] D139029: [clang-format] Don't move comments if AlignTrailingComments: Kind: Leave

2022-11-30 Thread Maíra Canal via Phabricator via cfe-commits
mairacanal added a comment. In D139029#3961372 , @HazardyKnusperkeks wrote: > Can you please add a test with more than one newline? Hi @HazardyKnusperkeks! Thanks for the feedback. It looks like `Changes[i].NewlinesBefore` values 1 even if I put

[clang] 57b1c02 - [Windows] Canonicalize on 'target=.*-windows'

2022-11-30 Thread Paul Robinson via cfe-commits
Author: Paul Robinson Date: 2022-11-30T12:07:27-08:00 New Revision: 57b1c0250d5da6ac5342f10cd8f046412a46f153 URL: https://github.com/llvm/llvm-project/commit/57b1c0250d5da6ac5342f10cd8f046412a46f153 DIFF: https://github.com/llvm/llvm-project/commit/57b1c0250d5da6ac5342f10cd8f046412a46f153.diff

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

2022-11-30 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev marked 3 inline comments as done. v.g.vassilev added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5395-5400 + // FIXME: Tell the user this is unsupported. + if (!Stmts.empty()) { +unsigned ID = Actions.getDiagnostics().getCustomDiagID( +

[clang] b8da574 - [PS4/PS5] Convert tests to check 'target='

2022-11-30 Thread Paul Robinson via cfe-commits
Author: Paul Robinson Date: 2022-11-30T12:02:30-08:00 New Revision: b8da574c0d5079d2e6e44d2ccb7cf466b2872065 URL: https://github.com/llvm/llvm-project/commit/b8da574c0d5079d2e6e44d2ccb7cf466b2872065 DIFF: https://github.com/llvm/llvm-project/commit/b8da574c0d5079d2e6e44d2ccb7cf466b2872065.diff

[clang] e71b81c - [InstCombine] canonicalize trunc + insert as bitcast + shuffle, part 1 (2nd try)

2022-11-30 Thread Sanjay Patel via cfe-commits
Author: Sanjay Patel Date: 2022-11-30T14:52:20-05:00 New Revision: e71b81cab09bf33e3b08ed600418b72cc4117461 URL: https://github.com/llvm/llvm-project/commit/e71b81cab09bf33e3b08ed600418b72cc4117461 DIFF: https://github.com/llvm/llvm-project/commit/e71b81cab09bf33e3b08ed600418b72cc4117461.diff

[PATCH] D138270: [clang][Sema] Skip checking int expressions for overflow in constexpr functions

2022-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D138270#3956221 , @tbaeder wrote: > Output for that test case is: > > ./array.cpp:1:16: error: constexpr function never produces a constant > expression [-Winvalid-constexpr] > constexpr void f() { >

[PATCH] D139029: [clang-format] Don't move comments if AlignTrailingComments: Kind: Leave

2022-11-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Can you please add a test with more than one newline? Comment at: clang/unittests/Format/FormatTestComments.cpp:3065-3075 + EXPECT_EQ("// do not touch\n" +"int a; // any comments\n\n" +" // comment\n" +

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

2022-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Lex/Preprocessor.h:1782-1785 void enableIncrementalProcessing(bool value = true) { -IncrementalProcessing = value; +// FIXME: Drop this interface. +const_cast(getLangOpts()).IncrementalExtensions

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-11-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:13896 + Diag(var->getLocation(), diag::err_constexpr_var_requires_const_init) + << var << Init->getSourceRange(); + } zahiraam wrote: > efriedma wrote: > > I don't

[PATCH] D128457: [clangd] Add new IncludeType to IncludeHeaderWithReferences

2022-11-30 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 479024. dgoldman marked 6 inline comments as done. dgoldman added a comment. Fixes for review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128457/new/ https://reviews.llvm.org/D128457 Files:

[PATCH] D139025: [NFC][RISCV] Extract utility to calculate value through MajorVersion and MinorVersion

2022-11-30 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. Should this live in RISCVISAInfo.h rather than be a Clang-specific thing given it's just for squeezing version info into the preprocessor? I can't think of a use for it outside that at the moment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D139025: [NFC][RISCV] Extract utility to calculate value through MajorVersion and MinorVersion

2022-11-30 Thread Alex Bradbury via Phabricator via cfe-commits
asb added inline comments. Comment at: llvm/include/llvm/Support/RISCVISAInfo.h:25 + unsigned getVersionValue() { +return MajorVersion * 100 + MinorVersion * 1000; + } Would this be better as `return getVersionValue(MajorVersion, MinorVersion);` in

[PATCH] D136078: Use-after-return sanitizer binary metadata

2022-11-30 Thread Daniel Thornburgh via Phabricator via cfe-commits
mysterymath added a comment. Hi, it looks like this change is causing Fuchsia's linux-x64 clang builders to fail: https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8796062278266465473/overview Would you mind taking a look and fixing forward, or that ends up

[PATCH] D138295: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

2022-11-30 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2228-2230 + Width = Target->getPointerWidth( + LangAS::Default); // C++ 3.9.1p11: sizeof(nullptr_t) + Align = Target->getPointerAlign(LangAS::Default); // == sizeof(void*)

[PATCH] D138295: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

2022-11-30 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1917 +EffectiveFieldSize = FieldSize = TI.Width; +FieldAlign = TI.Align; } else {

[PATCH] D136694: [clang][Interp] Check that constructor calls initialize all record fields

2022-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Interp.cpp:447 + +if (FieldType->isRecordType()) { + Result &= CheckFieldsInitialized(S, OpPC, FieldPtr, FieldPtr.getRecord()); Do we have to worry about static data members, or are

[PATCH] D138318: [-Wunsafe-buffer-usage] Improve pointer match pattern

2022-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:31 + return anyOf( +hasType(pointerType()), +hasType(autoType( I shudder to ask this question, but ... pointer to member types? Comment at:

[PATCH] D138520: [clangd] Make decision forest model optional

2022-11-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.h:129 +#if defined(CLANGD_DECISION_FOREST) +# define DEFAULT_RANKING_MODEL DecisionForest mgorny wrote: > sammccall wrote: > > this approach feels a bit heavy on the

[PATCH] D138651: [CUDA][HIP] Don't diagnose use for __bf16

2022-11-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/SemaCUDA/amdgpu-bf16.cu:9 + +__device__ void devicefn() { +} We should probably also have a case verifying that actual attempt to use `__bf16` in device code is still diagnosed. Repository: rG LLVM Github

[PATCH] D136815: [clang][Interp] Unify visiting variable declarations

2022-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:803 + // Make sure we don't accidentally register the same decl twice. + if (auto *VD = dyn_cast_if_present(Src.dyn_cast())) { +assert(!P.getGlobal(VD));

[PATCH] D139029: [clang-format] Don't move comments if AlignTrailingComments: Kind: Leave

2022-11-30 Thread Maíra Canal via Phabricator via cfe-commits
mairacanal created this revision. mairacanal added reviewers: MyDeveloperDay, owenpan, yusuke-kadowaki, HazardyKnusperkeks. Herald added a project: All. mairacanal requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For comments that start

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-11-30 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Thanks @aaron.ballman for the feedback about spellings. I've gone with the lower-case names like `__arm_streaming` in what follows, as a plausible strawman. My main concern with keywords is: > This approach means there's plenty of flexibility available to parse

[PATCH] D139006: [UpdateTestChecks] Match define for labels

2022-11-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Agreed that the churn is annoying, but at least unlike the function-signature flag (which I'd quite like to have on by default tbh) it only affects a single line rather than also including variable captures. Comment at:

[PATCH] D139013: [include-cleaner] clang-include-cleaner can print/apply edits

2022-11-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 478984. sammccall added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139013/new/ https://reviews.llvm.org/D139013 Files:

[PATCH] D139025: [NFC][RISCV] Extract utility to calculate value through MajorVersion and MinorVersion

2022-11-30 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD added a comment. I don't have preference to this, just doing this out of Jessica's comment in D138930 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139025/new/ https://reviews.llvm.org/D139025

[PATCH] D139025: [NFC][RISCV] Extract utility to calculate value through MajorVersion and MinorVersion

2022-11-30 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD created this revision. eopXD added a reviewer: jrtc27. Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng,

[PATCH] D137235: [clang][Interp] Fix ImplicitValueInitExprs for pointer types

2022-11-30 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. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137235/new/ https://reviews.llvm.org/D137235

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-11-30 Thread Tao Liang via Phabricator via cfe-commits
Origami404 marked 7 inline comments as done. Origami404 added inline comments. Comment at: clang/test/Driver/stdc-predef.c:33-34 + +// This behavior should appear in all languages that use the c preprocessor, +// including C, C++ and Objective-C, as long as the system uses musl.

[PATCH] D139023: [NFC][Clang][Driver][AMDGPU] Avoid temporary copies of std::string by using Twine and StringRef

2022-11-30 Thread Juan Manuel Martinez Caamaño via Phabricator via cfe-commits
jmmartinez created this revision. Herald added subscribers: kosarev, kerbowa, tpr, dstuttard, yaxunl, jvesely, kzhuravl. Herald added a project: All. jmmartinez requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, wdng. Herald added a project: clang. Repository:

[PATCH] D139014: [include-cleaner] Move RecordedPP::RecordedIncludes -> Includes in Types.h. NFC

2022-11-30 Thread Sam McCall 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 rGd3714c2b277a: [include-cleaner] Move RecordedPP::RecordedIncludes - Includes in Types.h. NFC (authored by sammccall). Changed prior to commit:

[clang-tools-extra] d3714c2 - [include-cleaner] Move RecordedPP::RecordedIncludes -> Includes in Types.h. NFC

2022-11-30 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-11-30T18:14:55+01:00 New Revision: d3714c2b277ac649374ada6dacf20c7a1ba9120c URL: https://github.com/llvm/llvm-project/commit/d3714c2b277ac649374ada6dacf20c7a1ba9120c DIFF: https://github.com/llvm/llvm-project/commit/d3714c2b277ac649374ada6dacf20c7a1ba9120c.diff

[PATCH] D139018: [include-cleaner] Record whether includes are spelled with quotes

2022-11-30 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9961fa1653a2: [include-cleaner] Record whether includes are spelled with angle quotes (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] 9961fa1 - [include-cleaner] Record whether includes are spelled with quotes

2022-11-30 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-11-30T18:13:10+01:00 New Revision: 9961fa1653a2e05cb729252a6c430558446868b6 URL: https://github.com/llvm/llvm-project/commit/9961fa1653a2e05cb729252a6c430558446868b6 DIFF: https://github.com/llvm/llvm-project/commit/9961fa1653a2e05cb729252a6c430558446868b6.diff

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-11-30 Thread Tao Liang via Phabricator via cfe-commits
Origami404 updated this revision to Diff 478977. Origami404 added a comment. Improved comments and release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137043/new/ https://reviews.llvm.org/D137043 Files: clang/docs/ReleaseNotes.rst

[PATCH] D135953: [IncludeCleaner] Introduce decl to location mapping

2022-11-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/include-cleaner/lib/AnalysisInternal.h:29 #include "llvm/ADT/STLFunctionalExtras.h" +#include +#include unused?

[PATCH] D138930: [RISCV] Add macro to imply compiler availability on RISC-V Vector intrinsics version

2022-11-30 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD marked 2 inline comments as done. eopXD added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:195 Builder.defineMacro("__riscv_vector"); +// Currently we support the v0.10 RISC-V V intrinsics +unsigned Version = (0 * 100) + (10 * 1000);

[clang] d8a27ac - [NFC] Add missing period

2022-11-30 Thread via cfe-commits
Author: eopXD Date: 2022-11-30T09:07:15-08:00 New Revision: d8a27ac0e27f9dd8b5542e7af1c320cf9727af19 URL: https://github.com/llvm/llvm-project/commit/d8a27ac0e27f9dd8b5542e7af1c320cf9727af19 DIFF: https://github.com/llvm/llvm-project/commit/d8a27ac0e27f9dd8b5542e7af1c320cf9727af19.diff LOG:

[clang] eef7054 - [Basic] Fix a warning

2022-11-30 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-11-30T08:57:05-08:00 New Revision: eef7054f331b18c695a278704a6dd0b31dcd2be0 URL: https://github.com/llvm/llvm-project/commit/eef7054f331b18c695a278704a6dd0b31dcd2be0 DIFF: https://github.com/llvm/llvm-project/commit/eef7054f331b18c695a278704a6dd0b31dcd2be0.diff

[PATCH] D138474: [clang] Speedup LineOffsetMapping::get

2022-11-30 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. error: comparison of integers of different signs: 'long' and 'unsigned long' [-Werror,-Wsign-compare] if (End - Start > sizeof(Word)) { Comment at: clang/lib/Basic/SourceManager.cpp:1292 // This is much faster than scanning each byte

[PATCH] D138930: [RISCV] Add macro to imply compiler availability on RISC-V Vector intrinsics version

2022-11-30 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:196 +// Currently we support the v0.10 RISC-V V intrinsics +unsigned Version = (0 * 100) + (10 * 1000); +Builder.defineMacro("__riscv_v_intrinsic", Twine(Version)); Do we

[PATCH] D138930: [RISCV] Add macro to imply compiler availability on RISC-V Vector intrinsics version

2022-11-30 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:195 Builder.defineMacro("__riscv_vector"); +// Currently we support the v0.10 RISC-V V intrinsics +unsigned Version = (0 * 100) + (10 * 1000); asb wrote: > Nit: comment

  1   2   3   >