logic: Cxx destructor decl fixes
* omit visiting a type in the name of a CxxDestructorDecl (which recorded a type reference) * fixed range of names for Cxx destructors and overleaded operators.
This commit is contained in:
@@ -461,6 +461,12 @@ bool CxxAstVisitor::TraverseBinComma(clang::BinaryOperator* s)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CxxAstVisitor::TraverseDeclarationNameInfo(clang::DeclarationNameInfo NameInfo)
|
||||
{
|
||||
// we don't visit any children here
|
||||
return true;
|
||||
}
|
||||
|
||||
void CxxAstVisitor::traverseDeclContextHelper(clang::DeclContext* d)
|
||||
{
|
||||
if (!d)
|
||||
@@ -682,15 +688,18 @@ ParseLocation CxxAstVisitor::getParseLocation(const clang::SourceRange& sourceRa
|
||||
{
|
||||
const clang::SourceManager& sourceManager = m_astContext->getSourceManager();
|
||||
|
||||
const clang::PresumedLoc& presumedBegin = sourceManager.getPresumedLoc(sourceRange.getBegin(), false);
|
||||
const clang::PresumedLoc& presumedEnd = sourceManager.getPresumedLoc(sourceRange.getEnd(), false);
|
||||
const clang::SourceLocation startLoc = sourceRange.getBegin();
|
||||
const clang::SourceLocation endLoc = m_preprocessor->getLocForEndOfToken(sourceRange.getEnd());
|
||||
|
||||
const clang::PresumedLoc& presumedBegin = sourceManager.getPresumedLoc(startLoc, false);
|
||||
const clang::PresumedLoc& presumedEnd = sourceManager.getPresumedLoc(endLoc, false);
|
||||
|
||||
parseLocation = ParseLocation(
|
||||
m_canonicalFilePathCache->getValue(presumedBegin.getFilename()),
|
||||
presumedBegin.getLine(),
|
||||
presumedBegin.getColumn(),
|
||||
presumedEnd.getLine(),
|
||||
presumedEnd.getColumn()
|
||||
presumedEnd.getColumn() - 1
|
||||
);
|
||||
}
|
||||
return parseLocation;
|
||||
|
||||
Reference in New Issue
Block a user