Skip to content

Commit 5fca298

Browse files
committed
Merge remote-tracking branch 'origin/main' into pr/log2sew-bug
2 parents f3c9e15 + 37d0e2f commit 5fca298

File tree

216 files changed

+4953
-3607
lines changed

Some content is hidden

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

216 files changed

+4953
-3607
lines changed

bolt/test/unreadable-profile.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
REQUIRES: system-linux
1+
REQUIRES: system-linux, non-root-user
22

33
RUN: touch %t.profile && chmod 000 %t.profile
44
RUN: %clang %S/Inputs/hello.c -o %t

clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/cplusplus.PureVirtualCall.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. title:: clang-tidy - clang-analyzer-cplusplus.SelfAssignment
2+
.. meta::
3+
:http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-selfassignment
4+
5+
clang-analyzer-cplusplus.SelfAssignment
6+
=======================================
7+
8+
Checks C++ copy and move assignment operators for self assignment.
9+
10+
The `clang-analyzer-cplusplus.SelfAssignment` check is an alias, please see
11+
`Clang Static Analyzer Available Checkers
12+
<https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-stringchecker>`_
13+
for more information.

clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/optin.osx.OSObjectCStyleCast.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/osx.MIG.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/osx.OSObjectRetainCount.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.PutenvStackArray.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
clang-analyzer-security.PutenvStackArray
44
========================================
55

6-
Finds calls to the function 'putenv' which pass a pointer to an automatic
7-
(stack-allocated) array as the argument.
6+
Finds calls to the putenv function which pass a pointer to a stack-allocated
7+
(automatic) array as the argument. Function putenv does not copy the passed
8+
string, only a pointer to the data is stored and this data can be read even by
9+
other threads. Content of a stack-allocated array is likely to be overwritten
10+
after exiting from the function.
811

9-
The clang-analyzer-security.PutenvStackArray check is an alias of
10-
Clang Static Analyzer security.PutenvStackArray.
12+
The `clang-analyzer-security.PutenvStackArray` check is an alias, please see
13+
`Clang Static Analyzer Available Checkers
14+
<https://clang.llvm.org/docs/analyzer/checkers.html#security-putenvstackarray-c>`_
15+
for more information.

clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.SetgidSetuidOrder.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
clang-analyzer-security.SetgidSetuidOrder
44
=========================================
55

6-
Warn on possible reversed order of 'setgid(getgid()))' and 'setuid(getuid())'
7-
(CERT: POS36-C).
6+
The checker checks for sequences of ``setuid(getuid())`` and ``setgid(getgid())``
7+
calls (in this order). If such a sequence is found and there is no other
8+
privilege-changing function call (``seteuid``, ``setreuid``, ``setresuid`` and
9+
the GID versions of these) in between, a warning is generated. The checker finds
10+
only exactly ``setuid(getuid())`` calls (and the GID versions), not for example
11+
if the result of ``getuid()`` is stored in a variable.
812

9-
The clang-analyzer-security.SetgidSetuidOrder check is an alias of
10-
Clang Static Analyzer security.SetgidSetuidOrder.
13+
The `clang-analyzer-security.SetgidSetuidOrder` check is an alias, please see
14+
`Clang Static Analyzer Available Checkers
15+
<https://clang.llvm.org/docs/analyzer/checkers.html#security-setgidsetuidorder-c>`_
16+
for more information.

