[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

Bevin Hansson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 23 00:29:45 PDT 2018


ebevhan added inline comments.


================
Comment at: lib/AST/ASTContext.cpp:1775
+    case BuiltinType::UShortAccum:
       Width = Target->getShortWidth();
       Align = Target->getShortAlign();
----------------
Please give the types their own width and alignment accessors/variables in TargetInfo and use those instead of reusing the existing ones.


================
Comment at: lib/Sema/SemaType.cpp:1395
+  case DeclSpec::TST_accum: {
+    if (S.getLangOpts().CPlusPlus) {
+      S.Diag(DS.getTypeSpecTypeLoc(), diag::err_fixed_point_only_allowed_in_c);
----------------
This (and the rest of the fixed-point support) should be behind its own option. The error should reflect this as well.


Repository:
  rC Clang

https://reviews.llvm.org/D46084





More information about the cfe-commits mailing list