diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-26 03:35:45 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-26 03:35:45 +0000 |
commit | efa42f7d88a33c0c00e571fbcba8032a9baf7088 (patch) | |
tree | 509c22743508dbff37d0e88f4b417241d2713afc /lib | |
parent | e6d11b75f68980645fa695b56dc24487ecf13c32 (diff) |
Don't look through casts when looking for the underlying decl for a function
call; the standard doesn't expect us to, and the program could be doing
something crazy. Fixes PR5882.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 3df5b00cda..6438faea0a 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -3373,7 +3373,7 @@ Sema::ActOnCallExpr(Scope *S, ExprArg fn, SourceLocation LParenLoc, // Also, in C++, keep track of whether we should perform argument-dependent // lookup and whether there were any explicitly-specified template arguments. - Expr *NakedFn = Fn->IgnoreParenCasts(); + Expr *NakedFn = Fn->IgnoreParens(); if (isa<UnresolvedLookupExpr>(NakedFn)) { UnresolvedLookupExpr *ULE = cast<UnresolvedLookupExpr>(NakedFn); return BuildOverloadedCallExpr(Fn, ULE, LParenLoc, Args, NumArgs, |