clang-tools-extra/docs/clang-tidy/checks/list.rst

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ Check aliases
459459
:doc:`clang-analyzer-cplusplus.NewDelete <clang-analyzer/cplusplus.NewDelete>`, `Clang Static Analyzer cplusplus.NewDelete <https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-newdelete>`_,
460460
:doc:`clang-analyzer-cplusplus.NewDeleteLeaks <clang-analyzer/cplusplus.NewDeleteLeaks>`, `Clang Static Analyzer cplusplus.NewDeleteLeaks <https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-newdeleteleaks>`_,
461461
:doc:`clang-analyzer-cplusplus.PlacementNew <clang-analyzer/cplusplus.PlacementNew>`, `Clang Static Analyzer cplusplus.PlacementNew <https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-placementnew>`_,
462-
:doc:`clang-analyzer-cplusplus.PureVirtualCall <clang-analyzer/cplusplus.PureVirtualCall>`, Clang Static Analyzer cplusplus.PureVirtualCall,
462+
:doc:`clang-analyzer-cplusplus.SelfAssignment <clang-analyzer/cplusplus.SelfAssignment>`, `Clang Static Analyzer cplusplus.SelfAssignment <https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-selfassignment>`_,
463463
:doc:`clang-analyzer-cplusplus.StringChecker <clang-analyzer/cplusplus.StringChecker>`, `Clang Static Analyzer cplusplus.StringChecker <https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-stringchecker>`_,
464464
:doc:`clang-analyzer-deadcode.DeadStores <clang-analyzer/deadcode.DeadStores>`, `Clang Static Analyzer deadcode.DeadStores <https://clang.llvm.org/docs/analyzer/checkers.html#deadcode-deadstores>`_,
465465
:doc:`clang-analyzer-fuchsia.HandleChecker <clang-analyzer/fuchsia.HandleChecker>`, `Clang Static Analyzer fuchsia.HandleChecker <https://clang.llvm.org/docs/analyzer/checkers.html#fuchsia-handlechecker>`_,
@@ -472,17 +472,14 @@ Check aliases
472472
:doc:`clang-analyzer-optin.cplusplus.UninitializedObject <clang-analyzer/optin.cplusplus.UninitializedObject>`, `Clang Static Analyzer optin.cplusplus.UninitializedObject <https://clang.llvm.org/docs/analyzer/checkers.html#optin-cplusplus-uninitializedobject>`_,
473473
:doc:`clang-analyzer-optin.cplusplus.VirtualCall <clang-analyzer/optin.cplusplus.VirtualCall>`, `Clang Static Analyzer optin.cplusplus.VirtualCall <https://clang.llvm.org/docs/analyzer/checkers.html#optin-cplusplus-virtualcall>`_,
474474
:doc:`clang-analyzer-optin.mpi.MPI-Checker <clang-analyzer/optin.mpi.MPI-Checker>`, `Clang Static Analyzer optin.mpi.MPI-Checker <https://clang.llvm.org/docs/analyzer/checkers.html#optin-mpi-mpi-checker>`_,
475-
:doc:`clang-analyzer-optin.osx.OSObjectCStyleCast <clang-analyzer/optin.osx.OSObjectCStyleCast>`, Clang Static Analyzer optin.osx.OSObjectCStyleCast,
476475
:doc:`clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker <clang-analyzer/optin.osx.cocoa.localizability.EmptyLocalizationContextChecker>`, `Clang Static Analyzer optin.osx.cocoa.localizability.EmptyLocalizationContextChecker <https://clang.llvm.org/docs/analyzer/checkers.html#optin-osx-cocoa-localizability-emptylocalizationcontextchecker>`_,
477476
:doc:`clang-analyzer-optin.osx.cocoa.localizability.NonLocalizedStringChecker <clang-analyzer/optin.osx.cocoa.localizability.NonLocalizedStringChecker>`, `Clang Static Analyzer optin.osx.cocoa.localizability.NonLocalizedStringChecker <https://clang.llvm.org/docs/analyzer/checkers.html#optin-osx-cocoa-localizability-nonlocalizedstringchecker>`_,
478477
:doc:`clang-analyzer-optin.performance.GCDAntipattern <clang-analyzer/optin.performance.GCDAntipattern>`, `Clang Static Analyzer optin.performance.GCDAntipattern <https://clang.llvm.org/docs/analyzer/checkers.html#optin-performance-gcdantipattern>`_,
479478
:doc:`clang-analyzer-optin.performance.Padding <clang-analyzer/optin.performance.Padding>`, `Clang Static Analyzer optin.performance.Padding <https://clang.llvm.org/docs/analyzer/checkers.html#optin-performance-padding>`_,
480479
:doc:`clang-analyzer-optin.portability.UnixAPI <clang-analyzer/optin.portability.UnixAPI>`, `Clang Static Analyzer optin.portability.UnixAPI <https://clang.llvm.org/docs/analyzer/checkers.html#optin-portability-unixapi>`_,
481480
:doc:`clang-analyzer-optin.taint.TaintedAlloc <clang-analyzer/optin.taint.TaintedAlloc>`, `Clang Static Analyzer optin.taint.TaintedAlloc <https://clang.llvm.org/docs/analyzer/checkers.html#optin-taint-taintedalloc>`_,
482481
:doc:`clang-analyzer-osx.API <clang-analyzer/osx.API>`, `Clang Static Analyzer osx.API <https://clang.llvm.org/docs/analyzer/checkers.html#osx-api>`_,
483-
:doc:`clang-analyzer-osx.MIG <clang-analyzer/osx.MIG>`, Clang Static Analyzer osx.MIG,
484482
:doc:`clang-analyzer-osx.NumberObjectConversion <clang-analyzer/osx.NumberObjectConversion>`, `Clang Static Analyzer osx.NumberObjectConversion <https://clang.llvm.org/docs/analyzer/checkers.html#osx-numberobjectconversion>`_,
485-
:doc:`clang-analyzer-osx.OSObjectRetainCount <clang-analyzer/osx.OSObjectRetainCount>`, Clang Static Analyzer osx.OSObjectRetainCount,
486483
:doc:`clang-analyzer-osx.ObjCProperty <clang-analyzer/osx.ObjCProperty>`, `Clang Static Analyzer osx.ObjCProperty <https://clang.llvm.org/docs/analyzer/checkers.html#osx-objcproperty>`_,
487484
:doc:`clang-analyzer-osx.SecKeychainAPI <clang-analyzer/osx.SecKeychainAPI>`, `Clang Static Analyzer osx.SecKeychainAPI <https://clang.llvm.org/docs/analyzer/checkers.html#osx-seckeychainapi>`_,
488485
:doc:`clang-analyzer-osx.cocoa.AtSync <clang-analyzer/osx.cocoa.AtSync>`, `Clang Static Analyzer osx.cocoa.AtSync <https://clang.llvm.org/docs/analyzer/checkers.html#osx-cocoa-atsync>`_,
@@ -509,15 +506,14 @@ Check aliases
509506
:doc:`clang-analyzer-osx.coreFoundation.containers.OutOfBounds <clang-analyzer/osx.coreFoundation.containers.OutOfBounds>`, `Clang Static Analyzer osx.coreFoundation.containers.OutOfBounds <https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-containers-outofbounds>`_,
510507
:doc:`clang-analyzer-osx.coreFoundation.containers.PointerSizedValues <clang-analyzer/osx.coreFoundation.containers.PointerSizedValues>`, `Clang Static Analyzer osx.coreFoundation.containers.PointerSizedValues <https://clang.llvm.org/docs/analyzer/checkers.html#osx-corefoundation-containers-pointersizedvalues>`_,
511508
:doc:`clang-analyzer-security.FloatLoopCounter <clang-analyzer/security.FloatLoopCounter>`, `Clang Static Analyzer security.FloatLoopCounter <https://clang.llvm.org/docs/analyzer/checkers.html#security-floatloopcounter>`_,
512-
:doc:`clang-analyzer-security.PutenvStackArray <clang-analyzer/security.PutenvStackArray>`, Clang Static Analyzer security.PutenvStackArray,
513-
:doc:`clang-analyzer-security.SetgidSetuidOrder <clang-analyzer/security.SetgidSetuidOrder>`, Clang Static Analyzer security.SetgidSetuidOrder,
509+
:doc:`clang-analyzer-security.PutenvStackArray <clang-analyzer/security.PutenvStackArray>`, `Clang Static Analyzer security.PutenvStackArray <https://clang.llvm.org/docs/analyzer/checkers.html#security-putenvstackarray-c>`_,
510+
:doc:`clang-analyzer-security.SetgidSetuidOrder <clang-analyzer/security.SetgidSetuidOrder>`, `Clang Static Analyzer security.SetgidSetuidOrder <https://clang.llvm.org/docs/analyzer/checkers.html#security-setgidsetuidorder-c>`_,
514511
:doc:`clang-analyzer-security.cert.env.InvalidPtr <clang-analyzer/security.cert.env.InvalidPtr>`, `Clang Static Analyzer security.cert.env.InvalidPtr <https://clang.llvm.org/docs/analyzer/checkers.html#security-cert-env-invalidptr>`_,
515512
:doc:`clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling <clang-analyzer/security.insecureAPI.DeprecatedOrUnsafeBufferHandling>`, `Clang Static Analyzer security.insecureAPI.DeprecatedOrUnsafeBufferHandling <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-deprecatedorunsafebufferhandling>`_,
516513
:doc:`clang-analyzer-security.insecureAPI.UncheckedReturn <clang-analyzer/security.insecureAPI.UncheckedReturn>`, `Clang Static Analyzer security.insecureAPI.UncheckedReturn <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-uncheckedreturn>`_,
517514
:doc:`clang-analyzer-security.insecureAPI.bcmp <clang-analyzer/security.insecureAPI.bcmp>`, `Clang Static Analyzer security.insecureAPI.bcmp <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bcmp>`_,
518515
:doc:`clang-analyzer-security.insecureAPI.bcopy <clang-analyzer/security.insecureAPI.bcopy>`, `Clang Static Analyzer security.insecureAPI.bcopy <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bcopy>`_,
519516
:doc:`clang-analyzer-security.insecureAPI.bzero <clang-analyzer/security.insecureAPI.bzero>`, `Clang Static Analyzer security.insecureAPI.bzero <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bzero>`_,
520-
:doc:`clang-analyzer-security.insecureAPI.decodeValueOfObjCType <clang-analyzer/security.insecureAPI.decodeValueOfObjCType>`, Clang Static Analyzer security.insecureAPI.decodeValueOfObjCType,
521517
:doc:`clang-analyzer-security.insecureAPI.getpw <clang-analyzer/security.insecureAPI.getpw>`, `Clang Static Analyzer security.insecureAPI.getpw <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-getpw>`_,
522518
:doc:`clang-analyzer-security.insecureAPI.gets <clang-analyzer/security.insecureAPI.gets>`, `Clang Static Analyzer security.insecureAPI.gets <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-gets>`_,
523519
:doc:`clang-analyzer-security.insecureAPI.mkstemp <clang-analyzer/security.insecureAPI.mkstemp>`, `Clang Static Analyzer security.insecureAPI.mkstemp <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-mkstemp>`_,
@@ -536,9 +532,6 @@ Check aliases
536532
:doc:`clang-analyzer-unix.Vfork <clang-analyzer/unix.Vfork>`, `Clang Static Analyzer unix.Vfork <https://clang.llvm.org/docs/analyzer/checkers.html#unix-vfork>`_,
537533
:doc:`clang-analyzer-unix.cstring.BadSizeArg <clang-analyzer/unix.cstring.BadSizeArg>`, `Clang Static Analyzer unix.cstring.BadSizeArg <https://clang.llvm.org/docs/analyzer/checkers.html#unix-cstring-badsizearg>`_,
538534
:doc:`clang-analyzer-unix.cstring.NullArg <clang-analyzer/unix.cstring.NullArg>`, `Clang Static Analyzer unix.cstring.NullArg <https://clang.llvm.org/docs/analyzer/checkers.html#unix-cstring-nullarg>`_,
539-
:doc:`clang-analyzer-valist.CopyToSelf <clang-analyzer/valist.CopyToSelf>`, Clang Static Analyzer valist.CopyToSelf,
540-
:doc:`clang-analyzer-valist.Uninitialized <clang-analyzer/valist.Uninitialized>`, Clang Static Analyzer valist.Uninitialized,
541-
:doc:`clang-analyzer-valist.Unterminated <clang-analyzer/valist.Unterminated>`, Clang Static Analyzer valist.Unterminated,
542535
:doc:`clang-analyzer-webkit.NoUncountedMemberChecker <clang-analyzer/webkit.NoUncountedMemberChecker>`, `Clang Static Analyzer webkit.NoUncountedMemberChecker <https://clang.llvm.org/docs/analyzer/checkers.html#webkit-nouncountedmemberchecker>`_,
543536
:doc:`clang-analyzer-webkit.RefCntblBaseVirtualDtor <clang-analyzer/webkit.RefCntblBaseVirtualDtor>`, `Clang Static Analyzer webkit.RefCntblBaseVirtualDtor <https://clang.llvm.org/docs/analyzer/checkers.html#webkit-refcntblbasevirtualdtor>`_,
544537
:doc:`clang-analyzer-webkit.UncountedLambdaCapturesChecker <clang-analyzer/webkit.UncountedLambdaCapturesChecker>`, `Clang Static Analyzer webkit.UncountedLambdaCapturesChecker <https://clang.llvm.org/docs/analyzer/checkers.html#webkit-uncountedlambdacaptureschecker>`_,

