aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2011-10-27 08:29:09 +0000
committerHans Wennborg <hans@hanshq.net>2011-10-27 08:29:09 +0000
commit29e97cb35fab314388f62b68fefa78947e93c1dc (patch)
treeef30883ed59f503100b456acf04d5f319e176cea /include/clang
parent98a9203d80b6a5ff90edf037b1595f553fc81b15 (diff)
Teach format string analysis that "%zu" means size_t.
The code had it backwards, thinking size_t was signed, and using that for "%zd". Also let the analysis get the types for (u)intmax_t while we are at it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143099 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/ASTContext.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index a8590b2983..0a608707d5 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -835,6 +835,14 @@ public:
/// in <stddef.h>. The sizeof operator requires this (C99 6.5.3.4p4).
CanQualType getSizeType() const;
+ /// getIntMaxType - Return the unique type for "intmax_t" (C99 7.18.1.5),
+ /// defined in <stdint.h>.
+ CanQualType getIntMaxType() const;
+
+ /// getUIntMaxType - Return the unique type for "uintmax_t" (C99 7.18.1.5),
+ /// defined in <stdint.h>.
+ CanQualType getUIntMaxType() const;
+
/// getWCharType - In C++, this returns the unique wchar_t type. In C99, this
/// returns a type compatible with the type defined in <stddef.h> as defined
/// by the target.
@@ -848,7 +856,7 @@ public:
/// Used when in C++, as a GCC extension.
QualType getUnsignedWCharType() const;
- /// getPointerDiffType - Return the unique type for "ptrdiff_t" (ref?)
+ /// getPointerDiffType - Return the unique type for "ptrdiff_t" (C99 7.17)
/// defined in <stddef.h>. Pointer - pointer requires this (C99 6.5.6p9).
QualType getPointerDiffType() const;