[clang] 1aaba40 - [C++] [Modules] Add a test case for mocking implementation for std modules

2022-09-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-09-23T15:20:46+08:00 New Revision: 1aaba40dcbe8fdc93d825d1f4e22edaa3e9aa5b1 URL: https://github.com/llvm/llvm-project/commit/1aaba40dcbe8fdc93d825d1f4e22edaa3e9aa5b1 DIFF: https://github.com/llvm/llvm-project/commit/1aaba40dcbe8fdc93d825d1f4e22edaa3e9aa5b1.diff LO

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:623-626 + VisitDeclaratorDecl(D); + Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName()); + Record.push_back(D->getIdentifierNamespace()); + ChuanqiXu wrote: > mizvekov

[PATCH] D134379: [clangd] IncludeCleaner: handle using namespace

2022-09-23 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D134379#3808043 , @kadircet wrote: > In D134379#3807770 , @ArcsinX wrote: > >> Anyway if this is the only concern, we can handle namespace declaration as a >> special case inside `Refe

[clang] 3dab7fe - [CMake] Add clang-bolt target

2022-09-23 Thread Amir Ayupov via cfe-commits
Author: Amir Ayupov Date: 2022-09-23T10:10:31+02:00 New Revision: 3dab7fede2019c399d793c43ca9ea5a4f2d5031f URL: https://github.com/llvm/llvm-project/commit/3dab7fede2019c399d793c43ca9ea5a4f2d5031f DIFF: https://github.com/llvm/llvm-project/commit/3dab7fede2019c399d793c43ca9ea5a4f2d5031f.diff L

[PATCH] D132975: [CMake] Add clang-bolt target

