================
@@ -576,13 +576,18 @@ template <typename T> static bool
isFirstInExternCContext(T *D) {
return First->isInExternCContext();
}
-static bool isSingleLineLanguageLinkage(const Decl &D) {
- if (const auto *SD = dyn_cast<LinkageSpecDecl>(D.getDeclContext()))
- if (!SD->hasBraces())
- return true;
+static bool isUnbracedLanguageLinkage(const DeclContext *DC) {
+ if (!DC)
+ return false;
+ if (const auto *SD = dyn_cast<LinkageSpecDecl>(DC))
+ return !SD->hasBraces();
return false;
}
----------------
AaronBallman wrote:
```suggestion
if (const auto *SD = dyn_cast_if_present<LinkageSpecDecl>(DC))
return !SD->hasBraces();
return false;
}
```
Sorry for not noticing this earlier, but we can simplify even further this way.
https://github.com/llvm/llvm-project/pull/93913
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits