[clang-tools-extra] [clangd] Avoid C++ name qualification in C (PR #242500)

Aleksandr Platonov via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 19 23:11:13 PST 2026


================
@@ -106,6 +106,9 @@ std::string getQualification(ASTContext &Context,
                              const DeclContext *DestContext,
                              const DeclContext *SourceContext,
                              llvm::function_ref<bool(const Decl *)> IsVisible) {
+
+  if (!Context.getLangOpts().CPlusPlus)
+    return "";
----------------
ArcsinX wrote:

I found that we have several other `getQualification()`s. So the question is: why we place this check here?

https://github.com/llvm/llvm-project/pull/242500


More information about the cfe-commits mailing list