logic: fixed infinite loop

* fixed infinite loop that occurred when trying to find the source location of an unnamed template parameter.
* commented out the deploy settings define.
This commit is contained in:
malte_langkabel
2015-12-02 16:38:06 +01:00
parent 3fac5e69f3
commit 23909058c8
2 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
#include "vld.h"
#define DEPLOY
//#define DEPLOY
#ifdef DEPLOY
static std::string appSettingsPath = std::string(std::getenv("APPDATA")) + "/../local/Coati Software/Coati/ApplicationSettings.xml";
+3 -5
View File
@@ -458,14 +458,11 @@ bool ASTVisitor::VisitFunctionTemplateDecl(clang::FunctionTemplateDecl *declarat
for (size_t i = 0; i < parameterList->size(); i++)
{
clang::NamedDecl* namedDecl = parameterList->getParam(i);
if (isLocatedInUnparsedProjectFile(namedDecl))
if (!namedDecl->getName().empty()) // do not create node for template param if the param has no name
{
NameHierarchy templateParameterTypeNameHierarchy = utility::getDeclNameHierarchy(namedDecl);
m_client->onTemplateFunctionParameterTypeParsed(
getParseLocationForNamedDecl(namedDecl),
templateParameterTypeNameHierarchy,
utility::getDeclNameHierarchy(namedDecl),
templateFunction
);
}
@@ -915,6 +912,7 @@ ParseLocation ASTVisitor::getParseLocationForIdentifier(const clang::SourceLocat
tokenKind != clang::tok::TokenKind::raw_identifier
)
{
const clang::PresumedLoc& presumedEndss = sourceManager.getPresumedLoc(identifierToken.getEndLoc());
clang::Lexer::getRawToken(identifierToken.getEndLoc(), identifierToken, sourceManager, clang::LangOptions());
tokenKind = identifierToken.getKind();
}