projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01f63b9
)
Check if an IdentifierInfo* is null when the FunctionDecl isn't a simple C function.
author
Ted Kremenek
<kremenek@apple.com>
Tue, 2 Oct 2012 04:36:54 +0000
(
04:36
+0000)
committer
Ted Kremenek
<kremenek@apple.com>
Tue, 2 Oct 2012 04:36:54 +0000
(
04:36
+0000)
Fixes <rdar://problem/
12355298
>
llvm-svn: 164988
clang/lib/Sema/SemaChecking.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Sema/SemaChecking.cpp
b/clang/lib/Sema/SemaChecking.cpp
index
7498d34
..
81be8bf
100644
(file)
--- a/
clang/lib/Sema/SemaChecking.cpp
+++ b/
clang/lib/Sema/SemaChecking.cpp
@@
-5510,8
+5510,12
@@
static Expr *findCapturingExpr(Sema &S, Expr *e, RetainCycleOwner &owner) {
} else if (CallExpr *CE = dyn_cast<CallExpr>(e)) {
if (CE->getNumArgs() == 1) {
FunctionDecl *Fn = dyn_cast_or_null<FunctionDecl>(CE->getCalleeDecl());
- if (Fn && Fn->getIdentifier()->isStr("_Block_copy"))
- e = CE->getArg(0)->IgnoreParenCasts();
+ if (Fn) {
+ const IdentifierInfo *FnI = Fn->getIdentifier();
+ if (FnI && FnI->isStr("_Block_copy")) {
+ e = CE->getArg(0)->IgnoreParenCasts();
+ }
+ }
}
}