diff options
| author | Michael Liao <michael.hliao@gmail.com> | 2020-01-16 16:02:47 -0500 |
|---|---|---|
| committer | Hans Wennborg <hans@chromium.org> | 2020-02-06 10:24:11 +0100 |
| commit | cbec01fe05895abe96f2cb80e24367dec60209ee (patch) | |
| tree | 07a5d21a5eae14f0df270c01e8dce06a3e5f3c7a | |
| parent | d0104a596199a41963dbba70338d9ff3c36b185a (diff) | |
| download | bcm5719-llvm-cbec01fe05895abe96f2cb80e24367dec60209ee.tar.gz bcm5719-llvm-cbec01fe05895abe96f2cb80e24367dec60209ee.zip | |
[clangd] Add workaround for GCC5 host compilers. NFC.
(cherry picked from commit 40514a7d7a3b745ba43c2d014e54a0d78d65d957)
| -rw-r--r-- | clang-tools-extra/clangd/Hover.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/Hover.cpp b/clang-tools-extra/clangd/Hover.cpp index 754baf26568..834c9d04187 100644 --- a/clang-tools-extra/clangd/Hover.cpp +++ b/clang-tools-extra/clangd/Hover.cpp @@ -447,7 +447,13 @@ bool isLiteral(const Expr *E) { llvm::StringLiteral getNameForExpr(const Expr *E) { // FIXME: Come up with names for `special` expressions. - return "expression"; + // + // It's an known issue for GCC5, https://godbolt.org/z/Z_tbgi. Work around + // that by using explicit conversion constructor. + // + // TODO: Once GCC5 is fully retired and not the minimal requirement as stated + // in `GettingStarted`, please remove the explicit conversion constructor. + return llvm::StringLiteral("expression"); } // Generates hover info for evaluatable expressions. |

