Make casting 'super' a deprecated warning (instead of a hard error).
This will simplify clang adoption, and is probably better "etiquette" (since gcc has always accepted this idiom without warning). Once we are over the adoption hurdle, we can turn this into an error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68468 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index e836a58..f348f86 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -2500,7 +2500,7 @@
if (CheckVectorCast(TyR, castType, castExpr->getType()))
return true;
} else if (getLangOptions().ObjC1 && isa<ObjCSuperExpr>(castExpr)) {
- return Diag(castExpr->getLocStart(), diag::err_illegal_super_cast) << TyR;
+ Diag(castExpr->getLocStart(), diag::warn_super_cast_deprecated) << TyR;
}
return false;
}