leonardchan (Leonard Chan)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 25 2018, 1:47 PM (15 w, 6 d)

Recent Activity

Mon, Aug 13

leonardchan added inline comments to D49511: [Sema/Attribute] Check for noderef attribute.
Mon, Aug 13, 2:42 PM · Restricted Project
leonardchan updated the diff for D49511: [Sema/Attribute] Check for noderef attribute.
  • Remove sugar from pointee types
Mon, Aug 13, 2:42 PM · Restricted Project
leonardchan added a comment to D49511: [Sema/Attribute] Check for noderef attribute.

@rsmith

Mon, Aug 13, 12:14 PM · Restricted Project
leonardchan updated the diff for D49511: [Sema/Attribute] Check for noderef attribute.
  • Checks for sugared types and expressions wrapped in parenthesis
Mon, Aug 13, 11:19 AM · Restricted Project

Sun, Aug 12

leonardchan added a dependency for D50616: [Fixed Point Arithmetic] FixedPointCast: D46917: [Fixed Point Arithmetic] Comparison and Unary Operations for Fixed Point Types.
Sun, Aug 12, 2:49 PM · Restricted Project
leonardchan added a dependent revision for D46917: [Fixed Point Arithmetic] Comparison and Unary Operations for Fixed Point Types: D50616: [Fixed Point Arithmetic] FixedPointCast.
Sun, Aug 12, 2:49 PM · Restricted Project
leonardchan created D50616: [Fixed Point Arithmetic] FixedPointCast.
Sun, Aug 12, 2:48 PM · Restricted Project

Thu, Aug 9

leonardchan added a comment to D49511: [Sema/Attribute] Check for noderef attribute.

@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.

Thu, Aug 9, 5:51 PM · Restricted Project
leonardchan accepted D48908: [clang-doc] Pass over function-internal declarations.
Thu, Aug 9, 5:17 PM · Restricted Project
leonardchan accepted D43424: [clang-doc] Implement a (simple) Markdown generator.
Thu, Aug 9, 4:56 PM · Restricted Project
leonardchan accepted D48909: [clang-doc] Update BitcodeReader to use llvm::Error.
Thu, Aug 9, 2:43 PM · Restricted Project
leonardchan added a comment to D48909: [clang-doc] Update BitcodeReader to use llvm::Error.

Should there be any tests associated with these changes?

Thu, Aug 9, 2:34 PM · Restricted Project

Tue, Aug 7

leonardchan committed rL339167: [Sema] Fix for crash on conditional operation with address_space pointer.
[Sema] Fix for crash on conditional operation with address_space pointer
Tue, Aug 7, 12:44 PM
leonardchan committed rC339167: [Sema] Fix for crash on conditional operation with address_space pointer.
[Sema] Fix for crash on conditional operation with address_space pointer
Tue, Aug 7, 12:44 PM
leonardchan closed D50278: [Sema] Fix for crash on conditional operation with address_space pointer.
Tue, Aug 7, 12:44 PM · Restricted Project
leonardchan closed D50278: [Sema] Fix for crash on conditional operation with address_space pointer.
Tue, Aug 7, 12:44 PM · Restricted Project
leonardchan added inline comments to D50278: [Sema] Fix for crash on conditional operation with address_space pointer.
Tue, Aug 7, 11:27 AM · Restricted Project
leonardchan updated the diff for D50278: [Sema] Fix for crash on conditional operation with address_space pointer.
  • Removed checks for OpenCL in checkConditionalPointerCompatibility. This allows for the error err_typecheck_op_on_nonoverlapping_address_space_pointers to be dumped on getting pointers with different address spaces instead of the warning ext_typecheck_cond_incompatible_pointers.
Tue, Aug 7, 11:27 AM · Restricted Project

Mon, Aug 6

leonardchan updated the diff for D49511: [Sema/Attribute] Check for noderef attribute.
  • Changed tick to single quote in diagnostic
Mon, Aug 6, 3:29 PM · Restricted Project
leonardchan updated the diff for D50278: [Sema] Fix for crash on conditional operation with address_space pointer.
  • Replaced instances of a pointer type mismatch warning involving 2 conditional operands with different address spaces with a new error specifically for this situation.
