From 00f70bd9337f19972da728185ac5c8410ca21e69 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Thu, 1 Mar 2018 05:43:23 +0000 Subject: Remove redundant casts. NFC So I wrote a clang-tidy check to lint out redundant `isa`, `cast`, and `dyn_cast`s for fun. This is a portion of what it found for clang; I plan to do similar cleanups in LLVM and other subprojects when I find time. Because of the volume of changes, I explicitly avoided making any change that wasn't highly local and obviously correct to me (e.g. we still have a number of foo(cast(baz)) that I didn't touch, since overloading is a thing and the cast did actually change the type -- just up the class hierarchy). I also tried to leave the types we were cast<>ing to somewhere nearby, in cases where it wasn't locally obvious what we were dealing with before. llvm-svn: 326416 --- clang/lib/Sema/SemaObjCProperty.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaObjCProperty.cpp') diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index ea5b1da46f3..3b8ad3d7e11 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -618,7 +618,7 @@ ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, TInfo = Context.getTrivialTypeSourceInfo(T, TLoc); } - DeclContext *DC = cast(CDecl); + DeclContext *DC = CDecl; ObjCPropertyDecl *PDecl = ObjCPropertyDecl::Create(Context, DC, FD.D.getIdentifierLoc(), PropertyId, AtLoc, -- cgit v1.2.3