[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/81662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-15 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I'm surprised about the "compiler-rt is not supported on windows" comment - > in our distribution, we've been building compiler-rt on windows for years, > and I don't remember significant issues. > > It's true that `__divsc3` is not available _without_ compiler-rt (i.e. j

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Jan Svoboda via cfe-commits
@@ -149,14 +157,44 @@ class SourceLocationSequence::State { operator SourceLocationSequence *() { return &Seq; } }; -inline uint64_t SourceLocationEncoding::encode(SourceLocation Loc, - SourceLocationSequence *Seq) { - return Se

[clang] [llvm] [InstallAPI] Add support for aliased exports (PR #88750)

2024-04-15 Thread Cyndy Ishida via cfe-commits
@@ -973,5 +978,24 @@ bool DylibVerifier::verifyBinaryAttrs(const ArrayRef ProvidedTargets, return true; } +std::unique_ptr DylibVerifier::getExports() { + for (const auto &[Alias, Base] : Aliases) { cyndyishida wrote: `getExports()` only gets called once

[clang] [llvm] [InstallAPI] Add support for aliased exports (PR #88750)

2024-04-15 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/88750 >From b2b54ad8ccf930a19327563a64c52c9f4013103f Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 11 Apr 2024 13:13:45 -0700 Subject: [PATCH 1/2] [InstallAPI] Add support for aliased exports Apple's ld s

[clang] [llvm] [InstallAPI] Add support for aliased exports (PR #88750)

2024-04-15 Thread Juergen Ributzka via cfe-commits
@@ -973,5 +978,24 @@ bool DylibVerifier::verifyBinaryAttrs(const ArrayRef ProvidedTargets, return true; } +std::unique_ptr DylibVerifier::getExports() { + for (const auto &[Alias, Base] : Aliases) { ributzka wrote: In that case I would update the function

[clang] [Documentation][Blocks ABI] Fix typoed integer (PR #65688)

2024-04-15 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/65688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Documentation][Blocks ABI] Fix typoed integer (PR #65688)

2024-04-15 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/65688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Documentation][Blocks ABI] Fix typoed integer (PR #65688)

2024-04-15 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/65688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstallAPI] Add support for aliased exports (PR #88750)

2024-04-15 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/88750 >From b2b54ad8ccf930a19327563a64c52c9f4013103f Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 11 Apr 2024 13:13:45 -0700 Subject: [PATCH 1/3] [InstallAPI] Add support for aliased exports Apple's ld s

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-15 Thread Farzon Lotfi via cfe-commits
@@ -7337,8 +7337,8 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl *D, // Validate. if (!Slot.empty()) { switch (Slot[0]) { -case 'u': case 'b': +case 'u': farzonl wrote: Why make this change? if its for alphabetical reasons, s

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-15 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/87578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement `self` clause for compute constructs (PR #88760)

2024-04-15 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/88760 `self` clauses on compute constructs take an optional condition expression. We again limit the implementation to ONLY compute constructs to ensure we get all the rules correct for others. However, this one w

[clang] [OpenACC] Implement `self` clause for compute constructs (PR #88760)

2024-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Erich Keane (erichkeane) Changes `self` clauses on compute constructs take an optional condition expression. We again limit the implementation to ONLY compute constructs to ensure we get all the rules correct for others. However,

[clang] [OpenACC] Implement `self` clause for compute constructs (PR #88760)

2024-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes `self` clauses on compute constructs take an optional condition expression. We again limit the implementation to ONLY compute constructs to ensure we get all the rules correct for others. However, this on

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -emit-llvm -fexceptions -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=EH,CHECK %s +// RUN: %clang_cc1 -emit-llvm -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=NOEH,CHECK %s +namespace std { + typedef decltype(si

[clang] [Clang] Fix __is_trivially_equaltiy_comparable documentation (PR #88528)

2024-04-15 Thread Aaron Ballman via cfe-commits
@@ -1640,7 +1640,7 @@ The following type trait primitives are supported by Clang. Those traits marked were made trivially relocatable via the ``clang::trivial_abi`` attribute. * ``__is_trivially_equality_comparable`` (Clang): Returns true if comparing two objects of the pr

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-15 Thread Farzon Lotfi via cfe-commits
@@ -7367,8 +7367,72 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl *D, return; } - // FIXME: check reg type match decl. Issue - // https://github.com/llvm/llvm-project/issues/57886. + VarDecl *VD = dyn_cast(D); + HLSLBufferDecl *BD = dyn_cast(D); + + if

[clang] [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (PR #88455)

2024-04-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Please also fix llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp https://github.com/llvm/llvm-project/pull/88455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Support single-file mode for all formats (PR #88764)

2024-04-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/88764 The `clang-scan-deps` tool can be used for fast scanning of batches of compilation commands passed in via the `-compilation-database` option. This gets awkward in our tests where we have to resort to using

[clang] [clang][deps] Support single-file mode for all formats (PR #88764)

2024-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes The `clang-scan-deps` tool can be used for fast scanning of batches of compilation commands passed in via the `-compilation-database` option. This gets awkward in our tests where we have to resort to usi

[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference (PR #87954)

2024-04-15 Thread Florian Mayer via cfe-commits
fmayer wrote: This broke the sanitizer bots, e.g. https://lab.llvm.org/buildbot/#/builders/239/builds/6587/steps/10/logs/stdio ``` [==] Running 2 tests from 1 test suite. [--] Global test environment set-up. [--] 2 tests from ExprMutationAnalyzerTest [ RUN ] ExprMut

[clang] [clang-tools-extra] Revert "[clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference" (PR #88765)

2024-04-15 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/88765 Reverts llvm/llvm-project#87954 Broke sanitizer bots, e.g. https://lab.llvm.org/buildbot/#/builders/239/builds/6587/steps/10/logs/stdio >From 82b9a06f73df5301ffd950775055304124f63e02 Mon Sep 17 00:00:00 2001 Fro

[clang] b2f07a9 - Revert "[clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference" (#88765)

2024-04-15 Thread via cfe-commits
Author: Florian Mayer Date: 2024-04-15T10:47:13-07:00 New Revision: b2f07a91192596a3584040208b7fac4f5ef0dd9c URL: https://github.com/llvm/llvm-project/commit/b2f07a91192596a3584040208b7fac4f5ef0dd9c DIFF: https://github.com/llvm/llvm-project/commit/b2f07a91192596a3584040208b7fac4f5ef0dd9c.diff

[clang] [clang-tools-extra] Revert "[clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference" (PR #88765)

2024-04-15 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/88765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Revert "[clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference" (PR #88765)

2024-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-tools-extra Author: Florian Mayer (fmayer) Changes Reverts llvm/llvm-project#87954 Broke sanitizer bots, e.g. https://lab.llvm.org/buildbot/#/builders/239/builds/6587/steps/10/logs/stdio --- Full diff: https://github.c

[clang] [clang] Move tailclipping to bitfield allocation (PR #87090)

2024-04-15 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/87090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Add `-o` flag to specify output path (PR #88767)

2024-04-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/88767 This makes it possible to pass "-o /dev/null" to `clang-scan-deps` and skip some potentially expensive work, making timings less noisy. Also removes the need for stream redirection. >From cab6c7b0da73836b3

[clang] [clang][deps] Add `-o` flag to specify output path (PR #88767)

2024-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes This makes it possible to pass "-o /dev/null" to `clang-scan-deps` and skip some potentially expensive work, making timings less noisy. Also removes the need for stream redirection. --- Full diff: https

[clang] [clang][deps] Add `-o` flag to specify output path (PR #88767)

2024-04-15 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. LGTM with a couple minor comments https://github.com/llvm/llvm-project/pull/88767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang][deps] Add `-o` flag to specify output path (PR #88767)

2024-04-15 Thread Ben Langmuir via cfe-commits
@@ -864,8 +873,24 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) { }); SharedStream Errs(llvm::errs()); - // Print out the dependency results to STDOUT by default. - SharedStream DependencyOS(llvm::outs()); + + std::optional FileOS; +

[clang] [clang][deps] Add `-o` flag to specify output path (PR #88767)

2024-04-15 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir edited https://github.com/llvm/llvm-project/pull/88767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Add `-o` flag to specify output path (PR #88767)

2024-04-15 Thread Ben Langmuir via cfe-commits
@@ -864,8 +873,24 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) { }); SharedStream Errs(llvm::errs()); - // Print out the dependency results to STDOUT by default. - SharedStream DependencyOS(llvm::outs()); + + std::optional FileOS; +

[clang] [clang][deps] Add `-o` flag to specify output path (PR #88767)

2024-04-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/88767 >From cab6c7b0da73836b36201be9a72295811b015367 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Mon, 15 Apr 2024 10:53:18 -0700 Subject: [PATCH 1/2] [clang][deps] Add `-o` flag to specify output path This m

[clang] [Attributes] Support Attributes being declared as only supporting late parsing when passing an experimental feature flag (PR #88596)

2024-04-15 Thread Dan Liew via cfe-commits
@@ -91,11 +91,24 @@ static StringRef normalizeAttrName(StringRef Name) { /// isAttributeLateParsed - Return true if the attribute has arguments that /// require late parsing. -static bool isAttributeLateParsed(const IdentifierInfo &II) { +bool Parser::isAttributeLateParsed(con

[clang] [Attributes] Support Attributes being declared as only supporting late parsing when passing an experimental feature flag (PR #88596)

2024-04-15 Thread Erich Keane via cfe-commits
@@ -91,11 +91,24 @@ static StringRef normalizeAttrName(StringRef Name) { /// isAttributeLateParsed - Return true if the attribute has arguments that /// require late parsing. -static bool isAttributeLateParsed(const IdentifierInfo &II) { +bool Parser::isAttributeLateParsed(con

[clang] [clang][deps] Support single-file mode for all formats (PR #88764)

2024-04-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/88764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Support single-file mode for all formats (PR #88764)

2024-04-15 Thread Jan Svoboda via cfe-commits
@@ -694,38 +687,28 @@ static std::string getModuleCachePath(ArrayRef Args) { return std::string(Path); } -// getCompilationDataBase - If -compilation-database is set, load the -// compilation database from the specified file. Otherwise if the we're -// generating P1689 form

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-15 Thread David Blaikie via cfe-commits
dwblaikie wrote: > Thanks @dwblaikie > > > Bit unfortunate to store template parameters in different ways (in the > > extraData for the alias template, but in the templateParams for the > > composite types) - but I guess it'd be more invasive to try to represent > > alias templates as composi

[clang] [Attributes] Support Attributes being declared as only supporting late parsing when passing an experimental feature flag (PR #88596)

2024-04-15 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/88596 >From 3554ada2c327aa6fb5ce90e26876414123bdca2d Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Fri, 12 Apr 2024 17:36:19 -0700 Subject: [PATCH] [Attributes] Support Attributes being declared as only supporting l

[clang] [Attributes] Support Attributes being declared as only supporting late parsing when passing an experimental feature flag (PR #88596)

2024-04-15 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 9bd10853e505b61f5fe2e3b3592c76787a06aa31 3554ada2c327aa6fb5ce90e26876414123bdca2d --

[clang] [Clang] Properly set the value category of dependent unary operators (PR #88740)

2024-04-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, good catch! https://github.com/llvm/llvm-project/pull/88740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Revert "[clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference" (PR #88765)

2024-04-15 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Looks like cyclic-dependency between shared_ptrs... Thx. https://github.com/llvm/llvm-project/pull/88765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function, NFC (PR #88447)

2024-04-15 Thread Argyrios Kyrtzidis via cfe-commits
https://github.com/akyrtzi updated https://github.com/llvm/llvm-project/pull/88447 >From 8b21183d5e836e0900ce051dab91f0a399ed83e5 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 11 Apr 2024 14:57:40 -0700 Subject: [PATCH] [clang/DependencyScanning/ModuleDepCollector] Refactor part

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function (PR #88447)

2024-04-15 Thread Argyrios Kyrtzidis via cfe-commits
https://github.com/akyrtzi edited https://github.com/llvm/llvm-project/pull/88447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function (PR #88447)

2024-04-15 Thread Argyrios Kyrtzidis via cfe-commits
https://github.com/akyrtzi edited https://github.com/llvm/llvm-project/pull/88447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function (PR #88447)

2024-04-15 Thread Argyrios Kyrtzidis via cfe-commits
akyrtzi wrote: > I assume you'll call resetBenignCodeGenOptions() from > ModuleDepCollector::applyDiscoveredDependencies() in a follow-up, non-NFC > patch, right? @jansvoboda11 see updated commit, I made the change per your suggestion. https://github.com/llvm/llvm-project/pull/88447 _

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Aaron Ballman via cfe-commits
@@ -423,6 +423,8 @@ Bug Fixes in This Version - Fixed a regression in CTAD that a friend declaration that befriends itself may cause incorrect constraint substitution. (#GH86769). +- Fixed an assertion failure on invalid InitListExpr in C90 mode (#GH88008).

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Aaron Ballman via cfe-commits
@@ -13805,29 +13804,24 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { // OpenCL v1.2 s6.5.3: __constant locals must be constant-initialized. // This is true even in C++ for OpenCL. } else if (VDecl->getType().getAddressSpace() ==

[clang] [Attributes] Support Attributes being declared as only supporting late parsing when passing an experimental feature flag (PR #88596)

2024-04-15 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/88596 >From 31e3269126569e43cae3e4b7aba159f9a32d3c70 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Fri, 12 Apr 2024 17:36:19 -0700 Subject: [PATCH] [Attributes] Support Attributes being declared as only supporting l

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function (PR #88447)

2024-04-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. Thanks! Still LGTM. https://github.com/llvm/llvm-project/pull/88447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Artem Belevich via cfe-commits
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); +// We have a name conflict with sys/mac.h on AIX +#ifdef SM_32 +#undef SM_32 +#endif Artem-B wrote: Ugh. What

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/88644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Attributes] Support Attributes being declared as only supporting late parsing when passing an experimental feature flag (PR #88596)

2024-04-15 Thread Dan Liew via cfe-commits
delcypher wrote: @Sirraide I've tried to address your feedback. https://github.com/llvm/llvm-project/pull/88596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Support single-file mode for all formats (PR #88764)

2024-04-15 Thread Ben Langmuir via cfe-commits
@@ -1,23 +1,10 @@ // RUN: rm -rf %t // RUN: split-file %s %t -//--- missing_tu.json.in -[{ - "directory": "DIR", - "command": "clang -fsyntax-only DIR/missing_tu.c", - "file": "DIR/missing_tu.c" -}] -//--- missing_header.json.in -[{ - "directory": "DIR", - "command": "cla

[clang] [Attributes] Support Attributes being declared as only supporting late parsing when passing an experimental feature flag (PR #88596)

2024-04-15 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/88596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Joseph Huber via cfe-commits
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); +// We have a name conflict with sys/mac.h on AIX +#ifdef SM_32 +#undef SM_32 +#endif jhuber6 wrote: We already

[clang] [Attributes] Support Attributes being declared as only supporting late parsing when passing an experimental feature flag (PR #88596)

2024-04-15 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/88596 >From db0483ab298cbfee2a76844e4b0f63c3ae0ff68a Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Fri, 12 Apr 2024 17:36:19 -0700 Subject: [PATCH] [Attributes] Support Attributes being declared as only supporting l

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Joseph Huber via cfe-commits
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); +// We have a name conflict with sys/mac.h on AIX +#ifdef SM_32 +#undef SM_32 +#endif jhuber6 wrote: We could a

[clang] Carving out -Wformat warning about scoped enums into a subwarning (PR #88595)

2024-04-15 Thread Aaron Ballman via cfe-commits
@@ -12,8 +12,8 @@ // RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -std=c11 -fsyntax-only -Wformat -verify=okay %s // Verify that -Wformat-signedness with -Wno-format are not reported (gcc compat). AaronBallman wrote: Yes, this is intentional, see the discuss

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-15 Thread Jonas Devlieghere via cfe-commits
JDevlieghere wrote: Hey @etcwilde, this breaks the Xcode standalone build for lldb: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-standalone/121/ The failing command in the generated script phase is: ``` cmake -E copy_directory /Users/jonas/llvm/xcode-build/Debug/bin/LLD

[clang] Carving out -Wformat warning about scoped enums into a subwarning (PR #88595)

2024-04-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Please mention that this fixes #81647 in the patch summary so that the issue is automatically closed. You should also add a release note so that users know about the change (and link to the issue being closed). https://github.com/llvm/llvm-project/pu

[clang] [clang][deps] Support single-file mode for all formats (PR #88764)

2024-04-15 Thread Jan Svoboda via cfe-commits
@@ -1,23 +1,10 @@ // RUN: rm -rf %t // RUN: split-file %s %t -//--- missing_tu.json.in -[{ - "directory": "DIR", - "command": "clang -fsyntax-only DIR/missing_tu.c", - "file": "DIR/missing_tu.c" -}] -//--- missing_header.json.in -[{ - "directory": "DIR", - "command": "cla

[clang] [Clang][Sema] Warn when 'exclude_from_explicit_instantiation' attribute is used on local classes and members thereof (PR #88777)

2024-04-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/88777 A local class and its members declared in a function template are instantiated alongside the definition of that template. It therefore does not make sense to apply the `exclude_from_explicit_instantiation` at

[clang] [Clang][Sema] Warn when 'exclude_from_explicit_instantiation' attribute is used on local classes and members thereof (PR #88777)

2024-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes A local class and its members declared in a function template are instantiated alongside the definition of that template. It therefore does not make sense to apply the `exclude_from_explicit_instan

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/88670 >From 599283c1845a25afe90163a5f0a7a809c622a521 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Sun, 14 Apr 2024 21:21:21 + Subject: [PATCH 1/3] Use pushFullExprCleanup for deferred destroy --- clang/lib/Co

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -emit-llvm -fexceptions -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=EH,CHECK %s +// RUN: %clang_cc1 -emit-llvm -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=NOEH,CHECK %s +namespace std { + typedef decltype(si

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Artem Belevich via cfe-commits
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); +// We have a name conflict with sys/mac.h on AIX +#ifdef SM_32 +#undef SM_32 +#endif Artem-B wrote: > We could

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Joseph Huber via cfe-commits
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); +// We have a name conflict with sys/mac.h on AIX +#ifdef SM_32 +#undef SM_32 +#endif jhuber6 wrote: I mean, mo

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-15 Thread Paul T Robinson via cfe-commits
@@ -4584,6 +4584,32 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T, } } + // Emit DW_TAG_template_alias for template aliases? True by default for SCE. + const auto *DebugTemplateAlias = Args.getLastArg( + options::OPT_gtemplate_

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-15 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 deleted https://github.com/llvm/llvm-project/pull/87623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -emit-llvm -fexceptions -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=EH,CHECK %s +// RUN: %clang_cc1 -emit-llvm -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=NOEH,CHECK %s +namespace std { + typedef decltype(si

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Artem Belevich via cfe-commits
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); +// We have a name conflict with sys/mac.h on AIX +#ifdef SM_32 +#undef SM_32 +#endif Artem-B wrote: Deprecatin

[clang] [Clang][Sema] Warn when 'exclude_from_explicit_instantiation' attribute is used on local classes and members thereof (PR #88777)

2024-04-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88777 >From e65e39bfb9915cf248dbfa64451298ed1877d45c Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 12 Apr 2024 14:33:30 -0400 Subject: [PATCH 1/2] [Clang][Sema] Ignore 'exclude_from_explicit_instant

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Joseph Huber via cfe-commits
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); +// We have a name conflict with sys/mac.h on AIX +#ifdef SM_32 +#undef SM_32 +#endif jhuber6 wrote: Just namin

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/88644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-15 Thread Paul T Robinson via cfe-commits
@@ -4584,6 +4584,32 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T, } } + // Emit DW_TAG_template_alias for template aliases? True by default for SCE. + const auto *DebugTemplateAlias = Args.getLastArg( + options::OPT_gtemplate_

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-15 Thread Paul T Robinson via cfe-commits
@@ -5361,7 +5383,56 @@ static bool IsReconstitutableType(QualType QT) { return T.Reconstitutable; } -std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { +bool CGDebugInfo::HasReconstitutableArgs( +ArrayRef Args) const { + return llvm::all_of(Args, [&

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-15 Thread Paul T Robinson via cfe-commits
@@ -465,3 +465,15 @@ // MANGLED_TEMP_NAMES: error: unknown argument '-gsimple-template-names=mangled'; did you mean '-Xclang -gsimple-template-names=mangled' // RUN: %clang -### -target x86_64 -c -g %s 2>&1 | FileCheck --check-prefix=FULL_TEMP_NAMES --implicit-check-not=debu

[clang] [Attributes] Support Attributes being declared as only supporting late parsing when passing an experimental feature flag (PR #88596)

2024-04-15 Thread Bill Wendling via cfe-commits
@@ -1822,28 +1822,101 @@ void WriteSemanticSpellingSwitch(const std::string &VarName, OS << " }\n"; } +enum class LateAttrParseKind { Never = 0, Always = 1, ExperimentalOnly = 2 }; + +static LateAttrParseKind getLateAttrParseKind(const Record *Attr) { + // This function b

[clang] [CUDA] Rename SM_32 to _SM_32 to work around AIX headers (PR #88779)

2024-04-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/88779 Summary: AIX headers define this, so we need to work around it. In the future this will be removed but for now we should just rename it to avoid these issues. >From 0020d59172d819cbe95820f00ffdeb0712f5f2b8 Mon S

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Aaron Ballman via cfe-commits
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); +// We have a name conflict with sys/mac.h on AIX +#ifdef SM_32 +#undef SM_32 +#endif AaronBallman wrote: `_SM_

[clang] [CUDA] Rename SM_32 to _SM_32 to work around AIX headers (PR #88779)

2024-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Joseph Huber (jhuber6) Changes Summary: AIX headers define this, so we need to work around it. In the future this will be removed but for now we should just rename it to avoid these issues. --- Full diff: https://github.com/llvm/l

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Joseph Huber via cfe-commits
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); +// We have a name conflict with sys/mac.h on AIX +#ifdef SM_32 +#undef SM_32 +#endif jhuber6 wrote: Good point

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Artem Belevich via cfe-commits
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); +// We have a name conflict with sys/mac.h on AIX +#ifdef SM_32 +#undef SM_32 +#endif Artem-B wrote: SGTM. Than

[clang] [CUDA] Rename SM_32 to _SM_32 to work around AIX headers (PR #88779)

2024-04-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/88779 >From 78662e53fd1309d1e75eb144a2759c580800fd0d Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 15 Apr 2024 14:12:15 -0500 Subject: [PATCH] [CUDA] Rename SM_32 to _SM_32 to work around AIX headers Summary:

[clang] [CUDA] Rename SM_32 to SM_32_ to work around AIX headers (PR #88779)

2024-04-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/88779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-15 Thread Joseph Huber via cfe-commits
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" CudaVersion CudaStringToVersion(const llvm::Twine &S); +// We have a name conflict with sys/mac.h on AIX +#ifdef SM_32 +#undef SM_32 +#endif jhuber6 wrote: Done in ht

[clang] [CUDA] Rename SM_32 to SM_32_ to work around AIX headers (PR #88779)

2024-04-15 Thread Aaron Ballman via cfe-commits
@@ -3466,7 +3466,7 @@ void CGOpenMPRuntimeGPU::processRequiresDirective( case CudaArch::SM_20: case CudaArch::SM_21: case CudaArch::SM_30: - case CudaArch::SM_32: + case CudaArch::_SM_32: AaronBallman wrote: `SM_32_` ? https://gith

[clang] [CUDA] Rename SM_32 to SM_32_ to work around AIX headers (PR #88779)

2024-04-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Other than that nit, LGTM (leaving final approval to @Artem-B ) https://github.com/llvm/llvm-project/pull/88779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [CUDA] Rename SM_32 to SM_32_ to work around AIX headers (PR #88779)

2024-04-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/88779 >From 5440db2ad12cc7f47cf7338a1f963c753b0a9f78 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 15 Apr 2024 14:12:15 -0500 Subject: [PATCH] [CUDA] Rename SM_32 to _SM_32 to work around AIX headers Summary:

[clang] [CUDA] Rename SM_32 to SM_32_ to work around AIX headers (PR #88779)

2024-04-15 Thread Joseph Huber via cfe-commits
@@ -3466,7 +3466,7 @@ void CGOpenMPRuntimeGPU::processRequiresDirective( case CudaArch::SM_20: case CudaArch::SM_21: case CudaArch::SM_30: - case CudaArch::SM_32: + case CudaArch::_SM_32: jhuber6 wrote: Thanks, for some reason my LS

[clang] [CUDA] Rename SM_32 to SM_32_ to work around AIX headers (PR #88779)

2024-04-15 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/88779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Move several vector intrinsics out of experimental namespace (PR #88748)

2024-04-15 Thread Craig Topper via cfe-commits
topperc wrote: > vector.revert I think should be vector.reverse? https://github.com/llvm/llvm-project/pull/88748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Move several vector intrinsics out of experimental namespace (PR #88748)

2024-04-15 Thread Craig Topper via cfe-commits
topperc wrote: > All these intrinsics exist in LLVM for more than a year now, and are widly > used, so should not be considered as experimental. widly -> widely https://github.com/llvm/llvm-project/pull/88748 ___ cfe-commits mailing list cfe-commits@

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -emit-llvm -fexceptions -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=EH,CHECK %s +// RUN: %clang_cc1 -emit-llvm -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=NOEH,CHECK %s +namespace std { + typedef decltype(si

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/88670 >From 599283c1845a25afe90163a5f0a7a809c622a521 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Sun, 14 Apr 2024 21:21:21 + Subject: [PATCH 1/4] Use pushFullExprCleanup for deferred destroy --- clang/lib/Co

[clang] [CUDA] Rename SM_32 to SM_32_ to work around AIX headers (PR #88779)

2024-04-15 Thread Artem Belevich via cfe-commits
@@ -86,7 +88,7 @@ static const CudaArchToStringMap arch_names[] = { // clang-format off {CudaArch::UNUSED, "", ""}, SM2(20, "compute_20"), SM2(21, "compute_20"), // Fermi -SM(30), SM(32), SM(35), SM(37), // Kepler +SM(30), SM3(32, "compute_32"), SM(35), SM(

[clang] [llvm] Move several vector intrinsics out of experimental namespace (PR #88748)

2024-04-15 Thread Craig Topper via cfe-commits
@@ -1099,6 +1099,25 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn, return true; } + ID = StringSwitch(Name) + .StartsWith("splice.", Intrinsic::vector_splice) + .StartsWith("reverse.", Intrinsic::vector_r

<    1   2   3   4   5   >