Skip to content

Commit f09a6f6

Browse files
[Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#124447)
Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with // isa<T>, cast<T> and the llvm::dyn_cast<T> Literal migration would result in dyn_cast_if_present (see the definition of PointerUnion::dyn_cast), but this patch uses dyn_cast because we expect AnyFunc to be nonnull.
1 parent ab895ad commit f09a6f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaAPINotes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ static void ProcessAPINotes(Sema &S, FunctionOrMethod AnyFunc,
478478
const api_notes::FunctionInfo &Info,
479479
VersionedInfoMetadata Metadata) {
480480
// Find the declaration itself.
481-
FunctionDecl *FD = AnyFunc.dyn_cast<FunctionDecl *>();
481+
FunctionDecl *FD = dyn_cast<FunctionDecl *>(AnyFunc);
482482
Decl *D = FD;
483483
ObjCMethodDecl *MD = nullptr;
484484
if (!D) {

0 commit comments

Comments
 (0)