Skip to content

Commit 8e8a0ef

Browse files
committed
Hide some comments from -Wdocumentation to shut up warnings
Clang doesn't seem to treat variables of function pointer type as valid functions (unlike e.g. typedefs of function types), so it was warning about \param and \returns. For now, just disable the warning in this header. I filed rdar://problem/24978538 to fix clang.
1 parent d5df3ab commit 8e8a0ef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/swift/SwiftReflection/MemoryReaderInterface.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ typedef struct MemoryReaderImpl {
3535
/// Get the size in bytes of the target's size type.
3636
uint8_t (*getSizeSize)();
3737

38+
// FIXME: -Wdocumentation complains about \param and \returns on function pointers.
39+
#pragma clang diagnostic push
40+
#pragma clang diagnostic ignored "-Wdocumentation"
41+
3842
/// Read a sequence of bytes at an address in the target.
3943
///
4044
/// \param address the address in the target address space
@@ -60,6 +64,9 @@ typedef struct MemoryReaderImpl {
6064
/// \param address the address in the target address space
6165
/// \returns The length of the string or 0 if the scan was unsuccessful.
6266
uint64_t (*getStringLength)(addr_t address);
67+
68+
#pragma clang diagnostic pop
69+
6370
} MemoryReaderImpl;
6471

6572
#ifdef __cplusplus

0 commit comments

Comments
 (0)