Skip to content

Commit 4ebb9db

Browse files
committed
fixup! adjust diagnostic message
1 parent 32b9ed1 commit 4ebb9db

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ static void SetupLangOpts(CompilerInstance &compiler,
551551
lldb_private::Language::GetNameForLanguageType(language));
552552

553553
lldb::LanguageType language_for_note = language;
554-
llvm::StringRef language_fallback_reason;
554+
std::string language_fallback_reason;
555555

556556
LangOptions &lang_opts = compiler.getLangOpts();
557557

@@ -623,7 +623,13 @@ static void SetupLangOpts(CompilerInstance &compiler,
623623
compiler.getHeaderSearchOpts().UseLibcxx = true;
624624

625625
language_for_note = lldb::eLanguageTypeObjC_plus_plus;
626-
language_fallback_reason = "Using default language. ";
626+
if (language != lldb::eLanguageTypeUnknown)
627+
language_fallback_reason = llvm::formatv(
628+
"Expression evaluation in {0} not supported. ",
629+
lldb_private::Language::GetDisplayNameForLanguageType(language));
630+
631+
language_fallback_reason +=
632+
llvm::formatv("Falling back to default language. ");
627633
break;
628634
}
629635

0 commit comments

Comments
 (0)