Skip to content

Commit 3c37c40

Browse files
authored
Merge branch 'main' into implicit
2 parents 0e42858 + 6512bf0 commit 3c37c40

File tree

282 files changed

+4613
-2350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+4613
-2350
lines changed

.github/workflows/gha-codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
branches:
99
- main
10+
paths:
11+
- '.github/**'
1012
schedule:
1113
- cron: '30 0 * * *'
1214

.github/workflows/libclang-abi-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ jobs:
113113
./configure
114114
sudo make install
115115
- name: Download source code
116-
uses: llvm/actions/get-llvm-project-src@main
116+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
117117
with:
118118
ref: ${{ matrix.ref }}
119-
repo: ${{ matrix.repo }}
119+
repository: ${{ matrix.repo }}
120120
- name: Configure
121121
run: |
122122
mkdir install

.github/workflows/llvm-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ jobs:
101101
./configure
102102
sudo make install
103103
- name: Download source code
104-
uses: llvm/actions/get-llvm-project-src@main
104+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
105105
with:
106106
ref: ${{ matrix.ref }}
107-
repo: ${{ matrix.repo }}
107+
repository: ${{ matrix.repo }}
108108
- name: Configure
109109
run: |
110110
mkdir install

clang-tools-extra/test/clang-tidy/checkers/bugprone/easily-swappable-parameters-implicits.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-easily-swappable-parameters %t \
1+
// RUN: %check_clang_tidy %s --extra-arg=-Wno-error=incompatible-pointer-types bugprone-easily-swappable-parameters %t \
22
// RUN: -config='{CheckOptions: { \
33
// RUN: bugprone-easily-swappable-parameters.MinimumLength: 2, \
44
// RUN: bugprone-easily-swappable-parameters.IgnoredParameterNames: "", \

clang/docs/OpenMPSupport.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,8 @@ implementation.
580580
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
581581
| Changes to omp_target_is_accessible | :part:`In Progress` | :part:`In Progress` | |
582582
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
583-
583+
| defaultmap implicit-behavior 'storage' | :good:`done` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/158336 |
584+
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
584585

585586
.. _OpenMP 6.1 implementation details:
586587

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ C/C++ Language Potentially Breaking Changes
5858

5959
- The ``__has_builtin`` function now only considers the currently active target when being used with target offloading.
6060

61+
- The ``-Wincompatible-pointer-types`` diagnostic now defaults to an error;
62+
it can still be downgraded to a warning by passing ``-Wno-error=incompatible-pointer-types``. (#GH74605)
63+
6164
C++ Specific Potentially Breaking Changes
6265
-----------------------------------------
6366
- For C++20 modules, the Reduced BMI mode will be the default option. This may introduce
@@ -529,6 +532,7 @@ OpenMP Support
529532
- Fixed non-contiguous strided update in the ``omp target update`` directive with the ``from`` clause.
530533
- Properly handle array section/assumed-size array privatization in C/C++.
531534
- Added support for ``variable-category`` modifier in ``default clause``.
535+
- Added support for ``defaultmap`` directive implicit-behavior ``storage``.
532536

533537
Improvements
534538
^^^^^^^^^^^^

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9048,7 +9048,7 @@ def ext_typecheck_convert_incompatible_pointer : ExtWarn<
90489048
"; take the address with &|"
90499049
"; remove *|"
90509050
"; remove &}3">,
9051-
InGroup<IncompatiblePointerTypes>;
9051+
InGroup<IncompatiblePointerTypes>, DefaultError;
90529052
def err_typecheck_convert_incompatible_pointer : Error<
90539053
"incompatible pointer types "
90549054
"%select{%diff{assigning to $ from $|assigning to different types}0,1"

clang/include/clang/Basic/OpenMPKinds.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ OPENMP_DEFAULTMAP_MODIFIER(firstprivate)
137137
OPENMP_DEFAULTMAP_MODIFIER(none)
138138
OPENMP_DEFAULTMAP_MODIFIER(default)
139139
OPENMP_DEFAULTMAP_MODIFIER(present)
140+
OPENMP_DEFAULTMAP_MODIFIER(storage)
140141

141142
// Static attributes for 'depend' clause.
142143
OPENMP_DEPEND_KIND(in)

clang/lib/Basic/OpenMPKinds.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,18 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, StringRef Str,
110110
#define OPENMP_DIST_SCHEDULE_KIND(Name) .Case(#Name, OMPC_DIST_SCHEDULE_##Name)
111111
#include "clang/Basic/OpenMPKinds.def"
112112
.Default(OMPC_DIST_SCHEDULE_unknown);
113-
case OMPC_defaultmap:
114-
return llvm::StringSwitch<unsigned>(Str)
113+
case OMPC_defaultmap: {
114+
unsigned Type = llvm::StringSwitch<unsigned>(Str)
115115
#define OPENMP_DEFAULTMAP_KIND(Name) \
116116
.Case(#Name, static_cast<unsigned>(OMPC_DEFAULTMAP_##Name))
117117
#define OPENMP_DEFAULTMAP_MODIFIER(Name) \
118118
.Case(#Name, static_cast<unsigned>(OMPC_DEFAULTMAP_MODIFIER_##Name))
119119
#include "clang/Basic/OpenMPKinds.def"
120-
.Default(OMPC_DEFAULTMAP_unknown);
120+
.Default(OMPC_DEFAULTMAP_unknown);
121+
if (LangOpts.OpenMP < 60 && Type == OMPC_DEFAULTMAP_MODIFIER_storage)
122+
return OMPC_DEFAULTMAP_MODIFIER_unknown;
123+
return Type;
124+
}
121125
case OMPC_atomic_default_mem_order:
122126
return llvm::StringSwitch<OpenMPAtomicDefaultMemOrderClauseKind>(Str)
123127
#define OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(Name) \

clang/lib/CodeGen/CGOpenMPRuntime.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,12 +1037,15 @@ CGOpenMPRuntime::CGOpenMPRuntime(CodeGenModule &CGM)
10371037
CGM.getLangOpts().OpenMPOffloadMandatory,
10381038
/*HasRequiresReverseOffload*/ false, /*HasRequiresUnifiedAddress*/ false,
10391039
hasRequiresUnifiedSharedMemory(), /*HasRequiresDynamicAllocators*/ false);
1040+
Config.setDefaultTargetAS(
1041+
CGM.getContext().getTargetInfo().getTargetAddressSpace(LangAS::Default));
1042+
1043+
OMPBuilder.setConfig(Config);
10401044
OMPBuilder.initialize();
10411045
OMPBuilder.loadOffloadInfoMetadata(*CGM.getFileSystem(),
10421046
CGM.getLangOpts().OpenMPIsTargetDevice
10431047
? CGM.getLangOpts().OMPHostIRFile
10441048
: StringRef{});
1045-
OMPBuilder.setConfig(Config);
10461049

10471050
// The user forces the compiler to behave as if omp requires
10481051
// unified_shared_memory was given.

0 commit comments

Comments
 (0)