Skip to content

Conversation

@BStott6
Copy link
Contributor

@BStott6 BStott6 commented Nov 20, 2025

(Addresses the FIXME)

@llvmbot
Copy link
Member

llvmbot commented Nov 20, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Benjamin Stott (BStott6)

Changes

(Addresses the FIXME)


Full diff: https://github.com/llvm/llvm-project/pull/168866.diff

1 Files Affected:

  • (modified) compiler-rt/lib/ubsan/ubsan_diag.h (+5-4)
diff --git a/compiler-rt/lib/ubsan/ubsan_diag.h b/compiler-rt/lib/ubsan/ubsan_diag.h
index c836647c98f3c..d37bc309fdd0a 100644
--- a/compiler-rt/lib/ubsan/ubsan_diag.h
+++ b/compiler-rt/lib/ubsan/ubsan_diag.h
@@ -37,10 +37,11 @@ class Location {
 
 private:
   LocationKind Kind;
-  // FIXME: In C++11, wrap these in an anonymous union.
-  SourceLocation SourceLoc;
-  MemoryLocation MemoryLoc;
-  const SymbolizedStack *SymbolizedLoc;  // Not owned.
+  union {
+    SourceLocation SourceLoc;
+    MemoryLocation MemoryLoc;
+    const SymbolizedStack *SymbolizedLoc; // Not owned.
+  };
 
 public:
   Location() : Kind(LK_Null) {}

@github-actions
Copy link

🐧 Linux x64 Test Results

  • 5824 tests passed
  • 1319 tests skipped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants