Browse Source

[comment parsing]: Removes an unsafe API whose
use can cause crash. No test is available. It is uncovered
by code browsing. // rdar://14348205


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

Fariborz Jahanian 12 years ago
parent
commit
eb9c55fdfa
2 changed files with 2 additions and 6 deletions
  1. 0 4
      include/clang/AST/Comment.h
  2. 2 2
      lib/AST/Comment.cpp

+ 0 - 4
include/clang/AST/Comment.h

@@ -1111,10 +1111,6 @@ public:
     return ThisDeclInfo;
     return ThisDeclInfo;
   }
   }
   
   
-  DeclInfo *getThisDeclInfo() const LLVM_READONLY {
-    return ThisDeclInfo;
-  }
-  
   ArrayRef<BlockContentComment *> getBlocks() const { return Blocks; }
   ArrayRef<BlockContentComment *> getBlocks() const { return Blocks; }
   
   
 };
 };

+ 2 - 2
lib/AST/Comment.cpp

@@ -295,12 +295,12 @@ StringRef ParamCommandComment::getParamName(const FullComment *FC) const {
   assert(isParamIndexValid());
   assert(isParamIndexValid());
   if (isVarArgParam())
   if (isVarArgParam())
     return "...";
     return "...";
-  return FC->getThisDeclInfo()->ParamVars[getParamIndex()]->getName();
+  return FC->getDeclInfo()->ParamVars[getParamIndex()]->getName();
 }
 }
 
 
 StringRef TParamCommandComment::getParamName(const FullComment *FC) const {
 StringRef TParamCommandComment::getParamName(const FullComment *FC) const {
   assert(isPositionValid());
   assert(isPositionValid());
-  const TemplateParameterList *TPL = FC->getThisDeclInfo()->TemplateParameters;
+  const TemplateParameterList *TPL = FC->getDeclInfo()->TemplateParameters;
   for (unsigned i = 0, e = getDepth(); i != e; ++i) {
   for (unsigned i = 0, e = getDepth(); i != e; ++i) {
     if (i == e-1)
     if (i == e-1)
       return TPL->getParam(getIndex(i))->getName();
       return TPL->getParam(getIndex(i))->getName();