<div dir="ltr"><div><div><div><div><div>Hello, <br><br></div>When running test-release.sh using GCC 5.4.0 we encountered this error :<br><br>/home/anil/llvm1000_rc1_binary_upload/rc1/llvm-project/clang-tools-extra/clangd/Hover.cpp: In function ‘llvm::StringLiteral clang::clangd::{anonymous}::getNameForExpr(const clang::Expr*)’:<br>/home/anil/llvm1000_rc1_binary_upload/rc1/llvm-project/clang-tools-extra/clangd/Hover.cpp:450:10: error: could not convert ‘(const char*)"expression"’ from ‘const char*’ to ‘llvm::StringLiteral’<br>   return "expression";<br>          ^<br><br></div>This was fixed by the  commit  40514a7d<br><br>commit 40514a7d7a3b745ba43c2d014e54a0d78d65d957<br>Author: Michael Liao <<a href="mailto:michael.hliao@gmail.com">michael.hliao@gmail.com</a>><br>Date:   Thu Jan 16 16:02:47 2020 -0500<br><br>    [clangd] Add workaround for GCC5 host compilers. NFC.<br><br>diff --git a/clang-tools-extra/clangd/Hover.cpp b/clang-tools-extra/clangd/Hover.cpp<br>index cfa5e3b..ad715db 100644<br>--- a/clang-tools-extra/clangd/Hover.cpp<br>+++ b/clang-tools-extra/clangd/Hover.cpp<br>@@ -439,7 +439,13 @@ bool isLiteral(const Expr *E) {<br><br> llvm::StringLiteral getNameForExpr(const Expr *E) {<br>   // FIXME: Come up with names for `special` expressions.<br>-  return "expression";<br>+  //<br>+  // It's an known issue for GCC5, <a href="https://godbolt.org/z/Z_tbgi">https://godbolt.org/z/Z_tbgi</a>. Work around<br>+  // that by using explicit conversion constructor.<br>+  //<br>+  // TODO: Once GCC5 is fully retired and not the minimal requirement as stated<br>+  // in `GettingStarted`, please remove the explicit conversion constructor.<br>+  return llvm::StringLiteral("expression");<br> }<br><br></div>Can this be backported to RC1 10.0.0 ?<br><br></div>Thanks, <br></div>Anil Mahmud<br><div><div><div><br><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 4, 2020 at 6:07 AM Dimitry Andric via Release-testers <<a href="mailto:release-testers@lists.llvm.org">release-testers@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 30 Jan 2020, at 20:38, Hans Wennborg via Release-testers <<a href="mailto:release-testers@lists.llvm.org" target="_blank">release-testers@lists.llvm.org</a>> wrote:<br>
> <br>
> It took a bit longer than planned due to master being a somewhat<br>
> unstable at the branch point, but Release Candidate 1 has now been<br>
> tagged as llvmorg-10.0.0-rc1.<br>
<br>
I tried building rc1 for 32-bit FreeBSD, but ran into a compile error in mlir:<br>
<br>
/home/dim/llvm/10.0.0/rc1/llvm-project/mlir/lib/Transforms/DialectConversion.cpp:787:67: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'Region::iterator::difference_type' (aka 'int') in initializer list [-Wc++11-narrowing]<br>
    blockActions.push_back(BlockAction::getMove(&block, {&region, position}));<br>
                                                                  ^~~~~~~~<br>
/home/dim/llvm/10.0.0/rc1/llvm-project/mlir/lib/Transforms/DialectConversion.cpp:787:67: note: insert an explicit cast to silence this issue<br>
    blockActions.push_back(BlockAction::getMove(&block, {&region, position}));<br>
                                                                  ^~~~~~~~<br>
                                                                  static_cast<difference_type>( )<br>
1 error generated.<br>
<br>
I submitted <a href="https://bugs.llvm.org/show_bug.cgi?id=44767" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=44767</a> for this.<br>
<br>
-Dimitry<br>
<br>
_______________________________________________<br>
Release-testers mailing list<br>
<a href="mailto:Release-testers@lists.llvm.org" target="_blank">Release-testers@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/release-testers" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/release-testers</a><br>
</blockquote></div>