From: John McCall Date: Tue, 13 Sep 2011 23:08:34 +0000 (+0000) Subject: In general, don't look through explicit casts when trying X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8683d6d389def2fce229325435ba3c2b3f75492;p=clang In general, don't look through explicit casts when trying to find the called declaration. Explicit casts can radically change the semantics of a call, and it's no longer really a builtin call any more than it would be a builtin call if you stored the function pointer into a variable and called that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139659 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 1168874a88..8beecc0856 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -770,7 +770,7 @@ CallExpr::CallExpr(ASTContext &C, StmtClass SC, unsigned NumPreArgs, } Decl *CallExpr::getCalleeDecl() { - Expr *CEE = getCallee()->IgnoreParenCasts(); + Expr *CEE = getCallee()->IgnoreParenImpCasts(); while (SubstNonTypeTemplateParmExpr *NTTP = dyn_cast(CEE)) {