Mon, Aug 6, 3:09 PM · Restricted Project
leonardchan added a comment to D50278: [Sema] Fix for crash on conditional operation with address_space pointer.

I would expect this to replace the existing warning, not to appear together with it.

Mon, Aug 6, 1:30 PM · Restricted Project
leonardchan committed rL339044: Fix for broken build on clang-hexagon-elf for ambiguous call to.
Fix for broken build on clang-hexagon-elf for ambiguous call to
Mon, Aug 6, 12:31 PM
leonardchan committed rC339044: Fix for broken build on clang-hexagon-elf for ambiguous call to.
Fix for broken build on clang-hexagon-elf for ambiguous call to
Mon, Aug 6, 12:31 PM
leonardchan committed rL339038: Removed the OverflowConversionsToFract tests for now. Will add them back.
Removed the OverflowConversionsToFract tests for now. Will add them back
Mon, Aug 6, 11:03 AM
leonardchan committed rC339038: Removed the OverflowConversionsToFract tests for now. Will add them back.
Removed the OverflowConversionsToFract tests for now. Will add them back
Mon, Aug 6, 11:02 AM
leonardchan committed rC339037: Fix for failing test from sanitizer-x86_64-linux-fast where there was a.
Fix for failing test from sanitizer-x86_64-linux-fast where there was a
Mon, Aug 6, 10:56 AM
leonardchan committed rL339037: Fix for failing test from sanitizer-x86_64-linux-fast where there was a.
Fix for failing test from sanitizer-x86_64-linux-fast where there was a
Mon, Aug 6, 10:56 AM
leonardchan added a comment to D48661: [Fixed Point Arithmetic] Fixed Point Constant.

Just a nit but could you please add new-lines to your commit messages.

Mon, Aug 6, 10:10 AM · Restricted Project
leonardchan committed rC339028: [Fixed Point Arithmetic] Fixed Point Constant.
[Fixed Point Arithmetic] Fixed Point Constant
Mon, Aug 6, 9:43 AM
leonardchan committed rL339028: [Fixed Point Arithmetic] Fixed Point Constant.
[Fixed Point Arithmetic] Fixed Point Constant
Mon, Aug 6, 9:43 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Mon, Aug 6, 9:43 AM · Restricted Project
leonardchan updated the diff for D48661: [Fixed Point Arithmetic] Fixed Point Constant.
  • Fixed Accumum names
Mon, Aug 6, 9:36 AM · Restricted Project
leonardchan updated the summary of D50278: [Sema] Fix for crash on conditional operation with address_space pointer.
Mon, Aug 6, 9:22 AM · Restricted Project
leonardchan updated the diff for D50278: [Sema] Fix for crash on conditional operation with address_space pointer.
  • Changed diff such that an error is dumped instead. The code shouldn't compile in the first place since it involves conversion between pointers from different address_spaces.
Mon, Aug 6, 9:22 AM · Restricted Project
leonardchan committed rL339026: [Fixed Point Arithmetic] Fix for FixedPointValueToString.
[Fixed Point Arithmetic] Fix for FixedPointValueToString
Mon, Aug 6, 9:05 AM
leonardchan committed rC339026: [Fixed Point Arithmetic] Fix for FixedPointValueToString.
[Fixed Point Arithmetic] Fix for FixedPointValueToString
Mon, Aug 6, 9:05 AM
leonardchan closed D49945: [Fixed Point Arithmetic] Fix for FixedPointValueToString.
Mon, Aug 6, 9:05 AM · Restricted Project
leonardchan added inline comments to D49945: [Fixed Point Arithmetic] Fix for FixedPointValueToString.
Mon, Aug 6, 8:53 AM · Restricted Project

Fri, Aug 3

leonardchan updated the summary of D50278: [Sema] Fix for crash on conditional operation with address_space pointer.
Fri, Aug 3, 3:59 PM · Restricted Project
leonardchan created D50278: [Sema] Fix for crash on conditional operation with address_space pointer.
Fri, Aug 3, 3:57 PM · Restricted Project

Tue, Jul 31

leonardchan updated the diff for D49511: [Sema/Attribute] Check for noderef attribute.
  • Moved the counter and set into ExpressionEvaluationContextRecord
Tue, Jul 31, 5:11 PM · Restricted Project
leonardchan added a comment to D49511: [Sema/Attribute] Check for noderef attribute.