clang/docs/LanguageExtensions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5551,7 +5551,7 @@ The ``#pragma clang section`` directive obeys the following rules:
55515551
* Global variables that are initialized to zero will be placed in the named
55525552
bss section, if one is present.
55535553
5554-
* The ``#pragma clang section`` directive does not does try to infer section-kind
5554+
* The ``#pragma clang section`` directive does not try to infer section-kind
55555555
from the name. For example, naming a section "``.bss.mySec``" does NOT mean
55565556
it will be a bss section name.
55575557

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,8 @@ Improvements to Clang's diagnostics
614614

615615
- Clang now diagnoses ``[[deprecated]]`` attribute usage on local variables (#GH90073).
616616

617+
- Fix false positives when `[[gsl::Owner/Pointer]]` and `[[clang::lifetimebound]]` are used together.
618+
617619
- Improved diagnostic message for ``__builtin_bit_cast`` size mismatch (#GH115870).
618620

619621
- Clang now omits shadow warnings for enum constants in separate class scopes (#GH62588).

clang/include/clang/Basic/FileEntry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class FileEntryRef {
6868
StringRef getNameAsRequested() const { return ME->first(); }
6969

7070
const FileEntry &getFileEntry() const {
71-
return *getBaseMapEntry().second->V.get<FileEntry *>();
71+
return *cast<FileEntry *>(getBaseMapEntry().second->V);
7272
}
7373

7474
// This function is used if the buffer size needs to be increased
@@ -361,7 +361,7 @@ bool FileEntryRef::isNamedPipe() const { return getFileEntry().isNamedPipe(); }
361361
void FileEntryRef::closeFile() const { getFileEntry().closeFile(); }
362362

363363
void FileEntryRef::updateFileEntryBufferSize(unsigned BufferSize) {
364-
getBaseMapEntry().second->V.get<FileEntry *>()->setSize(BufferSize);
364+
cast<FileEntry *>(getBaseMapEntry().second->V)->setSize(BufferSize);
365365
}
366366

367367
} // end namespace clang

clang/include/clang/Basic/IdentifierTable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,15 +1012,15 @@ class Selector {
10121012
}
10131013

10141014
MultiKeywordSelector *getMultiKeywordSelector() const {
1015-
return InfoPtr.getPointer().get<MultiKeywordSelector *>();
1015+
return cast<MultiKeywordSelector *>(InfoPtr.getPointer());
10161016
}
10171017

10181018
unsigned getIdentifierInfoFlag() const {
10191019
unsigned new_flags = InfoPtr.getInt();
10201020
// IMPORTANT NOTE: We have to reconstitute this data rather than use the
10211021
// value directly from the PointerIntPair. See the comments in `InfoPtr`
10221022
// for more details.
1023-
if (InfoPtr.getPointer().is<MultiKeywordSelector *>())
1023+
if (isa<MultiKeywordSelector *>(InfoPtr.getPointer()))
10241024
new_flags |= MultiArg;
10251025
return new_flags;
10261026
}

clang/include/clang/Sema/ParsedAttr.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -392,19 +392,17 @@ class ParsedAttr final
392392
}
393393

394394
bool isArgExpr(unsigned Arg) const {
395-
return Arg < NumArgs && getArg(Arg).is<Expr*>();
395+
return Arg < NumArgs && isa<Expr *>(getArg(Arg));
396396
}
397397

398-
Expr *getArgAsExpr(unsigned Arg) const {
399-
return getArg(Arg).get<Expr*>();
400-
}
398+
Expr *getArgAsExpr(unsigned Arg) const { return cast<Expr *>(getArg(Arg)); }
401399

402400
bool isArgIdent(unsigned Arg) const {
403-
return Arg < NumArgs && getArg(Arg).is<IdentifierLoc*>();
401+
return Arg < NumArgs && isa<IdentifierLoc *>(getArg(Arg));
404402
}
405403

406404
IdentifierLoc *getArgAsIdent(unsigned Arg) const {
407-
return getArg(Arg).get<IdentifierLoc*>();
405+
return cast<IdentifierLoc *>(getArg(Arg));
408406
}
409407

410408
const AvailabilityChange &getAvailabilityIntroduced() const {

clang/include/clang/Sema/SemaConcept.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,17 +210,17 @@ bool subsumes(const NormalForm &PDNF, const NormalForm &QCNF,
210210
bool Found = false;
211211
for (NormalFormConstraint Pia : Pi) {
212212
for (NormalFormConstraint Qjb : Qj) {
213-
if (Pia.is<FoldExpandedConstraint *>() &&
214-
Qjb.is<FoldExpandedConstraint *>()) {
215-
if (Pia.get<FoldExpandedConstraint *>()->subsumes(
216-
*Qjb.get<FoldExpandedConstraint *>(), E)) {
213+
if (isa<FoldExpandedConstraint *>(Pia) &&
214+
isa<FoldExpandedConstraint *>(Qjb)) {
215+
if (cast<FoldExpandedConstraint *>(Pia)->subsumes(
216+
*cast<FoldExpandedConstraint *>(Qjb), E)) {
217217
Found = true;
218218
break;
219219
}
220-
} else if (Pia.is<AtomicConstraint *>() &&
221-
Qjb.is<AtomicConstraint *>()) {
222-
if (E(*Pia.get<AtomicConstraint *>(),
223-
*Qjb.get<AtomicConstraint *>())) {
220+
} else if (isa<AtomicConstraint *>(Pia) &&
221+
isa<AtomicConstraint *>(Qjb)) {
222+
if (E(*cast<AtomicConstraint *>(Pia),
223+
*cast<AtomicConstraint *>(Qjb))) {
224224
Found = true;
225225
break;
226226
}

clang/include/clang/Sema/SemaInternal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ getDepthAndIndex(UnexpandedParameterPack UPP) {
7575
if (const auto *TTP = UPP.first.dyn_cast<const TemplateTypeParmType *>())
7676
return std::make_pair(TTP->getDepth(), TTP->getIndex());
7777

78-
return getDepthAndIndex(UPP.first.get<NamedDecl *>());
78+
return getDepthAndIndex(cast<NamedDecl *>(UPP.first));
7979
}
8080

8181
class TypoCorrectionConsumer : public VisibleDeclConsumer {

0 commit comments

Comments
 (0)