From 9ffe62f2ef193dbb87bf529b508e5874b79d916c Mon Sep 17 00:00:00 2001 From: triton Date: Thu, 15 Aug 2013 23:35:25 +0100 Subject: [PATCH] Do not try to get parameter comment indexes for invalid params. --- src/Parser/Comments.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Parser/Comments.cpp b/src/Parser/Comments.cpp index 7b71f984..53cc4558 100644 --- a/src/Parser/Comments.cpp +++ b/src/Parser/Comments.cpp @@ -123,7 +123,8 @@ static CppSharp::AST::Comment^ ConvertCommentBlock(clang::comments::Comment* C) _Comment = PC; HandleBlockCommand(CK, PC); PC->Direction = ConvertParamPassDirection(CK->getDirection()); - PC->ParamIndex = CK->getParamIndex(); + if (CK->isParamIndexValid() && !CK->isVarArgParam()) + PC->ParamIndex = CK->getParamIndex(); break; } case Comment::TParamCommandCommentKind: