Skip to content

Commit 3009aa7

Browse files
committed
[clang][Tooling] Extend special symbol mappings for (U)INTN_C
1 parent 63ad149 commit 3009aa7

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

clang/lib/Tooling/Inclusions/Stdlib/CSpecialSymbolMap.inc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,17 @@ SYMBOL(size_t, None, <string.h>)
1212
SYMBOL(size_t, None, <time.h>)
1313
SYMBOL(size_t, None, <uchar.h>)
1414
SYMBOL(size_t, None, <wchar.h>)
15+
16+
// These macros trigger ambiguity when parsing cppreference index.
17+
// Taken from https://en.cppreference.com/w/c/types/integer.
18+
SYMBOL(INT8_C, None, <stdint.h>)
19+
SYMBOL(INT16_C, None, <stdint.h>)
20+
SYMBOL(INT32_C, None, <stdint.h>)
21+
SYMBOL(INT64_C, None, <stdint.h>)
22+
SYMBOL(INTMAX_C, None, <stdint.h>)
23+
24+
SYMBOL(UINT8_C, None, <stdint.h>)
25+
SYMBOL(UINT16_C, None, <stdint.h>)
26+
SYMBOL(UINT32_C, None, <stdint.h>)
27+
SYMBOL(UINT64_C, None, <stdint.h>)
28+
SYMBOL(UINTMAX_C, None, <stdint.h>)

clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,3 +822,27 @@ SYMBOL(SCNxMAX, None, <cinttypes>)
822822
SYMBOL(SCNxMAX, None, <inttypes.h>)
823823
SYMBOL(SCNxPTR, None, <cinttypes>)
824824
SYMBOL(SCNxPTR, None, <inttypes.h>)
825+
826+
// These macros trigger ambiguity when parsing cppreference index.
827+
// Taken from https://en.cppreference.com/w/cpp/types/integer.
828+
SYMBOL(INT8_C, None, <cstdint>)
829+
SYMBOL(INT8_C, None, <stdint.h>)
830+
SYMBOL(INT16_C, None, <cstdint>)
831+
SYMBOL(INT16_C, None, <stdint.h>)
832+
SYMBOL(INT32_C, None, <cstdint>)
833+
SYMBOL(INT32_C, None, <stdint.h>)
834+
SYMBOL(INT64_C, None, <cstdint>)
835+
SYMBOL(INT64_C, None, <stdint.h>)
836+
SYMBOL(INTMAX_C, None, <cstdint>)
837+
SYMBOL(INTMAX_C, None, <stdint.h>)
838+
839+
SYMBOL(UINT8_C, None, <cstdint>)
840+
SYMBOL(UINT8_C, None, <stdint.h>)
841+
SYMBOL(UINT16_C, None, <cstdint>)
842+
SYMBOL(UINT16_C, None, <stdint.h>)
843+
SYMBOL(UINT32_C, None, <cstdint>)
844+
SYMBOL(UINT32_C, None, <stdint.h>)
845+
SYMBOL(UINT64_C, None, <cstdint>)
846+
SYMBOL(UINT64_C, None, <stdint.h>)
847+
SYMBOL(UINTMAX_C, None, <cstdint>)
848+
SYMBOL(UINTMAX_C, None, <stdint.h>)

0 commit comments

Comments
 (0)