Your current counter-based approach doesn't work very well in the case where we switch to another context while processing an expression (for example, during template instantiation): you'll defer all the diagnostics for the inner construct until the outer construct is complete. Generally global Sema state doesn't work very well for this reason.

Tue, Jul 31, 4:20 PM · Restricted Project
leonardchan added a comment to D49511: [Sema/Attribute] Check for noderef attribute.

You shouldn't be adding your own ExpressionEvaluationContextRecords. What I was suggesting is that you store a list of pending noderef expressions on the record, and diagnose them when the record is popped (if they've not been removed since).

This is what I initially tried but the last record left on the stack, which is what I add them to, wasn't getting popped. While parsing, the stack of records (from what I've observed) has only one record that doesn't get popped via PopExpressionEvaluationContext. I'm still looking into ways to try to do this though.

Tue, Jul 31, 3:51 PM · Restricted Project
leonardchan updated the diff for D49511: [Sema/Attribute] Check for noderef attribute.
  • Added tests for checking that noderef can only be used for C style pointers and arrays (not usable for references or ObjC pointers)
  • Added warnings for dereferencing a noderef expression where we cannot trace back the original declrefexpr.
  • Added warning for adding noderef on a type that noderef cannot be attatched to.
  • Added warning group.
  • Use SmallPtrSet instead of std::unordered_set
Tue, Jul 31, 3:42 PM · Restricted Project

Fri, Jul 27

leonardchan updated the summary of D49945: [Fixed Point Arithmetic] Fix for FixedPointValueToString.
Fri, Jul 27, 3:26 PM · Restricted Project
leonardchan created D49945: [Fixed Point Arithmetic] Fix for FixedPointValueToString.
Fri, Jul 27, 3:25 PM · Restricted Project

Thu, Jul 26

leonardchan added reviewers for D49876: [Fixed Point Arithmetic] Addition of intrinsic/builtin functions: phosek, mcgrathr.
Thu, Jul 26, 3:15 PM · Restricted Project
leonardchan created D49878: [Fixed Point Arithmetic] Fixed Point log2(), log10(), and pow().
Thu, Jul 26, 3:15 PM · Restricted Project
leonardchan created D49876: [Fixed Point Arithmetic] Addition of intrinsic/builtin functions.
Thu, Jul 26, 3:10 PM · Restricted Project

Wed, Jul 25

leonardchan added a comment to D49511: [Sema/Attribute] Check for noderef attribute.

@aaron.ballman @rsmith Any more feedback on this patch?

Wed, Jul 25, 5:35 PM · Restricted Project

Mon, Jul 23

leonardchan added inline comments to D49511: [Sema/Attribute] Check for noderef attribute.
Mon, Jul 23, 10:56 AM · Restricted Project
leonardchan updated the diff for D49511: [Sema/Attribute] Check for noderef attribute.
Mon, Jul 23, 10:55 AM · Restricted Project

Fri, Jul 20

leonardchan added a comment to D49511: [Sema/Attribute] Check for noderef attribute.

The way in which you're checking for the problematic cases is unnecessarily expensive. Instead of performing a separate AST traversal, please detect whether you should be producing the warning directly when forming the problematic expressions. (For example, you could store a list of pending "dereference of noderef" expressions in the ExpressionEvaluationContextRecord, remove items from the list if you find they're the operand of a unary address-of operator, and diagnose any remaining items once you've left the evaluation context.)

Fri, Jul 20, 4:20 PM · Restricted Project
leonardchan updated the diff for D49511: [Sema/Attribute] Check for noderef attribute.
Fri, Jul 20, 4:20 PM · Restricted Project

Thu, Jul 19

leonardchan updated the diff for D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Thu, Jul 19, 8:52 AM · Restricted Project

Wed, Jul 18

leonardchan added a reviewer for D49511: [Sema/Attribute] Check for noderef attribute: rsmith.
Wed, Jul 18, 4:47 PM · Restricted Project
leonardchan updated the diff for D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Wed, Jul 18, 4:06 PM · Restricted Project
leonardchan updated the diff for D49511: [Sema/Attribute] Check for noderef attribute.
  • Added checks for expressions in statements other than declarations or expression statements
