We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d2136a commit d17251bCopy full SHA for d17251b
server/src/building/BuildDatabase.cpp
@@ -277,7 +277,12 @@ fs::path BuildDatabase::getRootForSource(const fs::path &path) const {
277
}
278
279
fs::path BuildDatabase::getRootForFirstSource() const {
280
- return getRootForSource(sourceFileInfos.begin()->first);
+ if (sourceFileInfos.empty()){
281
+ throw CompilationDatabaseException("Source files not found");
282
+ } else {
283
+ return getRootForSource(sourceFileInfos.begin()->first);
284
+ }
285
+}
286
287
288
fs::path BuildDatabase::getBitcodeForSource(const fs::path &sourceFile) const {
0 commit comments