r185732 - [comment parsing]: Removes an unsafe API whose
Fariborz Jahanian
fjahanian at apple.com
Fri Jul 5 16:20:56 PDT 2013
Author: fjahanian
Date: Fri Jul 5 18:20:55 2013
New Revision: 185732
URL: http://llvm.org/viewvc/llvm-project?rev=185732&view=rev
Log:
[comment parsing]: Removes an unsafe API whose
use can cause crash. No test is available. It is uncovered
by code browsing. // rdar://14348205
Modified:
cfe/trunk/include/clang/AST/Comment.h
cfe/trunk/lib/AST/Comment.cpp
Modified: cfe/trunk/include/clang/AST/Comment.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Comment.h?rev=185732&r1=185731&r2=185732&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Comment.h (original)
+++ cfe/trunk/include/clang/AST/Comment.h Fri Jul 5 18:20:55 2013
@@ -1111,10 +1111,6 @@ public:
return ThisDeclInfo;
}
- DeclInfo *getThisDeclInfo() const LLVM_READONLY {
- return ThisDeclInfo;
- }
-
ArrayRef<BlockContentComment *> getBlocks() const { return Blocks; }
};
Modified: cfe/trunk/lib/AST/Comment.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Comment.cpp?rev=185732&r1=185731&r2=185732&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Comment.cpp (original)
+++ cfe/trunk/lib/AST/Comment.cpp Fri Jul 5 18:20:55 2013
@@ -295,12 +295,12 @@ StringRef ParamCommandComment::getParamN
assert(isParamIndexValid());
if (isVarArgParam())
return "...";
- return FC->getThisDeclInfo()->ParamVars[getParamIndex()]->getName();
+ return FC->getDeclInfo()->ParamVars[getParamIndex()]->getName();
}
StringRef TParamCommandComment::getParamName(const FullComment *FC) const {
assert(isPositionValid());
- const TemplateParameterList *TPL = FC->getThisDeclInfo()->TemplateParameters;
+ const TemplateParameterList *TPL = FC->getDeclInfo()->TemplateParameters;
for (unsigned i = 0, e = getDepth(); i != e; ++i) {
if (i == e-1)
return TPL->getParam(getIndex(i))->getName();
More information about the cfe-commits
mailing list