diff options
author | Leonard Chan <leonardchan@google.com> | 2018-08-06 16:05:08 +0000 |
---|---|---|
committer | Leonard Chan <leonardchan@google.com> | 2018-08-06 16:05:08 +0000 |
commit | c03642e9a86d9ed128676d5405a1906282d727ad (patch) | |
tree | c221a392e0bf810a25b78cc0f46c89c8525c0c48 /clang/include | |
parent | 0d1b3934e27f72f706345678204a87f72007ed64 (diff) | |
download | bcm5719-llvm-c03642e9a86d9ed128676d5405a1906282d727ad.tar.gz bcm5719-llvm-c03642e9a86d9ed128676d5405a1906282d727ad.zip |
[Fixed Point Arithmetic] Fix for FixedPointValueToString
- Print negative numbers correctly
- Handle APInts of different sizes
- Add formal unit tests for FixedPointValueToString
- Add tests for checking correct printing when padding is set
- Restrict to printing in radix 10 since that's all we need for now
Differential Revision: https://reviews.llvm.org/D49945
llvm-svn: 339026
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/AST/Type.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index e89aefb8771..cda84b19fa9 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -6604,9 +6604,8 @@ QualType DecayedType::getPointeeType() const { // Get the decimal string representation of a fixed point type, represented // as a scaled integer. -void FixedPointValueToString(SmallVectorImpl<char> &Str, - const llvm::APSInt &Val, - unsigned Scale, unsigned Radix); +void FixedPointValueToString(SmallVectorImpl<char> &Str, llvm::APSInt Val, + unsigned Scale); } // namespace clang |