Author: Matheus Izvekov
Date: 2026-03-20T14:47:32-03:00
New Revision: eaeca6d2fb88b229b966d5938ebbee0607801fbe

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

LOG: [clang] fix #187352 breakage on 32-bit platforms (#187741)

Fixes breakage reported here:
https://github.com/llvm/llvm-project/pull/187352#issuecomment-4096403838

Added: 
    

Modified: 
    clang/lib/AST/TemplateBase.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/TemplateBase.cpp b/clang/lib/AST/TemplateBase.cpp
index ee5bb80fc36ee..f76c2e336dc86 100644
--- a/clang/lib/AST/TemplateBase.cpp
+++ b/clang/lib/AST/TemplateBase.cpp
@@ -750,8 +750,8 @@ clang::TemplateArgumentLocInfo::TemplateArgumentLocInfo(
 clang::TemplateArgumentLocInfo::TemplateArgumentLocInfo(
     ASTContext &Ctx, SourceLocation TrivialLoc) {
   if constexpr (EmbedLocInPointer)
-    Pointer = reinterpret_cast<void *>((TrivialLoc.getRawEncoding() + 1u)
-                                       << LowBitsRequired);
+    Pointer = reinterpret_cast<LocOrPointer>((TrivialLoc.getRawEncoding() + 1u)
+                                             << LowBitsRequired);
   else
     Pointer = new (Ctx) SourceLocation(TrivialLoc);
 }


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to