llvm-project/clang/lib/AST
Leonard Chan db01c3adc6 [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals
This diff includes the logic for setting the precision bits for each primary fixed point type in the target info and logic for initializing a fixed point literal.

Fixed point literals are declared using the suffixes

```
hr: short _Fract
uhr: unsigned short _Fract
r: _Fract
ur: unsigned _Fract
lr: long _Fract
ulr: unsigned long _Fract
hk: short _Accum
uhk: unsigned short _Accum
k: _Accum
uk: unsigned _Accum
```
Errors are also thrown for illegal literal values

```
unsigned short _Accum u_short_accum = 256.0uhk;   // expected-error{{the integral part of this literal is too large for this unsigned _Accum type}}
```

Differential Revision: https://reviews.llvm.org/D46915

llvm-svn: 335148
2018-06-20 17:19:40 +00:00
..
APValue.cpp [ExprConstant] Use an AST node and a version number as a key to create 2018-04-10 05:15:01 +00:00
ASTConsumer.cpp Move LocInfoType from Sema to AST. 2016-02-01 17:42:01 +00:00
ASTContext.cpp [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals 2018-06-20 17:19:40 +00:00
ASTDiagnostic.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
ASTDumper.cpp [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals 2018-06-20 17:19:40 +00:00
ASTImporter.cpp [ASTImporter] Corrected lookup at import of templated record decl 2018-05-30 09:19:26 +00:00
ASTStructuralEquivalence.cpp Track the result of evaluating a computed noexcept specification on the 2018-05-03 03:58:32 +00:00
ASTTypeTraits.cpp Teach clang-query to dump types. I couldn't find any existing tests for clang-query's dumping functionality. =( 2016-11-02 23:57:18 +00:00
AttrImpl.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
CMakeLists.txt [C++2a] Implement operator<=> CodeGen and ExprConstant 2018-05-07 21:07:10 +00:00
CXXABI.h Fix __has_unique_object_representations implementation 2017-11-30 16:37:02 +00:00
CXXInheritance.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
Comment.cpp [AST] Look through attribute type locs when searching for function type 2017-04-26 12:46:27 +00:00
CommentBriefParser.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
CommentCommandTraits.cpp
CommentLexer.cpp [AST] Added a helper to extract a user-friendly text of a comment. 2018-05-16 12:30:09 +00:00
CommentParser.cpp [cleanup] Remove excessive padding from TextTokenRetokenizer::Position 2016-09-20 18:32:48 +00:00
CommentSema.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
ComparisonCategories.cpp [C++2a] Implement operator<=>: Address bugs and post-commit review comments after r331677. 2018-05-08 00:52:19 +00:00
DataCollection.cpp [analyzer] Make StmtDataCollector customizable 2017-08-23 16:28:26 +00:00
Decl.cpp [CUDA] Allow "extern __shared__ Foo foo[]" within anon. namespaces. 2018-05-17 16:15:07 +00:00
DeclBase.cpp Move VersionTuple from clang/Basic to llvm/Support 2018-06-11 10:28:04 +00:00
DeclCXX.cpp [c++17] If a class inherits virtual functions from a base class, it is 2018-06-14 20:03:22 +00:00
DeclFriend.cpp [AST] Fix some Clang-tidy modernize-use-auto warnings; other minor fixes (NFC). 2018-04-03 00:11:50 +00:00
DeclGroup.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-10 00:59:22 +00:00
DeclObjC.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
DeclOpenMP.cpp [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file 2018-06-01 13:04:26 +00:00
DeclPrinter.cpp [Attr] Don't print implicit attributes 2018-05-15 22:16:47 +00:00
DeclTemplate.cpp Revert rC330794 and some dependent tiny bug fixes 2018-04-26 00:42:40 +00:00
DeclarationName.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-21 23:26:08 +00:00
Expr.cpp [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals 2018-06-20 17:19:40 +00:00
ExprCXX.cpp Track the result of evaluating a computed noexcept specification on the 2018-05-03 03:58:32 +00:00
ExprClassification.cpp [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals 2018-06-20 17:19:40 +00:00
ExprConstant.cpp [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals 2018-06-20 17:19:40 +00:00
ExprObjC.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-30 22:33:48 +00:00
ExternalASTMerger.cpp [ASTImporter] avoid warnings: unused var, switch covered 2018-01-26 12:06:44 +00:00
ExternalASTSource.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-08 00:39:18 +00:00
InheritViz.cpp
ItaniumCXXABI.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
ItaniumMangle.cpp [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals 2018-06-20 17:19:40 +00:00
Linkage.h Give external linkage and mangling to lambdas inside inline variables and variable templates. 2017-09-22 04:25:05 +00:00
Mangle.cpp [modules ts] Ensure that module linkage variables are always emitted and always have their name mangled. 2017-09-07 00:55:55 +00:00
MicrosoftCXXABI.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
MicrosoftMangle.cpp [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents 2018-06-14 14:53:51 +00:00
NSAPI.cpp [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents 2018-06-14 14:53:51 +00:00
NestedNameSpecifier.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
ODRHash.cpp [ODRHash] Adjust info stored for FunctionTemplateDecl. 2018-06-07 00:20:58 +00:00
OpenMPClause.cpp [OPENMP] Code cleanup and code improvements. 2018-04-18 15:57:46 +00:00
ParentMap.cpp [analyzer] Correctly model iteration through "nil" objects 2018-03-08 02:53:39 +00:00
QualTypeNames.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
RawCommentList.cpp [AST] Added a helper to extract a user-friendly text of a comment. 2018-05-16 12:30:09 +00:00
RecordLayout.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-10 00:59:22 +00:00
RecordLayoutBuilder.cpp Maintain PS4 ABI compatibility by making the fix made in r331136 not apply when the target is the PS4. 2018-05-18 21:51:46 +00:00
SelectorLocationsKind.cpp
Stmt.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
StmtCXX.cpp [coroutines] Add serialization/deserialization of coroutines 2017-07-25 18:01:49 +00:00
StmtIterator.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-21 23:26:08 +00:00
StmtObjC.cpp Retire llvm::alignOf in favor of C++11 alignof. 2016-10-20 14:27:22 +00:00
StmtOpenMP.cpp [OPENMP] Add support for cancel constructs in `target teams distribute 2017-11-22 21:12:03 +00:00
StmtPrinter.cpp [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals 2018-06-20 17:19:40 +00:00
StmtProfile.cpp [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals 2018-06-20 17:19:40 +00:00
StmtViz.cpp
TemplateBase.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
TemplateName.cpp Fix a couple of cases where we would fail to correctly parse deduced class template specialization types. 2018-02-28 03:02:23 +00:00
Type.cpp [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals 2018-06-20 17:19:40 +00:00
TypeLoc.cpp [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents 2018-06-14 14:53:51 +00:00
TypePrinter.cpp [AST] Print correct tag decl for tag specifier 2018-05-14 19:36:45 +00:00
VTTBuilder.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-12-01 22:04:49 +00:00
VTableBuilder.cpp Fix a mangling failure on clang-cl C++17 2018-05-17 18:12:18 +00:00