Wed, Jul 18, 3:48 PM · Restricted Project
leonardchan created D49511: [Sema/Attribute] Check for noderef attribute.
Wed, Jul 18, 2:48 PM · Restricted Project

Tue, Jul 17

leonardchan committed rL337289: [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as….
[Fixed Point Arithmetic] Fix for bug where integer literals could be treated as…
Tue, Jul 17, 8:04 AM
leonardchan committed rC337289: [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as….
[Fixed Point Arithmetic] Fix for bug where integer literals could be treated as…
Tue, Jul 17, 8:04 AM
leonardchan closed D49327: [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as fixed point literals.
Tue, Jul 17, 8:03 AM · Restricted Project

Jul 13 2018

leonardchan added a comment to D48661: [Fixed Point Arithmetic] Fixed Point Constant.

@ebevhan Any followup on the patch/my previous comments?

Jul 13 2018, 3:54 PM · Restricted Project
leonardchan updated the summary of D49327: [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as fixed point literals.
Jul 13 2018, 3:51 PM · Restricted Project
leonardchan added a comment to D46915: [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals.

@erichkeane I created a patch at https://reviews.llvm.org/D49327 with the fix for this and added you as a reviewer.

Jul 13 2018, 3:50 PM · Restricted Project
leonardchan created D49327: [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as fixed point literals.
Jul 13 2018, 3:49 PM · Restricted Project
leonardchan added a comment to D46915: [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals.

See this bug here: https://bugs.llvm.org/show_bug.cgi?id=38161

This patch doesn't seem to properly consider integers, and ignores octals, which I suspect shouldn't be the case.

Jul 13 2018, 12:33 PM · Restricted Project

Jul 6 2018

leonardchan added inline comments to D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Jul 6 2018, 3:46 PM · Restricted Project
leonardchan updated the diff for D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Jul 6 2018, 3:46 PM · Restricted Project

Jul 3 2018

leonardchan updated the diff for D48661: [Fixed Point Arithmetic] Fixed Point Constant.
  • Renamed fixedPointSemantics to FixedPointSemantics and hid the members behind getters
Jul 3 2018, 4:53 PM · Restricted Project
leonardchan added inline comments to D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Jul 3 2018, 8:53 AM · Restricted Project
leonardchan updated the diff for D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Jul 3 2018, 8:51 AM · Restricted Project

Jul 2 2018

leonardchan added inline comments to D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Jul 2 2018, 4:14 PM · Restricted Project
leonardchan updated the diff for D48661: [Fixed Point Arithmetic] Fixed Point Constant.
  • Added tests
  • Moved all conversion logic into convert
  • Saturation is checked by checking the bits above the sign bit in the destination type
Jul 2 2018, 4:11 PM · Restricted Project

Jun 29 2018

leonardchan committed rL335993: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag.
[Fixed Point Arithmetic] Rename `-fsame-fbits` flag
Jun 29 2018, 10:13 AM
leonardchan committed rC335993: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag.
[Fixed Point Arithmetic] Rename `-fsame-fbits` flag
Jun 29 2018, 10:13 AM
leonardchan closed D48727: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag.
Jun 29 2018, 10:13 AM · Restricted Project

Jun 28 2018

leonardchan added inline comments to D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Jun 28 2018, 4:46 PM · Restricted Project
leonardchan updated the diff for D48661: [Fixed Point Arithmetic] Fixed Point Constant.
  • Renamed to APFixedPoint
  • Added FixedPointSemantics to represent saturation and whether or not padding is involved. Similar to APFloatSemantics, this indicated how the underlying APSInt passed to this will be used (ie. is the MSB padding or not).
Jun 28 2018, 4:46 PM · Restricted Project
leonardchan added a comment to D48727: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag.

Oh, having the same number of fractional bits is what leads to unsigned types having one bit of padding, and vice versa.

Jun 28 2018, 9:50 AM · Restricted Project
leonardchan updated the diff for D48727: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag.

Formatting and forgot to get rid of Group<f_Group> and Flags<CC1Option>

Jun 28 2018, 8:57 AM · Restricted Project
leonardchan added inline comments to D46915: [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals.
Jun 28 2018, 8:50 AM · Restricted Project
leonardchan created D48727: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag.
Jun 28 2018, 8:47 AM · Restricted Project

Jun 27 2018

leonardchan added a dependency for D48661: [Fixed Point Arithmetic] Fixed Point Constant: D48456: [Fixed Point Arithmetic] Casting between fixed point types and other arithmetic types.
Jun 27 2018, 10:36 AM · Restricted Project
leonardchan added a dependent revision for D48456: [Fixed Point Arithmetic] Casting between fixed point types and other arithmetic types: D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Jun 27 2018, 10:36 AM · Restricted Project
leonardchan removed a dependency for D48456: [Fixed Point Arithmetic] Casting between fixed point types and other arithmetic types: D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Jun 27 2018, 10:35 AM · Restricted Project
leonardchan removed a dependent revision for D48661: [Fixed Point Arithmetic] Fixed Point Constant: D48456: [Fixed Point Arithmetic] Casting between fixed point types and other arithmetic types.
Jun 27 2018, 10:35 AM · Restricted Project
leonardchan added a dependent revision for D48661: [Fixed Point Arithmetic] Fixed Point Constant: D48456: [Fixed Point Arithmetic] Casting between fixed point types and other arithmetic types.
Jun 27 2018, 10:35 AM · Restricted Project
leonardchan added a dependency for D48456: [Fixed Point Arithmetic] Casting between fixed point types and other arithmetic types: D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Jun 27 2018, 10:35 AM · Restricted Project
leonardchan created D48661: [Fixed Point Arithmetic] Fixed Point Constant.
Jun 27 2018, 10:34 AM · Restricted Project

Jun 22 2018

leonardchan updated the diff for D48456: [Fixed Point Arithmetic] Casting between fixed point types and other arithmetic types.
  • Add test case for fix where 0.0r would resolve as -1 when creating a fixed point literal.
Jun 22 2018, 11:33 AM · Restricted Project

Jun 21 2018

leonardchan updated the diff for D48456: [Fixed Point Arithmetic] Casting between fixed point types and other arithmetic types.
Jun 21 2018, 2:50 PM · Restricted Project
leonardchan removed a dependent revision for D46926: [Fixed Point Arithmetic] Conversion between Fixed Point and Floating Point Numbers: D46925: [Fixed Point Arithmetic] Remaining Binary Operations on Primary Fixed Point Types.
Jun 21 2018, 2:48 PM · Restricted Project
leonardchan added a dependent revision for D46927: [Fixed Point Arithmetic] Augmented Assignment for Fixed Point Types: D46925: [Fixed Point Arithmetic] Remaining Binary Operations on Primary Fixed Point Types.
Jun 21 2018, 2:48 PM · Restricted Project
leonardchan added a dependency for D46925: [Fixed Point Arithmetic] Remaining Binary Operations on Primary Fixed Point Types: D46927: [Fixed Point Arithmetic] Augmented Assignment for Fixed Point Types.
Jun 21 2018, 2:48 PM · Restricted Project
leonardchan removed a dependency for D46925: [Fixed Point Arithmetic] Remaining Binary Operations on Primary Fixed Point Types: D46926: [Fixed Point Arithmetic] Conversion between Fixed Point and Floating Point Numbers.
Jun 21 2018, 2:48 PM · Restricted Project
leonardchan abandoned D46926: [Fixed Point Arithmetic] Conversion between Fixed Point and Floating Point Numbers.

The logic in this patch is moved to https://reviews.llvm.org/D48456

Jun 21 2018, 2:48 PM · Restricted Project
leonardchan removed a dependent revision for D46927: [Fixed Point Arithmetic] Augmented Assignment for Fixed Point Types: D46926: [Fixed Point Arithmetic] Conversion between Fixed Point and Floating Point Numbers.
Jun 21 2018, 2:48 PM · Restricted Project
leonardchan removed a dependency for D46926: [Fixed Point Arithmetic] Conversion between Fixed Point and Floating Point Numbers: D46927: [Fixed Point Arithmetic] Augmented Assignment for Fixed Point Types.
Jun 21 2018, 2:48 PM · Restricted Project
leonardchan updated the summary of D48456: [Fixed Point Arithmetic] Casting between fixed point types and other arithmetic types.
Jun 21 2018, 2:44 PM · Restricted Project