diff options
Diffstat (limited to 'include/clang/AST/Comment.h')
-rw-r--r-- | include/clang/AST/Comment.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/clang/AST/Comment.h b/include/clang/AST/Comment.h index c02a82f..28849f5 100644 --- a/include/clang/AST/Comment.h +++ b/include/clang/AST/Comment.h @@ -699,7 +699,10 @@ private: unsigned ParamIndex; public: - enum { InvalidParamIndex = ~0U }; + enum LLVM_ENUM_INT_TYPE(unsigned) { + InvalidParamIndex = ~0U, + VarArgParamIndex = ~0U/*InvalidParamIndex*/ - 1U + }; ParamCommandComment(SourceLocation LocBegin, SourceLocation LocEnd, @@ -755,14 +758,25 @@ public: return ParamIndex != InvalidParamIndex; } + bool isVarArgParam() const LLVM_READONLY { + return ParamIndex == VarArgParamIndex; + } + + void setIsVarArgParam() { + ParamIndex = VarArgParamIndex; + assert(isParamIndexValid()); + } + unsigned getParamIndex() const LLVM_READONLY { assert(isParamIndexValid()); + assert(!isVarArgParam()); return ParamIndex; } void setParamIndex(unsigned Index) { ParamIndex = Index; assert(isParamIndexValid()); + assert(!isVarArgParam()); } }; @@ -1097,10 +1111,6 @@ public: return ThisDeclInfo; } - DeclInfo *getThisDeclInfo() const LLVM_READONLY { - return ThisDeclInfo; - } - ArrayRef<BlockContentComment *> getBlocks() const { return Blocks; } }; |