[PATCH] D89761: Split out llvm/Support/FileSystem/UniqueID.h and clang/Basic/FileEntry.h, NFC

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 08:19:17 PDT 2020


dexonsmith added inline comments.


================
Comment at: clang/include/clang/Basic/FileEntry.h:33
+
+using llvm::Optional;
+using llvm::StringRef;
----------------
dexonsmith wrote:
> JDevlieghere wrote:
> > Won't this now make `llvm::Optional` visible as `clang::Optional` everywhere this header is included? Isn't this considered bad practice in a header? 
> I thought I found both of these usable in clang headers elsewhere. I’ll double check. 
Ah, I was sort of right. The correct way to do this is:
```
#include <clang/Basic/LLVM.h>
```
which forward-declares a bunch of stuff and pulls it into `clang::`.

I'll update.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89761/new/

https://reviews.llvm.org/D89761



More information about the llvm-commits mailing list