]> granicus.if.org Git - clang/commitdiff
CommentSema: simplify functions, per Jordan's comment.
authorDmitri Gribenko <gribozavr@gmail.com>
Tue, 24 Jul 2012 20:58:46 +0000 (20:58 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Tue, 24 Jul 2012 20:58:46 +0000 (20:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160689 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/CommentSema.cpp

index bfc9b91b0a28ceccf16fb0f928c91b81b5d1328c..8fa8ab7d06f5804ffe89bfa8561d29eb084e1bca 100644 (file)
@@ -370,18 +370,14 @@ void Sema::checkBlockCommandEmptyParagraph(BlockCommandComment *Command) {
 }
 
 bool Sema::isFunctionDecl() {
-  if (IsThisDeclInspected)
-    return IsFunctionDecl;
-
-  inspectThisDecl();
+  if (!IsThisDeclInspected)
+    inspectThisDecl();
   return IsFunctionDecl;
 }
 
 ArrayRef<const ParmVarDecl *> Sema::getParamVars() {
-  if (IsThisDeclInspected)
-    return ParamVars;
-
-  inspectThisDecl();
+  if (!IsThisDeclInspected)
+    inspectThisDecl();
   return ParamVars;
 }