[PATCH] D49945: [Fixed Point Arithmetic] Fix for FixedPointValueToString

2018-08-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: lib/AST/Expr.cpp:788 FixedPointValueToString( - S, llvm::APSInt::getUnsigned(getValue().getZExtValue()), Scale, Radix); + S, llvm::APSInt::getUnsigned(getValue().getZExtValue

[PATCH] D49945: [Fixed Point Arithmetic] Fix for FixedPointValueToString

2018-08-06 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. leonardchan marked an inline comment as done. Closed by commit rC339026: [Fixed Point Arithmetic] Fix for FixedPointValueToString (authored by leonardchan, committed by ). Repository: rC Clang https://reviews.llvm.org/D4

[PATCH] D50278: [Sema] Fix for crash on conditional operation with address_space pointer

2018-08-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 159315. leonardchan added reviewers: ebevhan, rjmccall. leonardchan removed a subscriber: ebevhan. leonardchan added a comment. - Changed diff such that an error is dumped instead. The code shouldn't compile in the first place since it involves conversion

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-08-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 159320. leonardchan marked an inline comment as done. leonardchan added a comment. - Fixed `Accumum` names Repository: rC Clang https://reviews.llvm.org/D48661 Files: include/clang/AST/ASTContext.h include/clang/Basic/FixedPoint.h include/clang

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-08-06 Thread Leonard Chan via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL339028: [Fixed Point Arithmetic] Fixed Point Constant (authored by leonardchan, committed by ). Herald added a subscriber:

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-08-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D48661#1189537, @bricci wrote: > Just a nit but could you please add new-lines to your commit messages. My bad, will remember this for future commits. > Also the 3 bools in FixedPointSemantics are a little bit wasteful. > I don't know h

[PATCH] D50278: [Sema] Fix for crash on conditional operation with address_space pointer

2018-08-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D50278#1189919, @rjmccall wrote: > I would expect this to replace the existing warning, not to appear together > with it. Will do. Comment at: test/Sema/conditional-expr.c:78 + // expected-error@

[PATCH] D50278: [Sema] Fix for crash on conditional operation with address_space pointer

2018-08-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 159405. leonardchan marked an inline comment as done. leonardchan added a comment. - Replaced instances of a `pointer type mismatch` warning involving 2 conditional operands with different address spaces with a new error specifically for this situation.

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 159409. leonardchan marked 3 inline comments as done. leonardchan added a comment. - Changed tick to single quote in diagnostic Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td inc

[PATCH] D50278: [Sema] Fix for crash on conditional operation with address_space pointer

2018-08-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6943 +def err_typecheck_incompatible_conditional_pointer_operands : Error< + "unable to find common type between %0 and %1 for conditional operation">; ebevhan wrote: > T

[PATCH] D50278: [Sema] Fix for crash on conditional operation with address_space pointer

2018-08-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 159559. leonardchan marked an inline comment as done. leonardchan added a comment. - Removed checks for OpenCL in `checkConditionalPointerCompatibility`. This allows for the error `err_typecheck_op_on_nonoverlapping_address_space_pointers` to be dumped o

[PATCH] D50278: [Sema] Fix for crash on conditional operation with address_space pointer

2018-08-07 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC339167: [Sema] Fix for crash on conditional operation with address_space pointer (authored by leonardchan, committed by ). Repository: rL LLVM https://reviews.llvm.org/D50278 Files: lib/Sema/SemaExp

[PATCH] D50278: [Sema] Fix for crash on conditional operation with address_space pointer

2018-08-07 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339167: [Sema] Fix for crash on conditional operation with address_space pointer (authored by leonardchan, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://revie

[PATCH] D48909: [clang-doc] Update BitcodeReader to use llvm::Error

2018-08-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Should there be any tests associated with these changes? Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:308 - llvm::errs() << "Invalid type for info.\n"; - exit(1); } Probably not important or it's just me being picky/

[PATCH] D43424: [clang-doc] Implement a (simple) Markdown generator

2018-08-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-doc/MDGenerator.cpp:79 + +void writeHeader(const Twine &Text, int Num, raw_ostream &OS) { + OS << std::string(Num, '#') + "

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. @rsmith any more feedback on this current version? If it still looks incorrect to use the record this way, I don't mind simplifying it to work on lvalue to rvalue conversions without checking for a leading address space operation. Repository: rC Clang https://re

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: ebevhan, phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch is a part of https://reviews.llvm.org/D48456 in an attempt to split them up. This contains the code for casting between fixed point types and oth

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 160403. leonardchan marked an inline comment as done. leonardchan added a comment. - Checks for sugared types and expressions wrapped in parenthesis Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/AST/Type.h include/clan

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. @rsmith Comment at: lib/Sema/SemaExpr.cpp:14249 + +if (Sema::TypeHasNoDeref(Inner)) + DeclRef = E; aaron.ballman wrote: > The sugar was stripped off at the pointer level, but not at the pointee > level. e.g., > ``` > typed

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 160451. leonardchan marked 3 inline comments as done. leonardchan added a comment. - Remove sugar from pointee types Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td include/clang/

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/Sema/SemaExpr.cpp:14249 + +if (Sema::TypeHasNoDeref(Inner)) + DeclRef = E; aaron.ballman wrote: > leonardchan wrote: > > aaron.ballman wrote: > > > The sugar was stripped off at the pointer level, but no

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 160884. leonardchan marked 3 inline comments as done. leonardchan added a comment. - Added check for if we should check for saturation when converting to a saturated fixed point type. - Replaced `llvm_unreachable()`s with temporary diagnostic to be eventu

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1016 + if (DstScale > SrcScale) { +// Need to allocate space before shifting left +ResultWidth = SrcWidth + DstScale - SrcScale; rjmccall wrote: > In IR, this isn't really "alloc

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 160892. leonardchan marked 6 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticGroups.td inc

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 160964. leonardchan marked 7 inline comments as done. leonardchan added a comment. - Reworked logic for saturation Repository: rC Clang https://reviews.llvm.org/D50616 Files: include/clang/AST/OperationKinds.def include/clang/AST/Type.h include

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1034 + if (DstFPSema.isSaturated() && + (CGF.getContext().getCorrespondingSaturatedType(SrcTy) != DstTy)) { +auto Mask = APInt::getBitsSetFrom( rjmccall wrote: > leonardchan wro

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 161087. leonardchan marked 6 inline comments as done. leonardchan added a comment. - Added separate case for conversions to a non-saturated type Repository: rC Clang https://reviews.llvm.org/D50616 Files: include/clang/AST/OperationKinds.def incl

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:331 + SourceLocation Loc); + /// Emit a conversion from the specified complex type to the specified ebevhan wrote: > What's the plan for the other conv

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D50616#1202034, @ebevhan wrote: > I think I've mentioned this before, but I would like to discuss the > possibility of adding a target hook(s) for some of these operations > (conversions, arithmetic when it comes). Precisely matching the

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 161298. leonardchan marked 4 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D50616 Files: include/clang/AST/OperationKinds.def include/clang/AST/Type.h include/clang/Basic/DiagnosticCommonKinds.td lib/AST/Expr.cpp lib/

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D50616#1203692, @ebevhan wrote: > In https://reviews.llvm.org/D50616#1203446, @leonardchan wrote: > > > Sorry I forgot to address this also. Just to make sure I understand this > > correctly since I haven't used these before: target hooks

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. I made a post on llvm-dev (http://lists.llvm.org/pipermail/llvm-dev/2018-August/125433.html) to see if other people have opinions on this. In the meantime, do you think I should make a separate patch that moves this into an LLVM intrinsic function? Repository: r

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 161785. leonardchan marked 6 inline comments as done and an inline comment as not done. Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticGroups.t

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/Parse/ParseExpr.cpp:1126 + +Actions.StartCheckingNoDeref(); + rsmith wrote: > This parser-driven start/stop mechanism will not work in C++ templates. > Instead, can you remove the "start" part and check the

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D49511#1206267, @rsmith wrote: > In https://reviews.llvm.org/D49511#1206265, @rsmith wrote: > > > In https://reviews.llvm.org/D49511#1194716, @leonardchan wrote: > > > > > @rsmith any more feedback on this current version? If it still looks

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 162126. leonardchan marked 13 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticGroups.td include/clang/Basic/Diagnosti

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/Parse/ParseExpr.cpp:1126 + +Actions.StartCheckingNoDeref(); + rsmith wrote: > leonardchan wrote: > > rsmith wrote: > > > This parser-driven start/stop mechanism will not work in C++ templates. > > > Instead,

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

2018-05-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 145993. leonardchan added a comment. - Restrict usage of fixed point types only to C https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticC

[PATCH] D46911: Addition of the remaining fixed point types and their saturated equivalents

2018-05-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added a project: clang. This diff includes changes for the remaining _Fract and _Sat fixed point types. signed short _Fract s_short_fract; signed _Fract s_fract; signed long _Fract s_long_fract; unsigned short _Fract u_short_fract; unsigned

[PATCH] D46915: Set Fixed Point Precision Bits and Create Fixed Point Literals

2018-05-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. Herald added a subscriber: mgorny. This diff includes the logic for setting the precision bits for each primary fixed point type when building clang and logic for in

[PATCH] D46917: Comparison and Unary Operations for Fixed Point Types

2018-05-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr. leonardchan added a project: clang. This patch contains logic and tests for different unary and comparison operations on fixed point types, and casting between integers and fixed point types. The operations are `=

[PATCH] D46925: Remaining Binary Operations on Primary Fixed Point Types

2018-05-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch implements the remaining arithmetic and logical operations on the primary fixed point types. The operations are `+`, `-`, `*`, `/`, `<<`, and `>>`. //

[PATCH] D46926: Conversion between Fixed Point and Floating Point Numbers

2018-05-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch has the implementation and tests for converting between fixed point and floating point numbers. The conversion process is simply dividing the fixed point

[PATCH] D46927: Augmented Assignment for Fixed Point Types

2018-05-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch contains the changes and tests for augmented assignments for primary fixed point types. s_accum = 7.5hk; s_accum2 = 2.0hk; s_accum += s_accum2; a

[PATCH] D46960: [Fixed Point Arithmetic] Predefined Precision Macros

2018-05-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch contains the addition of the precision macros for integral and fractional bits according to clause 7.18a.3 of http://www.open-std.org/jtc1/sc22/wg14/www/

[PATCH] D46963: [Fixed Point Arithmetic] Test for All Builtin Operations

2018-05-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch includes a test for checking that all supported builtin operations can be syntactically declared with fixed point types. Tests for asserting the correctn

[PATCH] D46963: [Fixed Point Arithmetic] Test for All Builtin Operations

2018-05-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147131. Repository: rC Clang https://reviews.llvm.org/D46963 Files: lib/AST/ASTContext.cpp lib/CodeGen/CGExprScalar.cpp test/Frontend/fixed_point_all_builtin_operations.c Index: test/Frontend/fixed_point_all_builtin_operations.c

[PATCH] D46979: [Fixed Point Arithmetic] Test for Conversion Between Valid Builtin Types

2018-05-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch contains changes and a test for checking that fixed point types can be converted between all other valid types. Fixed point types can be converted betwee

[PATCH] D46986: [Fixed Point Arithmetic] Validation Test for Fixed Point Binary Operations and Saturated Addition

2018-05-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch contains tests for validating the logic behind each builtin operation on fixed point types and tests on addition between saturated _Fract types. - More

[PATCH] D46987: [Fixed Point Arithmetic] Validation Test for Saturated Subtraction on Signed _Fracts

2018-05-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch includes the logic for subtraction on saturated _Fract types and a test for thm. - Also fixed incorrect minimum value for each _Fract type - Getters for

[PATCH] D46990: [Fixed Point Arithmetic] Validation Test for Saturated Multiplication

2018-05-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch contains changes for multiplication on saturated _Fract types. Since we already upcast the underlying integer for the fixed point type, we can do a simpl

[PATCH] D47016: [Fixed Point Arithmetic] Validation Test for Saturated Division and Comparison Fix

2018-05-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch includes changes for division on saturated fixed point types. Overflow occurs when the resulting value cannot fit into the number of data bits for the re

[PATCH] D47017: [Fixed Point Arithmetic] Validation Test for Saturated Shift Left, Saturated Unsigned _Fract Types, and Fix for Saturated Unsigned Addition

2018-05-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. This patch includes changes for the shift left operator involving saturated fixed point types. For unsigned shifting, overflow occurs if the number of bits we shift

[PATCH] D47030: [Fixed Point Arithmetic] Checks for Precision Macros

2018-05-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich. leonardchan added a project: clang. Herald added a subscriber: mgorny. This patch includes checks that the precision macros used for the fixed point fractional and integral bits meet the requirements f

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

2018-05-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147386. leonardchan added a comment. Ran git-clang-tidy on all affected files Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/

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

2018-05-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147400. leonardchan added a comment. Added break. We still assign `Result` since it cannot be null at the end of the switch stmt, though the value doesn't matter. Added character `~` to indicate fixed point type followed by string detailing the type. I

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

2018-05-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked 2 inline comments as done. leonardchan added inline comments. Comment at: lib/Index/USRGeneration.cpp:691 +case BuiltinType::ULongAccum: + llvm_unreachable("No USR name mangling for fixed point types."); case BuiltinType::Float16:

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

2018-05-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147406. leonardchan marked an inline comment as done. leonardchan added a comment. Undid git-clang-formatting on ASTBitcodes.h Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h in

[PATCH] D46911: [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents

2018-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147541. leonardchan added a comment. Updated formatting Repository: rC Clang https://reviews.llvm.org/D46911 Files: include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticSemaKinds.td include/clang/Bas

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

2018-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147549. Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/Specifiers.h incl

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

2018-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147560. Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/Specifiers.h incl

[PATCH] D46911: [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents

2018-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147566. Repository: rC Clang https://reviews.llvm.org/D46911 Files: include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/Specifiers.h include/clang/Basic/TokenKinds.d

[PATCH] D46911: [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents

2018-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147568. Repository: rC Clang https://reviews.llvm.org/D46911 Files: include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/Specifiers.h include/clang/Basic/TokenKinds.d

[PATCH] D46915: [Fixed Point Arithmetic] Set Fixed Point Precision Bits and Create Fixed Point Literals

2018-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147595. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46915 Files: CMakeLists.txt cmake/modules/InitFixedPointBits.cmake include/clang/AST/Expr.h include/clang/AST/OperationKinds.def include/clang/AS

[PATCH] D46917: [Fixed Point Arithmetic] Comparison and Unary Operations for Fixed Point Types

2018-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147631. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46917 Files: lib/CodeGen/CGExprScalar.cpp lib/Sema/SemaExpr.cpp test/Frontend/fixed_point_declarations.c test/Frontend/fixed_point_validation.c In

[PATCH] D46925: [Fixed Point Arithmetic] Remaining Binary Operations on Primary Fixed Point Types

2018-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147880. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46925 Files: include/clang/AST/ASTContext.h include/clang/AST/OperationKinds.def include/clang/AST/Type.h lib/AST/ASTContext.cpp lib/AST/Expr.cpp

[PATCH] D46926: [Fixed Point Arithmetic] Conversion between Fixed Point and Floating Point Numbers

2018-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147881. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46926 Files: include/clang/AST/OperationKinds.def include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Expr.cpp lib/AST/ExprConstant.cpp lib/CodeGe

[PATCH] D46927: [Fixed Point Arithmetic] Augmented Assignment for Fixed Point Types

2018-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147882. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46927 Files: include/clang/AST/Type.h lib/AST/Type.cpp lib/CodeGen/CGExprScalar.cpp lib/Sema/SemaExpr.cpp test/Frontend/fixed_point_validation.c

[PATCH] D46960: [Fixed Point Arithmetic] Predefined Precision Macros

2018-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147883. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46960 Files: include/clang/Lex/Preprocessor.h lib/Lex/PPMacroExpansion.cpp test/Frontend/fixed_point_builtin_macros.c Index: test/Frontend/fixed_poi

[PATCH] D46963: [Fixed Point Arithmetic] Test for All Builtin Operations

2018-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147888. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46963 Files: lib/AST/ASTContext.cpp lib/CodeGen/CGExprScalar.cpp test/Frontend/fixed_point_all_builtin_operations.c Index: test/Frontend/fixed_point

[PATCH] D46979: [Fixed Point Arithmetic] Test for Conversion Between Valid Builtin Types

2018-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147902. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46979 Files: include/clang/AST/OperationKinds.def lib/AST/Expr.cpp lib/AST/ExprConstant.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CGExprAgg.cpp li

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

2018-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148025. Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/Specifiers.h incl

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

2018-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked 2 inline comments as done. leonardchan added inline comments. Comment at: lib/Index/USRGeneration.cpp:731 + + if (c == '~') { +switch (BT->getKind()) { jakehehrlich wrote: > You can make the 'c' a Twine instead. That will let you i

[PATCH] D46986: [Fixed Point Arithmetic] Validation Test for Fixed Point Binary Operations and Saturated Addition

2018-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148116. leonardchan added a comment. - formatting - Running `lli` threw a segfault in the test, though this was probably because it was using whatever hist jit was available to optimize the code instead of just interpreting it. Forcing it just interpret

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

2018-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148117. leonardchan marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticCommonKind

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

2018-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148121. Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/Specifiers.h incl

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

2018-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148148. leonardchan added a comment. pulled changes from source tree Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/Dia

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

2018-05-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a subscriber: sammccall. leonardchan added inline comments. Comment at: include/clang/Basic/DiagnosticCommonKinds.td:172 +def err_fixed_point_only_allowed_in_c : Error< + "Fixed point types are only allowed in C">; rsmith wrote: > Diagnostics

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

2018-05-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: include/clang/Basic/DiagnosticCommonKinds.td:172 +def err_fixed_point_only_allowed_in_c : Error< + "Fixed point types are only allowed in C">; leonardchan wrote: > rsmith wrote: > > Diagnostics should not be capit

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

2018-05-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: include/clang/Basic/DiagnosticCommonKinds.td:172 +def err_fixed_point_only_allowed_in_c : Error< + "Fixed point types are only allowed in C">; leonardchan wrote: > leonardchan wrote: > > rsmith wrote: > > > Diagno

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

2018-05-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. After further discussion, we think the best approach for now would be only supporting fixed point types in C, then go back and support C++ once there is a standardized way for mangling the fixed point types under itanium. Repository: rC Clang https://reviews.llv

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

2018-05-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148445. leonardchan added a comment. - Reverted changes involving name mangling since we will only support c++ for now. Will concurrently raise an issue on https://github.com/itanium-cxx-abi/cxx-abi/ to get characters for name mangling. - Added a flag th

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

2018-05-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked 6 inline comments as done. leonardchan added inline comments. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:2684 // Types added here must also be added to EmitFundamentalRTTIDescriptors. switch (Ty->getKind()) { rsmith wrote: > Note this co

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

2018-05-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148452. Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/LangOptions.def i

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

2018-05-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148481. leonardchan marked 2 inline comments as done. leonardchan added a comment. - Added test case for `_Bool _Accum` - Getters for the `_Accum` bit widths return values for their corresponding integral types (ie. `sizeof(short _Accum) == sizeof(short)`

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

2018-05-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D46084#374, @jfb wrote: > Can you also add a test for `_Bool _Accum`. > > Also, `-enable-fixed-point -x c++` failing. . Done. Also the failing c++ case is under `test/Frontend/fixed_point_errors.cpp` Repository: rC Clang https://

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

2018-05-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148506. leonardchan added a comment. Re-added individual getters/members for _Accum types Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def in

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

2018-05-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: include/clang/Basic/TargetInfo.h:382 +// enough bits to fit the minumum. +if (getIntWidth() < MinSignedAccumDataBits) + return getLongWidth(); ebevhan wrote: > I'm not sure I agree with this interpretati

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

2018-05-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148637. leonardchan added a comment. Changed flag names Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticCommon

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

2018-05-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked 2 inline comments as done. leonardchan added inline comments. Comment at: include/clang/Driver/Options.td:882 +def enable_fixed_point : Flag<["-", "--"], "enable-fixed-point">, Group, + Flags<[CC1Option]>, HelpText<"Enable fixed point

[PATCH] D46911: [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents

2018-05-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148918. leonardchan marked 4 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D46911 Files: include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/AST/Type.h include/clang/Basic/DiagnosticSemaKinds

[PATCH] D46911: [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents

2018-05-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/Sema/SemaType.cpp:1430 } else { - switch (DS.getTypeSpecWidth()) { -case DeclSpec::TSW_short: - Result = Context.UnsignedShortAccumTy; - break; -case DeclSpec::TSW_unspecified: -

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

2018-05-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi all, I think I've addressed all comments on this patch and will be committing tomorrow morning unless anyone has any more comments they'd like to bring up. Repository: rC Clang https://reviews.llvm.org/D46084 ___

[PATCH] D51229: [Sema/Attribute] Make types declared with address_space an AttributedType

2018-08-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: rjmccall, rsmith, phosek, mcgrathr, ebevhan, theraven. leonardchan added a project: clang. Currently an address_space is stored in a qualifier. This makes any type declared with an address_space attribute in the form `__attribute__

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. @rsmith ping Repository: rC Clang https://reviews.llvm.org/D49511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51229: [Sema/Attribute] Make types declared with address_space an AttributedType

2018-08-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 162487. leonardchan marked 3 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D51229 Files: include/clang/Basic/Attr.td lib/AST/TypePrinter.cpp lib/Sema/SemaType.cpp Index: lib/Sema/SemaType.cpp ===

[PATCH] D51229: [Sema/Attribute] Make types declared with address_space an AttributedType

2018-08-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 162515. leonardchan marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D51229 Files: include/clang/Basic/Attr.td lib/AST/TypePrinter.cpp lib/Sema/SemaType.cpp Index: lib/Sema/SemaType.cpp ===

[PATCH] D51229: [Sema/Attribute] Make types declared with address_space an AttributedType

2018-08-27 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 162711. leonardchan marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D51229 Files: include/clang/Basic/Attr.td lib/AST/TypePrinter.cpp lib/Sema/SemaType.cpp Index: lib/Sema/SemaType.cpp

[PATCH] D51229: [Sema/Attribute] Make types declared with address_space an AttributedType

2018-08-27 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340765: [Sema/Attribute] Make types declared with address_space an AttributedType (authored by leonardchan, committed by ). Repository: rC Clang https://reviews.llvm.org/D51229 Files: include/clang/

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-27 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: rsmith, rjmccall, ebevhan, mcgrathr, phosek. leonardchan added a project: clang. If an `address_space` attribute is defined in a macro, print the macro instead when diagnosing a warning or error for incompatible pointers with differe

  1   2   3   4   5   6   7   8   9   >