diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-10-25 20:48:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-10-25 20:48:33 +0000 |
commit | d8f0ade43ee3f9d13d2d98b7a3d07468c2b4096e (patch) | |
tree | 570f01dab0c3edfe3856855bb88cfed2485b2ae8 /lib | |
parent | 4654241866c91fa312d7b26d5eb4afd070b5c602 (diff) |
Look through the address-of operator to find the function being
called. Fixes another aspect of PR8314.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 793dc42759..e329ada932 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -3769,6 +3769,10 @@ Sema::ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, } NamedDecl *NDecl = 0; + if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(NakedFn)) + if (UnOp->getOpcode() == UO_AddrOf) + NakedFn = UnOp->getSubExpr()->IgnoreParens(); + if (isa<DeclRefExpr>(NakedFn)) NDecl = cast<DeclRefExpr>(NakedFn)->getDecl(); |