[clang] [NFC] Clean dead code in ParsedAttr.h (PR #89064)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 17 05:34:10 PDT 2024


https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/89064

None

>From f36208514cbef24c4673a333db064d9ffae34e74 Mon Sep 17 00:00:00 2001
From: yronglin <yronglin777 at gmail.com>
Date: Wed, 17 Apr 2024 20:33:22 +0800
Subject: [PATCH] [NFC] CLean dead code in ParsedAttr.h

Signed-off-by: yronglin <yronglin777 at gmail.com>
---
 clang/include/clang/Sema/ParsedAttr.h | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/clang/include/clang/Sema/ParsedAttr.h b/clang/include/clang/Sema/ParsedAttr.h
index e3857b2f07d9e0..25a5fa05b21c7d 100644
--- a/clang/include/clang/Sema/ParsedAttr.h
+++ b/clang/include/clang/Sema/ParsedAttr.h
@@ -94,7 +94,7 @@ struct PropertyData {
       : GetterId(getterId), SetterId(setterId) {}
 };
 
-} // namespace
+} // namespace detail
 
 /// Wraps an identifier and optional source location for the identifier.
 struct IdentifierLoc {
@@ -743,11 +743,6 @@ class AttributePool {
                      IdentifierInfo *scopeName, SourceLocation scopeLoc,
                      ArgsUnion *args, unsigned numArgs, ParsedAttr::Form form,
                      SourceLocation ellipsisLoc = SourceLocation()) {
-    size_t temp =
-        ParsedAttr::totalSizeToAlloc<ArgsUnion, detail::AvailabilityData,
-                                     detail::TypeTagForDatatypeData, ParsedType,
-                                     detail::PropertyData>(numArgs, 0, 0, 0, 0);
-    (void)temp;
     void *memory = allocate(
         ParsedAttr::totalSizeToAlloc<ArgsUnion, detail::AvailabilityData,
                                      detail::TypeTagForDatatypeData, ParsedType,



More information about the cfe-commits mailing list