beetrees db3a47c810
Fix silent truncation of inline ASM srcloc cookie when going through a DiagnosticInfoSrcMgr (#84559)
The size of the inline ASM `srcloc` cookie was changed from 32 bits to
64 bits in [D105491](https://reviews.llvm.org/D105491). However, that
commit only updated the size of the cookie in `DiagnosticInfoInlineAsm`,
meaning that inline ASM diagnostics that are instead represented with a
`DiagnosticInfoSrcMgr` have their cookies truncated to 32 bits. This PR
replaces the remaining uses of `unsigned` to represent the cookie with
`uint64_t`, allowing the cookie to make it all the way to the diagnostic
handler without being truncated.
2024-06-14 15:05:57 +01:00

12 lines
344 B
C

// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
__attribute__((error("oh no"))) void foo(void);
void bar(void) {
foo();
}
// CHECK: call void @foo(), !srcloc [[SRCLOC:![0-9]+]]
// CHECK: declare{{.*}} void @foo() [[ATTR:#[0-9]+]]
// CHECK: attributes [[ATTR]] = {{{.*}}"dontcall-error"="oh no"
// CHECK: [[SRCLOC]] = !{i64 {{[0-9]+}}}