aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-03 20:11:42 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-03 20:11:42 +0000
commit6d5a1c28593443f3973ef38f8fa042d59182412d (patch)
tree46e6fccc3752d6a3b82faa450161cdc54adff20e /lib/Sema/SemaExprObjC.cpp
parent22c92406f4b043bd872b53761f6a157fcc105594 (diff)
Revert "Numerous changes to selector handling:", this breaks a whole bunch of
working code, for no apparent reason. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95244 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r--lib/Sema/SemaExprObjC.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index 8ce782b961..85956c3e7e 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -140,20 +140,7 @@ Sema::ExprResult Sema::ParseObjCSelectorExpression(Selector Sel,
Diag(SelLoc, diag::warn_undeclared_selector) << Sel;
QualType Ty = Context.getObjCSelType();
- ObjCSelectorExpr *E =
- new (Context) ObjCSelectorExpr(Ty, Sel, AtLoc, RParenLoc);
- // Make sure that we have seen this selector. There are lots of checks we
- // should be doing on this selector. For example, when this is passed as the
- // second argument to objc_msgSend() on the Mac runtime, or as the selector
- // argument to the -performSelector:. We can do these checks at run time
- // with the GNU runtimes, but the Apple runtimes let you sneak stack
- // corruption in easily by passing the wrong selector to these functions if
- // there is no static checking.
- //
- // Only log a warning on the GNU runtime.
- E->setMethodDecl(LookupInstanceMethodInGlobalPool(Sel,
- SourceRange(LParenLoc, LParenLoc), !LangOpts.NeXTRuntime));
- return E;
+ return new (Context) ObjCSelectorExpr(Ty, Sel, AtLoc, RParenLoc);
}
Sema::ExprResult Sema::ParseObjCProtocolExpression(IdentifierInfo *ProtocolId,