From: Chris Lattner Date: Sun, 30 Sep 2007 08:31:00 +0000 (+0000) Subject: Fix a bug I just introduced. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c0fa3001713e6570632f426af7ac4e20b1d34ff;p=clang Fix a bug I just introduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42479 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp index e0ce057702..cc34463312 100644 --- a/Sema/SemaDecl.cpp +++ b/Sema/SemaDecl.cpp @@ -27,9 +27,9 @@ using namespace clang; Sema::DeclTy *Sema::isTypeName(const IdentifierInfo &II, Scope *S) const { - Decl *IIDecl = II.getFETokenInfo(); - if (isa(IIDecl) || isa(IIDecl)) - return IIDecl; + if (Decl *IIDecl = II.getFETokenInfo()) + if (isa(IIDecl) || isa(IIDecl)) + return IIDecl; return 0; }