[llvm] [libc] [libcxx] [lldb] [flang] [clang-tools-extra] [lld] [libunwind] [clang] [compiler-rt] Test pr (PR #71086)

2023-11-02 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/71086 >From 340e3777509f70b5b300adcb181261e84247cf1a Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 23 Oct 2023 12:51:21 -0700 Subject: [PATCH 1/5] Revert "[clang] Support fixed point types in C++ (#67750)"

[llvm] [clang] [clang-tools-extra] [Clang][Sema] Skip RecordDecl when checking scope of declarations (PR #69432)

2023-11-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/69432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Petr Hosek via cfe-commits
petrhosek wrote: I'm a bit concerned about the use of `hasCorrelation`. We require the runtime to check the flag and omit the data and names section if set which introduces a potential issue: since we emit the version in every TU and u se COMDAT to deduplicate them, but that means that if you

[clang] [clang] Do not pass -canonical-system-headers on Windows by default (PR #71097)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Arthur Eubanks (aeubanks) Changes Canonicalizing paths on Windows leads to unexpected things like changing drive letters. As a short term fix, do not canonicalize system headers on Windows by default. Fixes #70011 --- Full diff:

[clang] [HLSL] Vector vector standard conversions (PR #71098)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Chris B (llvm-beanz) Changes HLSL supports vector truncation and element conversions as part of standard conversion sequences. The vector truncation conversion is a C++ second conversion in the conversion sequence. If a vector truncation

[clang] [HLSL] Vector vector standard conversions (PR #71098)

2023-11-02 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/71098 HLSL supports vector truncation and element conversions as part of standard conversion sequences. The vector truncation conversion is a C++ second conversion in the conversion sequence. If a vector

[clang] [clang] Do not pass -canonical-system-headers on Windows by default (PR #71097)

2023-11-02 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/71097 Canonicalizing paths on Windows leads to unexpected things like changing drive letters. As a short term fix, do not canonicalize system headers on Windows by default. Fixes #70011 >From

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 Thread via cfe-commits
https://github.com/wheatman updated https://github.com/llvm/llvm-project/pull/69061 >From 20e471721bbb17701954c3c6bf7f4342dd9bc3e2 Mon Sep 17 00:00:00 2001 From: Brian Wheatman Date: Sat, 14 Oct 2023 12:02:19 -0400 Subject: [PATCH] Remove warnings from -Wchar-subscripts for known positive

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 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 e6c0e8565cb05d5884de294b546dac85bc11b497 b46d376e803bae29231e313a623f508e22e6c9d6 --

[llvm] [lldb] [mlir] [flang] [clang-tools-extra] [clang] [compiler-rt] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-02 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/69493 >From 3a394ce5d4d7d91251337bd0a2c1c1a074eb37e6 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 17 Oct 2023 19:24:12 -0400 Subject: [PATCH 1/6] [Profile] Add binary profile correlation. ---

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 Thread via cfe-commits
wheatman wrote: Thanks you for the comments. I made the updates and added the note in `clang/docs/ReleaseNotes.rst` https://github.com/llvm/llvm-project/pull/69061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 Thread via cfe-commits
@@ -62,3 +62,28 @@ void t10(void) { UnsignedCharTy subscript = 0; int val = array[subscript]; // no warning for unsigned char } + +void t11(void) { + int array[256] = { 0 }; + int val = array['a']; // no warning for char with known positive value +} + +void t12(void) { +

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 Thread via cfe-commits
https://github.com/wheatman updated https://github.com/llvm/llvm-project/pull/69061 >From b46d376e803bae29231e313a623f508e22e6c9d6 Mon Sep 17 00:00:00 2001 From: Brian Wheatman Date: Sat, 14 Oct 2023 12:02:19 -0400 Subject: [PATCH] Remove warnings from -Wchar-subscripts for known positive

[clang] [llvm] [mlir] [flang] [compiler-rt] [clang-tools-extra] [lldb] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-02 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/69493 >From 3a394ce5d4d7d91251337bd0a2c1c1a074eb37e6 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 17 Oct 2023 19:24:12 -0400 Subject: [PATCH 1/5] [Profile] Add binary profile correlation. ---

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (michaelrj-google) Changes This patch adjusts the inline function decl check for LLVM libc to ignore implicit functions. For the moment the plan is to ignore these and mark the class with a macro so that it can be given the

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
https://github.com/michaelrj-google created https://github.com/llvm/llvm-project/pull/71095 This patch adjusts the inline function decl check for LLVM libc to ignore implicit functions. For the moment the plan is to ignore these and mark the class with a macro so that it can be given the

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86 datalayouts

2023-11-02 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D86310#4656024 , @Fznamznon wrote: > Hi there, > > This change seems to be causing assertion failure in clang when a struct > contains a _BitInt with length longer than 128 - > https://godbolt.org/z/4jTrW4fcP . Thanks for the

[clang] [clang][analyzer] Add a test case to PR-70792 for Issue-59493 (PR #71073)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ella Ma (Snape3058) Changes Following PR #70792 for issue #70464 Add a test case for issue #59493 --- Full diff: https://github.com/llvm/llvm-project/pull/71073.diff 1 Files Affected: - (modified) clang/test/Analysis/issue-70464.cpp

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,12 @@ +// This reports a warning to follow the default behavior of ClangAs. +// RUN: %clang -fexperimental-bounds-safety -x assembler -c %s -o /dev/null 2>&1 | FileCheck -check-prefix WARN %s + + +// WARN: warning: argument unused during compilation:

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this! The changes should come with a release note in `clang/docs/ReleaseNotes.rst` so users know about the change in behavior. https://github.com/llvm/llvm-project/pull/69061 ___ cfe-commits

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 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 55c9f24344a49cd1deb86af1d79d4dc3a798c6fb 5e35c30414517b242a1e68d46ecc5cfae3b75130 --

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-02 Thread Yusra Syeda via cfe-commits
@@ -976,6 +976,37 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-02 Thread Yusra Syeda via cfe-commits
@@ -976,6 +976,37 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,5 @@ +; RUN: %clang -fbounds-safety-experimental -x ir -S %s -o /dev/null 2>&1 | FileCheck %s +; RUN: %clang_cc1 -fbounds-safety-experimental -x ir -S %s -o /dev/null 2>&1 | FileCheck %s + rapidsna wrote: @MaskRay fixed!

[libunwind] [libcxx] [flang] [libc] [clang] [clang-tools-extra] [lld] [compiler-rt] [lldb] [llvm] Test branch (PR #70505)

2023-11-02 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/70505 >From 340e3777509f70b5b300adcb181261e84247cf1a Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 23 Oct 2023 12:51:21 -0700 Subject: [PATCH 1/5] Revert "[clang] Support fixed point types in C++ (#67750)"

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
@@ -330,6 +330,14 @@ def warn_alias_with_section : Warning< "as the %select{aliasee|resolver}2">, InGroup; +let CategoryName = "Bounds Safety Issue" in { +def err_bounds_safety_lang_not_supported : Error< + "bounds safety is only supported for C">; +def

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-02 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda updated https://github.com/llvm/llvm-project/pull/68926 >From 78f82bcf33998de0663f4684a64a240f2e97f8a9 Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Thu, 12 Oct 2023 16:56:27 -0400 Subject: [PATCH 01/15] This change adds support for the PPA2 section in zOS ---

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: not %clang -fbounds-safety-experimental -x c++ %s 2>&1 | FileCheck -check-prefix ERR %s + rapidsna wrote: @MaskRay Thank you! I removed the blank lines. https://github.com/llvm/llvm-project/pull/70480

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-02 Thread via cfe-commits
@@ -421,13 +421,101 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList , llvm_unreachable("Unexpected C++ library type; only libc++ is supported."); } +// This function processes all the mtocdata options to build the final +// simplified toc data options to pass to

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-02 Thread via cfe-commits
stephenpeckham wrote: > What are the ABI implications here? Do all translation units have to agree on > whether a variable is "tocdata"? The manual change hints there's some sort of > linker fixup, but it's not clear to me how that works. There are no ABI implications. Using -mtocdata removes

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
rapidsna wrote: > The other experimental flags I see start with experimental, this one ends > with it. Why isn't this called `-fexerimental-bounds-safety`? @tbaederr Thank you! I just renamed the flag to `-fexperimental-bounds-safety`. https://github.com/llvm/llvm-project/pull/70480

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
@@ -330,6 +330,14 @@ def warn_alias_with_section : Warning< "as the %select{aliasee|resolver}2">, InGroup; +let CategoryName = "Bounds Safety Issue" in { +def err_bounds_safety_lang_not_supported : Error< + "bounds safety is only supported for C">; +def

[clang] [Driver][DragonFly] Fixes for linker path and command-line option handling (PR #69095)

2023-11-02 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > This appears to have broken some bots: > https://lab.llvm.org/buildbot/#/builders/119/builds/15633 > https://lab.llvm.org/buildbot/#/builders/60/builds/14449 > > Can you investigate and get those bots back to green? Ping? https://github.com/llvm/llvm-project/pull/69095

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang -c %s -### 2>&1 | FileCheck -check-prefix T0 %s rapidsna wrote: @nickdesaulniers @MaskRay Thank you! I removed the new directory and moved the tests to conform to the existing layout.

[clang] [Driver][DragonFly] Fixes for linker path and command-line option handling (PR #69095)

2023-11-02 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > This appears to have broken some bots: > > > [lab.llvm.org/buildbot/#/builders/119/builds/15633](https://lab.llvm.org/buildbot/#/builders/119/builds/15633) > > > > > >

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/70480 >From 99ec6e055dd32a86bf6d589a6895658dcbe1d7bd Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Fri, 27 Oct 2023 08:34:37 -0700 Subject: [PATCH 1/5] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-02 Thread via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/67999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-02 Thread via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/67999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-02 Thread via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/67999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [llvm] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Zequan Wu via cfe-commits
@@ -89,3 +89,7 @@ COMPILER_RT_VISIBILITY void __llvm_profile_reset_counters(void) { } lprofSetProfileDumped(0); } + +inline int hasCorrelation() { ZequanWu wrote: COMPILER_RT_VISIBILITY is added at

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Zequan Wu via cfe-commits
@@ -261,6 +261,9 @@ uint64_t __llvm_profile_get_magic(void); /*! \brief Get the version of the file format. */ uint64_t __llvm_profile_get_version(void); +/*! \brief If the binary is compiled with profile correlation. */ +int hasCorrelation(); ZequanWu wrote:

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > > Sounds fine to me, but I guess I don't understand why `-profile-correlate=` > > doesn't work. Do you still plan to add the flag later? > > I haven't found a way to share information (whether of not binary correlation > is enabled) between

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Petr Hosek via cfe-commits
@@ -89,3 +89,7 @@ COMPILER_RT_VISIBILITY void __llvm_profile_reset_counters(void) { } lprofSetProfileDumped(0); } + +inline int hasCorrelation() { petrhosek wrote: The function should have a hidden visibility (the `COMPILER_RT_VISIBILITY` macro) so it's

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Petr Hosek via cfe-commits
@@ -261,6 +261,9 @@ uint64_t __llvm_profile_get_magic(void); /*! \brief Get the version of the file format. */ uint64_t __llvm_profile_get_version(void); +/*! \brief If the binary is compiled with profile correlation. */ +int hasCorrelation(); petrhosek

[clang] [llvm] [OpenMP][OMPIRBuilder] Add support to omp target parallel (PR #67000)

2023-11-02 Thread Johannes Doerfert via cfe-commits
@@ -1026,25 +1026,25 @@ for (int i = 0; i < argc; ++i) { // CHECK3-NEXT:call void @llvm.experimental.noalias.scope.decl(metadata [[META8:![0-9]+]]) // CHECK3-NEXT:call void @llvm.experimental.noalias.scope.decl(metadata [[META10:![0-9]+]]) // CHECK3-NEXT:call

[clang] [Driver][DragonFly] Fixes for linker path and command-line option handling (PR #69095)

2023-11-02 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > This appears to have broken some bots: > > [lab.llvm.org/buildbot/#/builders/119/builds/15633](https://lab.llvm.org/buildbot/#/builders/119/builds/15633) > > > > [lab.llvm.org/buildbot/#/builders/60/builds/14449](https://lab.llvm.org/buildbot/#/builders/60/builds/14449) > >

[clang] e65721c - [Driver][test] Fix dragonfly.c after #69095

2023-11-02 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-11-02T11:28:56-07:00 New Revision: e65721c3a1ee3ee4aa43499882f6d71dc9368daf URL: https://github.com/llvm/llvm-project/commit/e65721c3a1ee3ee4aa43499882f6d71dc9368daf DIFF: https://github.com/llvm/llvm-project/commit/e65721c3a1ee3ee4aa43499882f6d71dc9368daf.diff

[clang] [clang][analyzer] Add a test case to PR-70792 for Issue-59493 (PR #71073)

2023-11-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/71073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-02 Thread Brad King via cfe-commits
@@ -281,3 +281,26 @@ add_flang_library(FortranRuntime INSTALL_WITH_TOOLCHAIN ) + +if (DEFINED MSVC) + set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded) + add_flang_library(FortranRuntime.static ${sources} bradking wrote: When targeting the MSVC ABI, the

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:2561 + + void initFailClause(SourceLocation LParenLoc, OpenMPClauseKind FailParameter, + SourceLocation FailParameterLoc) { Unused? Comment

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-02 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/70833 >From 9e84729cada6c032c64934ee519e605407aab049 Mon Sep 17 00:00:00 2001 From: David Truby Date: Tue, 31 Oct 2023 15:07:13 + Subject: [PATCH 1/6] [flang][windows] Add option to link against specific MSVC

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86 datalayouts

2023-11-02 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. Hi there, This change seems to be causing assertion failure in clang when a struct contains a _BitInt with length longer than 128 - https://godbolt.org/z/4jTrW4fcP . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[libunwind] [compiler-rt] [lldb] [flang] [clang] [lld] [clang-tools-extra] [libcxx] [libc] [llvm] Test pr (PR #71086)

2023-11-02 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/71086 None >From 340e3777509f70b5b300adcb181261e84247cf1a Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 23 Oct 2023 12:51:21 -0700 Subject: [PATCH 1/4] Revert "[clang] Support fixed point types in C++

[PATCH] D154396: [clang] Add support for SerenityOS

2023-11-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:164 +if (crtend_path.empty()) { + const char *crtend = (IsShared || IsPIE) ? "crtendS.o" : "crtend.o"; + crtend_path = TC.GetFilePath(crtend); crt* files are not

[PATCH] D154396: [clang] Add support for SerenityOS

2023-11-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/serenity.cpp:2 +// UNSUPPORTED: system-windows + +/// Test a cross compiler. https://github.com/MaskRay/Config/wiki/LLVM#clanglibdriver The test fails in a `-DCLANG_DEFAULT_RTLIB=compiler-rt

[clang] 5532d67 - [clang] Remove no-op ptr-to-ptr bitcasts (NFC)

2023-11-02 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-02T12:43:26-05:00 New Revision: 5532d67a360e99f6b60d311d64e94a5a32d5d141 URL: https://github.com/llvm/llvm-project/commit/5532d67a360e99f6b60d311d64e94a5a32d5d141 DIFF: https://github.com/llvm/llvm-project/commit/5532d67a360e99f6b60d311d64e94a5a32d5d141.diff

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for the link to the LLVM side of things, that helps! https://github.com/llvm/llvm-project/pull/70762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -10026,6 +10026,10 @@ def err_duplicate_case_differing_expr : Error< def warn_case_empty_range : Warning<"empty case range specified">; def warn_missing_case_for_condition : Warning<"no case matching constant switch condition '%0'">; +def err_loop_attr_duplication :

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -322,6 +322,50 @@ static Attr *handleUnlikely(Sema , Stmt *St, const ParsedAttr , return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo , +Expr *E) { + if

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/70762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-02 Thread Zaara Syeda via cfe-commits
@@ -4016,7 +4016,63 @@ Clang expects the GCC executable "gcc.exe" compiled for AIX ^^^ +TOC Data Transformation +""" +TOC data transformation is off by default (``-mno-tocdata``). +When ``-mtocdata`` is specified, the TOC data transformation will be

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-02 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 557992. koops added a comment. Moving OMC_fail to use ParseOpenMPSimpleClause instead of ParseOpenMPClause. Other changes suggested by previous review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123235/new/ https://reviews.llvm.org/D123235 Files:

[llvm] [clang] [OpenMP][OMPIRBuilder] Add support to omp target parallel (PR #67000)

2023-11-02 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert approved this pull request. LG, commit the two commits separately though https://github.com/llvm/llvm-project/pull/67000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,127 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local -x c %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s + +void foo() { + int i; + int a[10], b[10]; + + [[clang::code_align(8)]] + for (i = 0; i < 10;

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-11-02 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a updated https://github.com/llvm/llvm-project/pull/71077 >From 02154cf040c55b0d7bd28a3ffbb76c86ca9b878d Mon Sep 17 00:00:00 2001 From: Bolshakov Date: Thu, 2 Nov 2023 19:20:27 +0300 Subject: [PATCH] [clang] Improve bit-field in ref NTTP diagnostic Prior to this,

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/71077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [OpenMP][OMPIRBuilder] Add support to omp target parallel (PR #67000)

2023-11-02 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert edited https://github.com/llvm/llvm-project/pull/67000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D154396: [clang] Add support for SerenityOS

2023-11-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:31 + Arg *Last = Args.getLastArg(options::OPT_pie, options::OPT_no_pie, + options::OPT_nopie); + return Last ? Last->getOption().matches(options::OPT_pie) : true;

[clang] [OpenMP] Make team reductions less bad (PR #70981)

2023-11-02 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert closed https://github.com/llvm/llvm-project/pull/70981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [llvm] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread David Tellenbach via cfe-commits
dtellenbach wrote: > It should be fixed by > [56e205a](https://github.com/llvm/llvm-project/commit/56e205a89cbb114750f2bd3f5cfbd19e209d018a). Thank you! https://github.com/llvm/llvm-project/pull/70856 ___ cfe-commits mailing list

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-02 Thread Brad King via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList , const ToolChain , return true; } -void tools::addFortranRuntimeLibs(const ToolChain , +void tools::addFortranRuntimeLibs(const ToolChain , const ArgList ,

[clang-tools-extra] [clang] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/71049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

2023-11-02 Thread via cfe-commits
https://github.com/DonatNagyE commented: Basically LGTM, thanks for fixing this crash. I don't give a formal approval because I didn't independently verify the correctness of the details, but I like the direction of the change. https://github.com/llvm/llvm-project/pull/70837

[llvm] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-02 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: I have a similar concern with @arsenm about making the default address space 0. Can't we just use the already existing `PointerType::getUnqual()`, instead of introducing the default address space 0? https://github.com/llvm/llvm-project/pull/71029

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -6018,9 +6018,15 @@ Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, << IndexExpr->getSourceRange()); if ((IndexExpr->getType()->isSpecificBuiltinType(BuiltinType::Char_S) || -

[clang] [clang] Change representation of CurLexerKind (PR #70381)

2023-11-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! It's always great to improve compile-time performance! https://github.com/llvm/llvm-project/pull/70381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -62,3 +62,28 @@ void t10(void) { UnsignedCharTy subscript = 0; int val = array[subscript]; // no warning for unsigned char } + +void t11(void) { + int array[256] = { 0 }; + int val = array['a']; // no warning for char with known positive value +} + +void t12(void) { +

[clang] [clang][analyzer] Add a test case to PR-70792 for Issue-59493 (PR #71073)

2023-11-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/71073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/71049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [compiler-rt] [libc] [llvm] [lldb] [lld] [libcxx] [clang-tools-extra] [clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [lldb] [flang] [IndVars] Add check of loop invariant for trunc instructions (PR #71072)

2023-11-02 Thread Markos Horro via cfe-commits
https://github.com/markoshorro ready_for_review https://github.com/llvm/llvm-project/pull/71072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-02 Thread Brad King via cfe-commits
https://github.com/bradking edited https://github.com/llvm/llvm-project/pull/70833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM but please add NFC back into the patch title so it's more clear why there's no changes to test coverage. Thank you for the cleanup! https://github.com/llvm/llvm-project/pull/71049 ___

[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-02 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/70970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-02 Thread Brad King via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList , const ToolChain , return true; } -void tools::addFortranRuntimeLibs(const ToolChain , +void tools::addFortranRuntimeLibs(const ToolChain , const ArgList ,

[clang] [analyzer][NFC] Add a test case to PR-70792 for Issue-59493 (PR #71073)

2023-11-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/71073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8775947 - [clang][NFC] Refactor `clang::Linkage` (#71049)

2023-11-02 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-02T20:57:29+04:00 New Revision: 8775947633bf189e1847707932b1015f04640ea0 URL: https://github.com/llvm/llvm-project/commit/8775947633bf189e1847707932b1015f04640ea0 DIFF:

[clang] [clang][analyzer] Add a test case to PR-70792 for Issue-59493 (PR #71073)

2023-11-02 Thread Balazs Benics via cfe-commits
@@ -66,3 +66,23 @@ struct Derived : Base { void entry() { Derived test; } } // namespace delegate_ctor_call + +// Additional test case from issue #59493 +namespace init_list_array { + +struct Base { + int foox[1]; steakhal wrote: I'd suggest a more

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,103 @@ +// RUN: %clang_cc1 -Wchar-subscripts -fsyntax-only -verify %s + +void t1(void) { + int array[1] = { 0 }; + char subscript = 0; + int val = array[subscript]; // expected-warning{{array subscript is of type 'char'}} +} + +void t2(void) { + int array[1] = { 0

[clang] 8a3e4b5 - [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (#70349)

2023-11-02 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-02T20:56:39+04:00 New Revision: 8a3e4b5f32e6d333b6fa70aa6c505046ce18630f URL: https://github.com/llvm/llvm-project/commit/8a3e4b5f32e6d333b6fa70aa6c505046ce18630f DIFF:

[llvm] [clang] [DebugMetadata][DwarfDebug] Clone uniqued function-local types after metadata loading (PR #68986)

2023-11-02 Thread Vladislav Dzhidzhoev via cfe-commits
https://github.com/dzhidzhoev closed https://github.com/llvm/llvm-project/pull/68986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

2023-11-02 Thread via cfe-commits
@@ -30,3 +30,24 @@ void test(int i) { clang_analyzer_dump(g4); // expected-warning@-1 {{ [as 64 bit integer]}} } + +struct A { + int n; + void set(int x) { +n = x; + } +}; +using ptr_size = decltype(sizeof(void *)); +void gh_69922(ptr_size p) { + //

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/69061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM from DR testing perspective. https://github.com/llvm/llvm-project/pull/71077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 3b449bd - [DebugMetadata][DwarfDebug] Support function-local types in lexical block scopes (4/7)

2023-11-02 Thread Vladislav Dzhidzhoev via cfe-commits
Author: Vladislav Dzhidzhoev Date: 2023-11-02T17:44:52+01:00 New Revision: 3b449bd46a11a55a40cbc0016a99b202fa05248e URL: https://github.com/llvm/llvm-project/commit/3b449bd46a11a55a40cbc0016a99b202fa05248e DIFF:

[llvm] [clang] [DebugMetadata][DwarfDebug] Clone uniqued function-local types after metadata loading (PR #68986)

2023-11-02 Thread Vladislav Dzhidzhoev via cfe-commits
https://github.com/dzhidzhoev updated https://github.com/llvm/llvm-project/pull/68986 >From 3b449bd46a11a55a40cbc0016a99b202fa05248e Mon Sep 17 00:00:00 2001 From: Vladislav Dzhidzhoev Date: Tue, 18 Jul 2023 14:22:46 +0200 Subject: [PATCH] [DebugMetadata][DwarfDebug] Support function-local

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
@@ -138,7 +138,7 @@ namespace dr1295 { // dr1295: 4 #if __cplusplus <= 201402L // expected-error@-2 {{does not refer to any declaration}} expected-note@-3 {{here}} #else - // expected-error@-4 {{refers to subobject}} + // expected-error@-4 {{bind to bit-field in converted

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andrey Ali Khan Bolshakov (bolshakov-a) Changes Prior to this, attempts to bind a bit-field to an NTTP of reference type produced an error because references to subobjects in NTTPs are disallowed. But C++20 allows references to

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-11-02 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a created https://github.com/llvm/llvm-project/pull/71077 Prior to this, attempts to bind a bit-field to an NTTP of reference type produced an error because references to subobjects in NTTPs are disallowed. But C++20 allows references to subobjects in NTTPs

<    1   2   3   4   5   >