Author: Kadir Cetinkaya
Date: 2025-05-13T12:14:09+02:00
New Revision: 3009aa75cae240fc400c65c748a366d584998f9d

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

LOG: [clang][Tooling] Extend special symbol mappings for (U)INTN_C

Added: 
    

Modified: 
    clang/lib/Tooling/Inclusions/Stdlib/CSpecialSymbolMap.inc
    clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc

Removed: 
    


################################################################################
diff  --git a/clang/lib/Tooling/Inclusions/Stdlib/CSpecialSymbolMap.inc 
b/clang/lib/Tooling/Inclusions/Stdlib/CSpecialSymbolMap.inc
index a515f69ea6a8c..9902fd4caf018 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/CSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/CSpecialSymbolMap.inc
@@ -12,3 +12,17 @@ SYMBOL(size_t, None, <string.h>)
 SYMBOL(size_t, None, <time.h>)
 SYMBOL(size_t, None, <uchar.h>)
 SYMBOL(size_t, None, <wchar.h>)
+
+// These macros trigger ambiguity when parsing cppreference index.
+// Taken from https://en.cppreference.com/w/c/types/integer.
+SYMBOL(INT8_C, None, <stdint.h>)
+SYMBOL(INT16_C, None, <stdint.h>)
+SYMBOL(INT32_C, None, <stdint.h>)
+SYMBOL(INT64_C, None, <stdint.h>)
+SYMBOL(INTMAX_C, None, <stdint.h>)
+
+SYMBOL(UINT8_C, None, <stdint.h>)
+SYMBOL(UINT16_C, None, <stdint.h>)
+SYMBOL(UINT32_C, None, <stdint.h>)
+SYMBOL(UINT64_C, None, <stdint.h>)
+SYMBOL(UINTMAX_C, None, <stdint.h>)

diff  --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc 
b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
index 0a332c99dd49f..44ad4a0d96844 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc
@@ -822,3 +822,27 @@ SYMBOL(SCNxMAX, None, <cinttypes>)
 SYMBOL(SCNxMAX, None, <inttypes.h>)
 SYMBOL(SCNxPTR, None, <cinttypes>)
 SYMBOL(SCNxPTR, None, <inttypes.h>)
+
+// These macros trigger ambiguity when parsing cppreference index.
+// Taken from https://en.cppreference.com/w/cpp/types/integer.
+SYMBOL(INT8_C, None, <cstdint>)
+SYMBOL(INT8_C, None, <stdint.h>)
+SYMBOL(INT16_C, None, <cstdint>)
+SYMBOL(INT16_C, None, <stdint.h>)
+SYMBOL(INT32_C, None, <cstdint>)
+SYMBOL(INT32_C, None, <stdint.h>)
+SYMBOL(INT64_C, None, <cstdint>)
+SYMBOL(INT64_C, None, <stdint.h>)
+SYMBOL(INTMAX_C, None, <cstdint>)
+SYMBOL(INTMAX_C, None, <stdint.h>)
+
+SYMBOL(UINT8_C, None, <cstdint>)
+SYMBOL(UINT8_C, None, <stdint.h>)
+SYMBOL(UINT16_C, None, <cstdint>)
+SYMBOL(UINT16_C, None, <stdint.h>)
+SYMBOL(UINT32_C, None, <cstdint>)
+SYMBOL(UINT32_C, None, <stdint.h>)
+SYMBOL(UINT64_C, None, <cstdint>)
+SYMBOL(UINT64_C, None, <stdint.h>)
+SYMBOL(UINTMAX_C, None, <cstdint>)
+SYMBOL(UINTMAX_C, None, <stdint.h>)


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to