Skip to content

Commit ce11778

Browse files
committed
fixed parsing of -std= in compilation database
1 parent 29815b2 commit ce11778

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎lib/importproject.cpp‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,11 @@ void ImportProject::FileSettings::parseCommand(const std::string &command)
242242
undefs.insert(fval);
243243
else if (F=='I')
244244
includePaths.push_back(fval);
245-
else if (F=='s' && fval.compare(0,3,"td=") == 0)
246-
standard = fval.substr(3);
245+
else if (F=='s' && fval.compare(0,2,"td") == 0) {
246+
++pos;
247+
const std::string stdval = readUntil(command, &pos, " ");
248+
standard = stdval;
249+
}
247250
else if (F == 'i' && fval == "system") {
248251
++pos;
249252
const std::string isystem = readUntil(command, &pos, " ");

0 commit comments

Comments
 (0)