Skip to content

Commit da71e77

Browse files
authored
Merge branch 'main' into disable-unavailable-builtin-tests
2 parents 7e03b1d + dbc96f4 commit da71e77

File tree

306 files changed

+5122
-2476
lines changed

Some content is hidden

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

306 files changed

+5122
-2476
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

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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ and their implementation status. Please post on the
359359
information or if you want to help with the
360360
implementation.
361361

362+
362363
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
363364
|Feature | C/C++ Status | Fortran Status | Reviews |
364365
+=============================================================+===========================+===========================+==========================================================================+
@@ -405,6 +406,7 @@ implementation.
405406
| dispatch construct extension to support end directive | :none:`N/A` | :none:`unclaimed` | |
406407
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
407408

409+
408410
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
409411
|OpenMP 5.2 Deprecations | C/C++ Status | Fortran Status | Reviews |
410412
+=============================================================+===========================+===========================+==========================================================================+
@@ -444,6 +446,7 @@ and their implementation status. Please post on the
444446
information or if you want to help with the
445447
implementation.
446448

449+
447450
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
448451
|Feature | C/C++ Status | Fortran Status | Reviews |
449452
+=============================================================+===========================+===========================+==========================================================================+
@@ -580,7 +583,8 @@ implementation.
580583
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
581584
| Changes to omp_target_is_accessible | :part:`In Progress` | :part:`In Progress` | |
582585
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
583-
586+
| defaultmap implicit-behavior 'storage' | :good:`done` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/158336 |
587+
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
584588

585589
.. _OpenMP 6.1 implementation details:
586590

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/CGHLSLBuiltins.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,12 +604,12 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
604604
Value *OpTrue =
605605
RValTrue.isScalar()
606606
? RValTrue.getScalarVal()
607-
: RValTrue.getAggregatePointer(E->getArg(1)->getType(), *this);
607+
: Builder.CreateLoad(RValTrue.getAggregateAddress(), "true_val");
608608
RValue RValFalse = EmitAnyExpr(E->getArg(2));
609609
Value *OpFalse =
610610
RValFalse.isScalar()
611611
? RValFalse.getScalarVal()
612-
: RValFalse.getAggregatePointer(E->getArg(2)->getType(), *this);
612+
: Builder.CreateLoad(RValFalse.getAggregateAddress(), "false_val");
613613
if (auto *VTy = E->getType()->getAs<VectorType>()) {
614614
if (!OpTrue->getType()->isVectorTy())
615615
OpTrue =

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4393,6 +4393,13 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T,
43934393
// object file generation and no IR generation, -gN should not be needed. So
43944394
// allow -gsplit-dwarf with either -gN or IR input.
43954395
if (IRInput || Args.hasArg(options::OPT_g_Group)) {
4396+
// FIXME: -gsplit-dwarf on AIX is currently unimplemented.
4397+
if (TC.getTriple().isOSAIX() && Args.hasArg(options::OPT_gsplit_dwarf)) {
4398+
D.Diag(diag::err_drv_unsupported_opt_for_target)
4399+
<< Args.getLastArg(options::OPT_gsplit_dwarf)->getSpelling()
4400+
<< TC.getTriple().str();
4401+
return;
4402+
}
43964403
Arg *SplitDWARFArg;
43974404
DwarfFission = getDebugFissionKind(D, Args, SplitDWARFArg);
43984405
if (DwarfFission != DwarfFissionKind::None &&

clang/lib/Frontend/CompilerInstance.cpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -271,19 +271,12 @@ static void collectIncludePCH(CompilerInstance &CI,
271271

272272
static void collectVFSEntries(CompilerInstance &CI,
273273
std::shared_ptr<ModuleDependencyCollector> MDC) {
274-
if (CI.getHeaderSearchOpts().VFSOverlayFiles.empty())
275-
return;
276-
277274
// Collect all VFS found.
278275
SmallVector<llvm::vfs::YAMLVFSEntry, 16> VFSEntries;
279-
for (const std::string &VFSFile : CI.getHeaderSearchOpts().VFSOverlayFiles) {
280-
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Buffer =
281-
llvm::MemoryBuffer::getFile(VFSFile);
282-
if (!Buffer)
283-
return;
284-
llvm::vfs::collectVFSFromYAML(std::move(Buffer.get()),
285-
/*DiagHandler*/ nullptr, VFSFile, VFSEntries);
286-
}
276+
CI.getVirtualFileSystem().visit([&](llvm::vfs::FileSystem &VFS) {
277+
if (auto *RedirectingVFS = dyn_cast<llvm::vfs::RedirectingFileSystem>(&VFS))
278+
llvm::vfs::collectVFSEntries(*RedirectingVFS, VFSEntries);
279+
});
287280

288281
for (auto &E : VFSEntries)
289282
MDC->addFile(E.VPath, E.RPath);

0 commit comments

Comments
 (0)