[clang-tools-extra] r365713 - rL365634 adds a unique_ptr<CompilationDatabase> in GobalCompilationDatabase.h:108 but CompilationDatabase is only forward declared. This makes the header not compile standalone, because unique_ptrs expect to have the full-definition of the...

Sterling Augustine via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 10 16:38:00 PDT 2019


Author: saugustine
Date: Wed Jul 10 16:38:00 2019
New Revision: 365713

URL: http://llvm.org/viewvc/llvm-project?rev=365713&view=rev
Log:
rL365634 adds a unique_ptr<CompilationDatabase> in GobalCompilationDatabase.h:108 but CompilationDatabase is only forward declared. This makes the header not compile standalone, because unique_ptrs expect to have the full-definition of the...

Summary:
...template argument.

Remove the forward declaration and include the appropriate header instead.
Remove CompileCommand too, which is also in the header.

Modified:
    clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.h

Modified: clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.h?rev=365713&r1=365712&r2=365713&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.h (original)
+++ clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.h Wed Jul 10 16:38:00 2019
@@ -11,6 +11,7 @@
 
 #include "Function.h"
 #include "Path.h"
+#include "clang/Tooling/CompilationDatabase.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/StringMap.h"
 #include <memory>
@@ -19,11 +20,6 @@
 
 namespace clang {
 
-namespace tooling {
-class CompilationDatabase;
-struct CompileCommand;
-} // namespace tooling
-
 namespace clangd {
 
 class Logger;




More information about the cfe-commits mailing list