This commit is contained in:
parent
30e8814ecb
commit
2c54f31bfe
|
@ -509,7 +509,7 @@ void clangimport::AstNode::setLocations(TokenList *tokenList, int file, int line
|
|||
} else if (ext[0] == '<') {
|
||||
const std::string::size_type colon = ext.find(':');
|
||||
if (colon != std::string::npos) {
|
||||
const bool windowsPath = colon == 2 && ext.size() > 4 && ext[3] == '\\';
|
||||
const bool windowsPath = colon == 2 && ext.size() > 3 && ext[2] == ':';
|
||||
const std::string::size_type sep1 = windowsPath ? ext.find(':', 4) : colon;
|
||||
const std::string::size_type sep2 = ext.find(':', sep1 + 1);
|
||||
file = tokenList->appendFileIfNew(ext.substr(1, sep1 - 1));
|
||||
|
|
|
@ -589,6 +589,9 @@ private:
|
|||
|
||||
clang = "`-CXXRecordDecl 0x34cc5f8 <C:\\Foo\\Bar Baz\\1.cpp:2:1, col:7> col:7 class Foo";
|
||||
ASSERT_EQUALS("class Foo ;", parse(clang));
|
||||
|
||||
clang = "`-CXXRecordDecl 0x34cc5f8 <C:/Foo/Bar Baz/1.cpp:2:1, col:7> col:7 class Foo";
|
||||
ASSERT_EQUALS("class Foo ;", parse(clang));
|
||||
}
|
||||
|
||||
void cxxRecordDecl2() {
|
||||
|
|
Loading…
Reference in New Issue