ccls/src/config.cc

20 lines
461 B
C++
Raw Normal View History

2018-08-21 05:27:52 +00:00
// Copyright 2017-2018 ccls Authors
// SPDX-License-Identifier: Apache-2.0
2018-03-31 20:59:27 +00:00
#include "config.h"
namespace ccls {
2018-08-09 17:08:14 +00:00
Config *g_config;
void DoPathMapping(std::string &arg) {
for (const std::string &mapping : g_config->clang.pathMappings) {
auto sep = mapping.find('>');
if (sep != std::string::npos) {
auto p = arg.find(mapping.substr(0, sep));
if (p != std::string::npos)
arg.replace(p, sep, mapping.substr(sep + 1));
}
}
}
}