2022-09-23 Thread Amir Ayupov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3dab7fede201: [CMake] Add clang-bolt target (authored by Amir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132975/new/ https://reviews.llvm.org/D132975

[PATCH] D134352: [AArch64] Add Neoverse V2 CPU support

2022-09-23 Thread David Sherwood via Phabricator via cfe-commits
david-arm added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64.td:1112 + FeatureNEON, FeatureSVE2BitPerm, FeatureFP16FML, + FeatureMTE, FeatureRandGen]; list Saphira= [HasV8_4aOps, F

[PATCH] D132918: [clang] Fix a crash in constant evaluation

2022-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet closed this revision. kadircet added a comment. Landed as abd2b1a9d0421f99d3d132dc99af55ae52f3ac3e Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132918/new/ https://rev

[PATCH] D134349: [Arm][AArch64] Make getArchFeatures to use TargetParser.def

2022-09-23 Thread Daniel Kiss 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 rG7e1a87387209: [Arm][AArch64] Make getArchFeatures to use TargetParser.def (authored by danielkiss). Herald added a project: clang. Herald added a sub

[clang] 7e1a873 - [Arm][AArch64] Make getArchFeatures to use TargetParser.def

2022-09-23 Thread Daniel Kiss via cfe-commits
Author: Daniel Kiss Date: 2022-09-23T10:25:37+02:00 New Revision: 7e1a87387209252dec5902925a232467db951db6 URL: https://github.com/llvm/llvm-project/commit/7e1a87387209252dec5902925a232467db951db6 DIFF: https://github.com/llvm/llvm-project/commit/7e1a87387209252dec5902925a232467db951db6.diff L

[PATCH] D134352: [AArch64] Add Neoverse V2 CPU support

2022-09-23 Thread Dave Green via Phabricator via cfe-commits
dmgreen added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64.td:1112 + FeatureNEON, FeatureSVE2BitPerm, FeatureFP16FML, + FeatureMTE, FeatureRandGen]; list Saphira= [HasV8_4aOps, Fea

[PATCH] D134352: [AArch64] Add Neoverse V2 CPU support

2022-09-23 Thread Thorsten via Phabricator via cfe-commits
tschuett added inline comments. Comment at: llvm/include/llvm/Support/AArch64TargetParser.def:238 AArch64::AEK_RAND | AArch64::AEK_FP16FML | AArch64::AEK_I8MM)) +AARCH64_CPU_NAME("neoverse-v2", ARMV9A, FK_NEON_FP_ARMV8, false, + (AArch64::AEK_S

[PATCH] D123808: [clang] Fix the bogus diagnostic introduced by the newly-added UsingTemplate Kind.

2022-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 462418. hokein marked 3 inline comments as done. hokein added a comment. rebase and address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123808/new/ https://reviews.llvm.org/D123808 Files: clang/li

[PATCH] D134352: [AArch64] Add Neoverse V2 CPU support

2022-09-23 Thread David Sherwood via Phabricator via cfe-commits
david-arm updated this revision to Diff 462420. david-arm added a comment. - Added AEK_MTE to target parser flags. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134352/new/ https://reviews.llvm.org/D134352 Files: clang/docs/ReleaseNotes.rst clang/test/Driver/aarch64-mcpu.c clang/

[PATCH] D134352: [AArch64] Add Neoverse V2 CPU support

2022-09-23 Thread Dave Green via Phabricator via cfe-commits
dmgreen accepted this revision. dmgreen added a comment. This revision is now accepted and ready to land. Thanks. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134352/new/ https://reviews.llvm.org/D134352 ___ cfe-commits mailing list cfe

[clang] 4f8d92f - [clang] Fix the bogus diagnostic introduced by the newly-added UsingTemplate Kind.

2022-09-23 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-09-23T10:36:55+02:00 New Revision: 4f8d92f1d6bea3bed2dc450ba33efa4a0f5baffb URL: https://github.com/llvm/llvm-project/commit/4f8d92f1d6bea3bed2dc450ba33efa4a0f5baffb DIFF: https://github.com/llvm/llvm-project/commit/4f8d92f1d6bea3bed2dc450ba33efa4a0f5baffb.diff LO

[PATCH] D123808: [clang] Fix the bogus diagnostic introduced by the newly-added UsingTemplate Kind.

2022-09-23 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4f8d92f1d6be: [clang] Fix the bogus diagnostic introduced by the newly-added UsingTemplate… (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D134453: Introduce the `AlwaysIncludeTypeForNonTypeTemplateArgument` into printing policy

2022-09-23 Thread Nenad Mikša via Phabricator via cfe-commits
DoDoENT added inline comments. Comment at: clang/include/clang/AST/PrettyPrinter.h:307 + /// decltype(s) will be printed as "S" if enabled and as "S<{1,2}>" if disabled, + /// regardless if PrintCanonicalTypes is enabled. + unsigned AlwaysIncludeTypeForNonTypeTemplateArgument

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

2022-09-23 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 updated this revision to Diff 462423. 10ne1 added a comment. Regenerated diff with git diff HEAD~1 -U99 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134454/new/ https://reviews.llvm.org/D134454 Files: clang/include/clang/Driver/Distro.h clang/lib/Driver/Distro.cpp clan

[PATCH] D133801: Extraction of a matcher for an unused value from an expression from the bugprone-unused-return-value check

2022-09-23 Thread Konrad Wilhelm Kleine via Phabricator via cfe-commits
kwk added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/MatchersTest.cpp:2 +#include "utils/Matchers.h" +#include "../../clang/unittests/ASTMatchers/ASTMatchersTest.h" + njames93 wrote: > @kwk I seem to recall you saying in another patch tha

[PATCH] D134461: [Clang] Diagnose an error when trying to deferencing void pointers in C

2022-09-23 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 462426. junaire added a comment. Address comments from reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134461/new/ https://reviews.llvm.org/D134461 Files: clang/docs/ReleaseNotes.rst clang/include

[PATCH] D134461: [Clang] Diagnose an error when trying to deferencing void pointers in C

2022-09-23 Thread Jun Zhang via Phabricator via cfe-commits
junaire marked 3 inline comments as done. junaire added a comment. > So I thought 'isAddressOfOperand' might be good enough for this, is this not > the case? Yeah, that works, I somehow missed it ;D Thank you, Erich! Comment at: clang/lib/Sema/SemaExpr.cpp:14541 + Kind =

[PATCH] D134461: [Clang] Warn when trying to deferencing void pointers in C

2022-09-23 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 462428. junaire marked an inline comment as done. junaire added a comment. Add `&(*p)` test case in dr1xx.c. (Previous seperate test is removed as it mostly duplicate with the DR test) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D134523: [clang][Interp] Fix copy constructors with record array members

2022-09-23 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, tahonermann. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously, we were only handling arrays of arrays

[clang-tools-extra] 7438df9 - Remove an unused var decl, NFC.

2022-09-23 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-09-23T11:54:50+02:00 New Revision: 7438df99604233bf9e319875adcbd97aae608520 URL: https://github.com/llvm/llvm-project/commit/7438df99604233bf9e319875adcbd97aae608520 DIFF: https://github.com/llvm/llvm-project/commit/7438df99604233bf9e319875adcbd97aae608520.diff LO

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-23 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 462437. royjacobson added a comment. Apply suggestions from Aaron and rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133659/new/ https://reviews.llvm.org/D133659 Files: clang/docs/ReleaseNotes.rst

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-23 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 462438. royjacobson marked 8 inline comments as done. royjacobson added a comment. Small doc change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133659/new/ https://reviews.llvm.org/D133659 Files: clang

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-23 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked an inline comment as not done. royjacobson added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1037-1041 +def err_static_mutable_lambda : Error< + "lambda cannot be both mutable and static">; +def err_static_lambda_captures : E

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1037-1041 +def err_static_mutable_lambda : Error< + "lambda cannot be both mutable and static">; +def err_static_lambda_captures : Error< + "a static lambda cannot have any captures">;

[PATCH] D130460: [pseudo] Add recovery for declarations

2022-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 462448. hokein added a comment. Fix a bug caused by my change, and add test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130460/new/ https://reviews.llvm.org/D130460 Files: clang-tools-extra/pseudo/include/

[PATCH] D134441: [ObjC][ARC] Don't use operand bundle "clang.arc.attachedcall" in codegen for Windows

2022-09-23 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added a comment. Thanks for your feedback! For the moment, I continued the discussion in the GitHub ticket. My gut feeling is that I should fix the X86ExpandPseudo code to emit the right register-register move instead of preventing the use of the operand bundle here in CodeGen, becaus

[clang] 31142c4 - [clang] Make --ld-path= work with -fuse-ld=lld

2022-09-23 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2022-09-23T09:04:19-04:00 New Revision: 31142c4290533eeb771a0fc66af4918bd74bc162 URL: https://github.com/llvm/llvm-project/commit/31142c4290533eeb771a0fc66af4918bd74bc162 DIFF: https://github.com/llvm/llvm-project/commit/31142c4290533eeb771a0fc66af4918bd74bc162.diff LO

[PATCH] D134063: [clang] Make --ld-path= work with -fuse-ld=lld

2022-09-23 Thread Nico Weber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG31142c429053: [clang] Make --ld-path= work with -fuse-ld=lld (authored by thakis). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-09-23 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 created this revision. Herald added a project: All. usaxena95 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Implement https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2468r2.html. Primarily we now accept template st

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1037-1041 +def err_static_mutable_lambda : Error< + "lambda cannot be both mutable and static">; +def err_static_lambda_captures : Error< + "a static lambda cannot have any captur

[PATCH] D134461: [Clang] Warn when trying to deferencing void pointers in C

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6922 def ext_typecheck_indirection_through_void_pointer : ExtWarn< - "ISO C++ does not allow indirection on operand of type %0">, + "ISO %select{C++|C}0 does not allow indirection

[PATCH] D128830: [Pipelines] Introduce DAE after ArgumentPromotion

2022-09-23 Thread Pavel Samolysov via Phabricator via cfe-commits
psamolysov added a comment. @aeubanks Thank you very much for the re-landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128830/new/ https://reviews.llvm.org/D128830 ___ cfe-commits mailing list cfe-c

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:279-280 ``%hd``. +- Reject type definitions in the ``type`` argument of ``__builtin_offsetof`` + according to `WG14 N2350 `_. -

[PATCH] D134416: Allow getting template args for ClassTemplateSpecializations

2022-09-23 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! I can fix up the minor nit with the release note formatting when I land on your behalf. Comment at: clang/docs/ReleaseNotes.rst:407-408 + ``clang_Cursor

[PATCH] D134507: [Clang] add missing ClangABICompat check

2022-09-23 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Hi @ychen I saw you updated the patch description, thanks. IIUC, the change causes some difference in the interpretation of particular template stuff. Would this be clearer if the BEFORE-15/AFTER-15 test cases used the same template construct? Currently they are diff

[PATCH] D125683: [runtimes] Replace LIBCXX_ENABLE_STATIC_ABI_LIBRARY & friends by a new LIBCXX_CXX_ABI choice

2022-09-23 Thread Nikita Popov via Phabricator via cfe-commits
nikic requested changes to this revision. nikic added a comment. This revision now requires changes to proceed. I have some concerns about this change: - It makes it fundamentally impossible to link against a static system-libcxxabi (or any other `LIBCXX_CXX_ABI` option). This is currently alre

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-23 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. Emm, is it necessary to add a `LangOpts` check so that this change only applies to c2x? If clang was invoked without `-std=c2x`, should we just accept `offsetof` with definitions? Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:1650 +def e

[PATCH] D134157: [Clang][LoongArch] Add inline asm support for constraints f/l/I/K

2022-09-23 Thread Renato Golin via Phabricator via cfe-commits
rengolin accepted this revision. rengolin added a comment. This revision is now accepted and ready to land. Thanks, looks good to me! I wouldn't split this in two commits. One of the benefits of having a monorepo is that we don't have to do that anymore. :) Comment at: llvm/l

[PATCH] D133586: [clang] initialize type qualifiers for FunctionNoProtoType

2022-09-23 Thread Richard Howell via Phabricator via cfe-commits
rmaz updated this revision to Diff 462483. rmaz added a comment. Return default Qualifiers for FunctionNoProtoType Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133586/new/ https://reviews.llvm.org/D133586 Files: clang/include/clang/AST/Type.h

[clang] e8c78d8 - Allow getting template args for ClassTemplateSpecializations

2022-09-23 Thread Aaron Ballman via cfe-commits
Author: Anders Langlands Date: 2022-09-23T11:06:14-04:00 New Revision: e8c78d8528a6b7a96c93ea42749a3c0a03cd9b08 URL: https://github.com/llvm/llvm-project/commit/e8c78d8528a6b7a96c93ea42749a3c0a03cd9b08 DIFF: https://github.com/llvm/llvm-project/commit/e8c78d8528a6b7a96c93ea42749a3c0a03cd9b08.di

[PATCH] D134416: Allow getting template args for ClassTemplateSpecializations

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe8c78d8528a6: Allow getting template args for ClassTemplateSpecializations (authored by anderslanglands, committed by aaron.ballman). Changed prior to commit: https://reviews.llvm.org/D134416?vs=462392

[PATCH] D134542: [Concepts] Recover properly from a RecoveryExpr in a concept

2022-09-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added a reviewer: clang-language-wg. Herald added a project: All. erichkeane requested review of this revision. Discovered by reducing a different problem, we currently assert because we failed to make the constraint expressions not dependent, since a R

[PATCH] D134544: [clang-cl] Implement /ZH: flag

2022-09-23 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hans. Herald added a project: All. thakis requested review of this revision. Herald added a subscriber: MaskRay. Based on a patch by Arlo Siemsen (D98438 )! https://reviews.llvm.org/D134544 Files: clang/in

[PATCH] D98438: Clang: Allow selecting the hash algorithm for file checksums in debug info.

2022-09-23 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Herald added a subscriber: MaskRay. Herald added a project: All. I addressed pending comments, did some other minor tweaks, and uploaded the modified diff to D134544 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D134304: [Docs] [HLSL] Add IR reference for HLSL

2022-09-23 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd20f9f8d2177: [Docs] [HLSL] Add IR reference for HLSL (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134304/new/ https://reviews.llvm.or

[clang] d20f9f8 - [Docs] [HLSL] Add IR reference for HLSL

2022-09-23 Thread Chris Bieneman via cfe-commits
Author: Chris Bieneman Date: 2022-09-23T10:29:54-05:00 New Revision: d20f9f8d2177cd02184bb2c2794af398ba355f61 URL: https://github.com/llvm/llvm-project/commit/d20f9f8d2177cd02184bb2c2794af398ba355f61 DIFF: https://github.com/llvm/llvm-project/commit/d20f9f8d2177cd02184bb2c2794af398ba355f61.diff

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133574#3811496 , @inclyc wrote: > Emm, is it necessary to add a `LangOpts` check so that this change only > applies to c2x? If clang was invoked without `-std=c2x`, should we just > accept `offsetof` with definitions?

[PATCH] D131963: [libc++] Add custom clang-tidy checks

2022-09-23 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added subscribers: smeenai, beanz. ldionne added a comment. This revision is now accepted and ready to land. I'd be fine with this as-is if it works in the CI. IIUC, the current blocker for this is that the `ClangConfig.cmake` installed by LLVM is not robu

[PATCH] D134544: [clang-cl] Implement /ZH: flag

2022-09-23 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 462503. thakis added a comment. tweak CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134544/new/ https://reviews.llvm.org/D134544 Files: clang/include/clang/Basic/CodeGenOptions.def clang/include/clang/Basic/CodeGenOptions.h clang/include/clang

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-23 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:1650 +def err_type_defined_in_offsetof : Error< + "%0 cannot be defined in '__builtin_offsetof'">; aaron.ballman wrote: > inclyc wrote: > > aaron.ballman wrote: > > > We

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:1650 +def err_type_defined_in_offsetof : Error< + "%0 cannot be defined in '__builtin_offsetof'">; inclyc wrote: > aaron.ballman wrote: > > inclyc wrote: > > > aa

[PATCH] D134544: [clang-cl] Implement /ZH: flag

2022-09-23 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a project: debug-info. probinson added a comment. Probably we should reject the -gsrc... option if we're emitting DWARF, which requires MD5 (at least so far). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134544/new/ https://reviews.llvm.org/D134544 ___

[PATCH] D98438: Clang: Allow selecting the hash algorithm for file checksums in debug info.

2022-09-23 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. So this one can be marked abandoned? You might need to commandeer it first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98438/new/ https://reviews.llvm.org/D98438 ___ cfe-co

[PATCH] D134468: [Driver] Ignore -fmsc-version= -fms-compatibility-version= values smaller than 19

2022-09-23 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. These kinds of compatibility changes generally should get a Discourse post for better visibility. Comment at: clang/docs/ReleaseNotes.rst:85 + a version smaller than ``19.0`` is now unsupported. + Or words to that effect. "19.0"

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3810769 , @serge-sans-paille wrote: > Shouldn't this be a situation where `-Wmisexpect` shold / could trigger? If we're going to let PGO override what the user explicitly wrote in their code, we definitely shou

[PATCH] D134546: [clang-offload-bundler] extracting compatible bundle entry

2022-09-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, saiislam, lamb-j. Herald added a project: All. yaxunl requested review of this revision. Herald added subscribers: sstefan1, MaskRay. Herald added a reviewer: jdoerfert. In HIP a library is usually compiled with default target ID e.g. gfx9

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

2022-09-23 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. > The number of people likely to notice that PS4 is different from the other > targets seems far smaller than the number of people noticing the same for > Windows. But I've got no data to back that up, either. heh. There's a PS4 bot that notices. But the PS4 situati

[PATCH] D134468: [Driver] Ignore -fmsc-version= -fms-compatibility-version= values smaller than 19

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: clang-vendors. aaron.ballman added a subscriber: andrew.w.kaylor. aaron.ballman added a comment. Adding clang-vendors for awareness as this has the potential to impact folks vending clang. In D134468#3811882 , @probinson w

[PATCH] D133586: [clang] initialize type qualifiers for FunctionNoProtoType

2022-09-23 Thread Richard Howell via Phabricator via cfe-commits
rmaz updated this revision to Diff 462518. rmaz added a comment. Remove unnecessary friend class Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133586/new/ https://reviews.llvm.org/D133586 Files: clang/include/clang/AST/Type.h clang/unittests/A

[PATCH] D134549: [clang] Add fix-it note to defaulted-function-deleted warning

2022-09-23 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: aaron.ballman. Herald added a subscriber: martong. Herald added a reviewer: shafik. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adds a fix

[PATCH] D132379: [Support] Class for response file expansion

2022-09-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 462528. sepavloff added a comment. Address reviewer's notes - Pass BumpPtrAllocator instead of StringSaver, - Use setter to specify file system object. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132379/new

[PATCH] D132379: [Support] Class for response file expansion

2022-09-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: llvm/include/llvm/Support/CommandLine.h:2098 +public: + ExpansionContext(StringSaver &S, TokenizerCallback T, + llvm::vfs::FileSystem *FS = nullptr); rnk wrote: > StringSaver is a stateless class tha

[PATCH] D134468: [Driver] Ignore -fmsc-version= -fms-compatibility-version= values smaller than 19

2022-09-23 Thread Tobias Hieta via Phabricator via cfe-commits
thieta added a comment. I think we should define a policy for this. I doubt we have many users on these older versions but I think maybe we should give deprecation messages for at least one release before we drop it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D134224: [clang][modules][deps] Report modulemaps describing excluded headers

2022-09-23 Thread Steven Johnson via Phabricator via cfe-commits
srj added a comment. This change has broken x86-32 builds, at least on Linux. /usr/local/google/home/srj/GitHub/llvm-project/16/llvm/include/llvm/ADT/PointerIntPair.h:136:25: error: static assertion failed: PointerIntPair with integer size too large for pointer 136 | static_assert(IntB

[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: MaskRay, aaron.ballman. Herald added a subscriber: StephenFan. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds an additional check

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

2022-09-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D86049#3806898 , @plotfi wrote: > 1. Do we change the existing visibility behavior of objc methods? Yes / No I don't think we want to change the existing visibility behavior of non-direct objc methods. Is there a use reason o

[PATCH] D134235: [clang-doc] Clean up *Info constructors.

2022-09-23 Thread Brett Wilson via Phabricator via cfe-commits
brettw added inline comments. Comment at: clang-tools-extra/clang-doc/Representation.h:202 + bool IsFileInRootDir = false) : LineNumber(LineNumber), Filename(std::move(Filename)), IsFileInRootDir(IsFileInRootDir) {} paulkirth wrote: > do

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

2022-09-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Is it worth contacting the package maintainer for LLVM+clang for Arch-Linux in regards to this patch? Comment at: clang/lib/Driver/Distro.cpp:210 + // Sometimes the OS can't be detected from the triplet due to ambiguity, for + // eg. ArchLinu

[PATCH] D134546: [clang-offload-bundler] extracting compatible bundle entry

2022-09-23 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/OffloadBundler.cpp:1008 +auto Output = Worklist.begin(); +for (auto E = Worklist.end(); Output != E; Output++) { + if (isCodeObjectCompatible( The patch description implies that there are at lea

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-23 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. When I implemented P0479R5 I didn't look at earlier revisions of the paper. I'm a bit surprised to see revision 2 had a lot more information. (At that time I was less familiar with WG21 papers, so I didn't consider looking at older papers or notice the missing revision

[PATCH] D133801: Extraction of a matcher for an unused value from an expression from the bugprone-unused-return-value check

2022-09-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/MatchersTest.cpp:2 +#include "utils/Matchers.h" +#include "../../clang/unittests/ASTMatchers/ASTMatchersTest.h" + kwk wrote: > njames93 wrote: > > @kwk I seem to recall you saying

[PATCH] D133705: [HIP] Fix unbundling archive

2022-09-23 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2907-2908 +// which are not object files. Files with extension ".lib" is classified +// as TY_Object but they are actually archives, therefore should not be +//

[PATCH] D134453: Introduce the `AlwaysIncludeTypeForNonTypeTemplateArgument` into printing policy

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/PrettyPrinter.h:307 + /// decltype(s) will be printed as "S" if enabled and as "S<{1,2}>" if disabled, + /// regardless if PrintCanonicalTypes is enabled. + unsigned AlwaysIncludeTypeForNonTypeTemplateAr

[PATCH] D134546: [clang-offload-bundler] extracting compatible bundle entry

2022-09-23 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added a comment. The patch looks fine to me. Please wait for @tra 's final review. On a different note, can this compatibility testing logic be moved to a llvm library instead of clang's? I want to use it in OpenMP's AMDGPU plugin, which now links llvm libraries by default.

[PATCH] D134542: [Concepts] Recover properly from a RecoveryExpr in a concept

2022-09-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. The patch looks good. Two high-level questions: - Does the similar thing happen for class templates? Like a constraint expr of a partial specialization has an error. Maybe we don't assert in this case? - I suppose the constraint error does not always affect the overload re

[PATCH] D134556: [Clang][OpenMP] Fix run time crash when use_device_addr is used.

2022-09-23 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: ABataev, jdoerfert, mikerice. jyu2 added a project: OpenMP. Herald added subscribers: guansong, yaxunl. Herald added a project: All. jyu2 requested review of this revision. Herald added subscribers: openmp-commits, cfe-commits, sstefan1. Herald adde

[PATCH] D134542: [Concepts] Recover properly from a RecoveryExpr in a concept

2022-09-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 3 inline comments as done. erichkeane added a subscriber: tahonermann. erichkeane added a comment. In D134542#3812211 , @ychen wrote: > The patch looks good. Two high-level questions: > > - Does the similar thing happen for class templat

[PATCH] D134544: [clang-cl] Implement /ZH: flag

2022-09-23 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D134544#3811867 , @probinson wrote: > Probably we should reject the -gsrc... option if we're emitting DWARF, which > requires MD5 (at least so far). It's a cc1 option. As those aren't considered user facing, we don't do a lot

[PATCH] D128142: [MemProf] Memprof profile matching and annotation

2022-09-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1247 +uint32_t Column) { + return hash_combine(Function, LineOffset, Column); +} M

[PATCH] D134542: [Concepts] Recover properly from a RecoveryExpr in a concept

2022-09-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 2 inline comments as done. erichkeane added a comment. In D134542#3812292 , @erichkeane wrote: > In D134542#3812211 , @ychen wrote: > >> The patch looks good. Two high-level questions: >> >> - D

[clang] b1926f3 - Restore "[MemProf] Memprof profile matching and annotation"

2022-09-23 Thread Teresa Johnson via cfe-commits
Author: Teresa Johnson Date: 2022-09-23T11:38:47-07:00 New Revision: b1926f308f0939b365ee4940c7b1bd984b45e71a URL: https://github.com/llvm/llvm-project/commit/b1926f308f0939b365ee4940c7b1bd984b45e71a DIFF: https://github.com/llvm/llvm-project/commit/b1926f308f0939b365ee4940c7b1bd984b45e71a.diff

[PATCH] D134546: [clang-offload-bundler] extracting compatible bundle entry

2022-09-23 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/OffloadBundler.cpp:1008 +auto Output = Worklist.begin(); +for (auto E = Worklist.end(); Output != E; Output++) { + if (isCodeObjectCompatible( saiislam wrote: > tra wrote: > > The patch descript

[PATCH] D134542: [Concepts] Recover properly from a RecoveryExpr in a concept

2022-09-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 462568. erichkeane added a comment. Changes as suggested by @ychen. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134542/new/ https://reviews.llvm.org/D134542 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/ASTConcept.h

[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This is a neat idea, but I think we should think about it carefully. In general, `-Xclang` is not something we want to actively recommend users use, so do we really want to make it easier for users to use? One potential problem that could be caused by this change

[PATCH] D134544: [clang-cl] Implement /ZH: flag

2022-09-23 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. nice! Comment at: clang/include/clang/Basic/CodeGenOptions.def:344 +/// Set debug info source file hashing algorithm +ENUM_CODEGENOPT(DebugSrcHashAlgorithm, SrcHashAlgorithm, 2, CSK_MD5) ultra nit: period. But maybe the comment is superf

[PATCH] D133586: [clang] initialize type qualifiers for FunctionNoProtoType

2022-09-23 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 aside from a minor coding style nit, thank you! Comment at: clang/include/clang/AST/Type.h:3897-3898 + return Qualifiers::fromFastMask(FunctionTypeBit

[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D134550#3812369 , @aaron.ballman wrote: > This is a neat idea, but I think we should think about it carefully. In > general, `-Xclang` is not something we want to actively recommend users use, > so do we really want to make

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

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131465#3810070 , @hans wrote: >> If we're all using `clang` for the command, we'd all get the same behavior, >> right? There's no expectation that `clang` and `cl` behave the same way, >> that's what `clang-cl` is for.

[clang] 0d18815 - Fix GH57943: Friend constraint checker didn't handle null decls.

2022-09-23 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2022-09-23T12:21:56-07:00 New Revision: 0d18815baf6dffa682b0966f311041cfc7d8ff6d URL: https://github.com/llvm/llvm-project/commit/0d18815baf6dffa682b0966f311041cfc7d8ff6d DIFF: https://github.com/llvm/llvm-project/commit/0d18815baf6dffa682b0966f311041cfc7d8ff6d.diff L

[PATCH] D134453: Introduce the `AlwaysIncludeTypeForNonTypeTemplateArgument` into printing policy

2022-09-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/include/clang/AST/PrettyPrinter.h:307 + /// decltype(s) will be printed as "S" if enabled and as "S<{1,2}>" if disabled, + /// regardless if PrintCanonicalTypes is enabled. + unsigned AlwaysIncludeTypeForNonTypeTemplateArgumen

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

2022-09-23 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D86049#3812068 , @ahatanak wrote: > In D86049#3806898 , @plotfi wrote: > >> 1. Do we change the existing visibility behavior of objc methods? Yes / No > > I don't think we want to change t

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

2022-09-23 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D86049#3812068 , @ahatanak wrote: > In D86049#3806898 , @plotfi wrote: > >> 1. Do we change the existing visibility behavior of objc methods? Yes / No > > I don't think we want to change t

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

2022-09-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D131465#3812387 , @aaron.ballman wrote: > Does `clang-cl` set the `-fms-compatibility` version? If so, then it seems > like we'd probably want to key it off `-fms-compatibility`? I think both driver share the logic for MSVC vers

[PATCH] D134352: [AArch64] Add Neoverse V2 CPU support

2022-09-23 Thread Matt D. via Phabricator via cfe-commits
Matt added inline comments. Comment at: llvm/include/llvm/Support/AArch64TargetParser.def:239 +AARCH64_CPU_NAME("neoverse-v2", ARMV9A, FK_NEON_FP_ARMV8, false, + (AArch64::AEK_SVE | AArch64::AEK_SVE2 | AArch64::AEK_SSBS | + AArch64::AEK_FP16 | AAr

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rjmccall, efriedma. aaron.ballman added a comment. No additional comments from me, but I don't feel comfortable signing off on the codegen bits; adding some codegen code owners. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D134556: [Clang][OpenMP] Fix run time crash when use_device_addr is used.

2022-09-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8561-8617 for (const auto *Cl : Clauses) { const auto *C = dyn_cast(Cl); if (!C) continue; for (const auto L : C->component_lists()) { OMPClauseMappableExp

  1   2   >