[clang] [clang] Add preliminary lifetimebound support to APINotes (PR #114830)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 4 11:21:09 PST 2024


================
@@ -860,13 +868,12 @@ void Sema::ProcessAPINotes(Decl *D) {
   if (!D)
     return;
 
+  auto *DC = D->getDeclContext();
   // Globals.
-  if (D->getDeclContext()->isFileContext() ||
-      D->getDeclContext()->isNamespace() ||
-      D->getDeclContext()->isExternCContext() ||
-      D->getDeclContext()->isExternCXXContext()) {
+  if (DC->isFileContext() || DC->isNamespace() || DC->isExternCContext() ||
+      DC->isExternCXXContext()) {
----------------
compnerd wrote:

Nice cleanup!

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


More information about the cfe-commits mailing list