Include semicolon in unexposed entity
This commit is contained in:
parent
dd0a20c6d5
commit
e53fc5e231
2 changed files with 7 additions and 2 deletions
|
|
@ -223,9 +223,15 @@ namespace
|
||||||
|| clang_isExpression(kind) || kind == CXCursor_CXXBaseSpecifier
|
|| clang_isExpression(kind) || kind == CXCursor_CXXBaseSpecifier
|
||||||
|| kind == CXCursor_TemplateTypeParameter
|
|| kind == CXCursor_TemplateTypeParameter
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
// need to shrink range by one
|
// need to shrink range by one
|
||||||
end = get_next_location(tu, file, end, -1);
|
end = get_next_location(tu, file, end, -1);
|
||||||
|
else if (kind == CXCursor_UnexposedDecl)
|
||||||
|
{
|
||||||
|
// include semicolon, if necessary
|
||||||
|
if (token_after_is(tu, file, cur, end, ";"))
|
||||||
|
end = get_next_location(tu, file, end);
|
||||||
|
}
|
||||||
|
|
||||||
return clang_getRange(begin, end);
|
return clang_getRange(begin, end);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
#include <cppast/cpp_member_variable.hpp>
|
#include <cppast/cpp_member_variable.hpp>
|
||||||
#include <cppast/cpp_variable.hpp>
|
#include <cppast/cpp_variable.hpp>
|
||||||
#include <clang-c/Index.h>
|
|
||||||
|
|
||||||
#include "libclang_visitor.hpp"
|
#include "libclang_visitor.hpp"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue