]> granicus.if.org Git - clang/commitdiff
Fix a bug I just introduced.
authorChris Lattner <sabre@nondot.org>
Sun, 30 Sep 2007 08:31:00 +0000 (08:31 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 30 Sep 2007 08:31:00 +0000 (08:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42479 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaDecl.cpp

index e0ce05770265d68c3ddaa0986adfbe050ae4c08b..cc344633123793e3af8a9f2c014305e5168c1e60 100644 (file)
@@ -27,9 +27,9 @@
 using namespace clang;
 
 Sema::DeclTy *Sema::isTypeName(const IdentifierInfo &II, Scope *S) const {
-  Decl *IIDecl = II.getFETokenInfo<Decl>();
-  if (isa<TypedefDecl>(IIDecl) || isa<ObjcInterfaceDecl>(IIDecl))
-    return IIDecl;
+  if (Decl *IIDecl = II.getFETokenInfo<Decl>())
+    if (isa<TypedefDecl>(IIDecl) || isa<ObjcInterfaceDecl>(IIDecl))
+      return IIDecl;
   return 0;
 }