]> granicus.if.org Git - clang/commitdiff
Add a missing 'else'. Found by grep '} if'
authorDmitri Gribenko <gribozavr@gmail.com>
Wed, 19 Dec 2012 17:29:30 +0000 (17:29 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Wed, 19 Dec 2012 17:29:30 +0000 (17:29 +0000)
No testcase because this did not affect correctness: a declaration can only be
ClassTemplateDecl or a FunctionTemplateDecl, not both.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170565 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/IndexingContext.cpp

index 8f7102911e1fb4668ca1afa6d1845f9d73894d99..3a73aee59f00b4bc3b9b94f03d6657ac765ebc2d 100644 (file)
@@ -827,7 +827,7 @@ IndexingContext::getEntityContainer(const Decl *D) const {
 
   if (const ClassTemplateDecl *ClassTempl = dyn_cast<ClassTemplateDecl>(D)) {
     DC = ClassTempl->getTemplatedDecl();
-  } if (const FunctionTemplateDecl *
+  } else if (const FunctionTemplateDecl *
           FuncTempl = dyn_cast<FunctionTemplateDecl>(D)) {
     DC = FuncTempl->getTemplatedDecl();
   }