]> granicus.if.org Git - clang/commitdiff
In general, don't look through explicit casts when trying
authorJohn McCall <rjmccall@apple.com>
Tue, 13 Sep 2011 23:08:34 +0000 (23:08 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 13 Sep 2011 23:08:34 +0000 (23:08 +0000)
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

lib/AST/Expr.cpp

index 1168874a889d782e35e458ab00e02f801e400182..8beecc0856cf8b4e3d696b5ae9236bd85a130fc1 100644 (file)
@@ -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<SubstNonTypeTemplateParmExpr>(CEE)) {