[PATCH] D89834: FileManager: Improve the FileEntryRef API and customize its OptionalStorage

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 30 11:32:44 PDT 2020


dexonsmith added inline comments.


================
Comment at: clang/include/clang/Basic/FileEntry.h:186
+
+  constexpr bool hasValue() const noexcept {
+    return MaybeRef.hasOptionalValue();
----------------
danielkiss wrote:
> This broke the build, `constexpr` could be dropped IMHO.
> FileEntry.h(186):  error C3615: constexpr function 'llvm::optional_detail::OptionalStorage<clang::FileEntryRef,true>::hasValue' cannot result in a constant expression
> FileEntry.h(187): note: failure was caused by call of undefined function or one not declared 'constexpr'
> FileEntry.h(187): note: see usage of 'clang::FileEntryRef::hasOptionalValue'
Thanks, I had the same conclusion, I'll drop the `constexpr` I cargo-culted from the generic version of `OptionalStorage`.

Note that I already reverted in 940d0a310dca31ae97080b068cef92eadfee6367, if you update you should be able to proceed. (I'm waiting for the bots to fully recover before I push the fixed version.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89834



More information about the cfe-commits mailing list