================
@@ -574,22 +574,30 @@ int ClangTool::run(ToolAction *Action) {
       continue;
     }
     for (CompileCommand &CompileCommand : CompileCommandsForFile) {
+      // If the 'directory' field of the compilation database is empty, display
+      // an error and use the working directory instead.
+      std::string Directory = CompileCommand.Directory;
----------------
localspook wrote:

```suggestion
      StringRef Directory = CompileCommand.Directory;
```
?

https://github.com/llvm/llvm-project/pull/156873
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to