================
@@ -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:
Yes, this check covers them all, but there we do some work before this
`getQualification()` call for no reason.
I.e. pattern is the following:
```cpp
...
we so something
...
getQualification(...); // here we realize that the language is not C++ and
everything above was useless
```
https://github.com/llvm/llvm-project/pull/242500
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits