Author: erichkeane
Date: 2025-08-05T07:16:07-07:00
New Revision: 16766b3aef281a24acad08292ffe69554b44805b

URL: 
https://github.com/llvm/llvm-project/commit/16766b3aef281a24acad08292ffe69554b44805b
DIFF: 
https://github.com/llvm/llvm-project/commit/16766b3aef281a24acad08292ffe69554b44805b.diff

LOG: Fix ms type_info to be a 'class' type

It was brought up on #151277 that the patch changes type_info from class
to struct. While I couldn't find a way to test/notice this, this patch
changes it to a class.

While I'm here, I am also removing unnecessary/against coding standard
curley brackets.

Added: 
    

Modified: 
    clang/include/clang/AST/ASTContext.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/AST/ASTContext.h 
b/clang/include/clang/AST/ASTContext.h
index 99f54305d8ed6..2b7ba41e870ec 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -2394,9 +2394,8 @@ class ASTContext : public RefCountedBase<ASTContext> {
   /// Retrieve the implicitly-predeclared 'struct type_info' declaration.
   TagDecl *getMSTypeInfoTagDecl() const {
     // Lazily create this type on demand - it's only needed for MS builds.
-    if (!MSTypeInfoTagDecl) {
-      MSTypeInfoTagDecl = buildImplicitRecord("type_info");
-    }
+    if (!MSTypeInfoTagDecl)
+      MSTypeInfoTagDecl = buildImplicitRecord("type_info", TagTypeKind::Class);
     return MSTypeInfoTagDecl;
   }
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to