Page MenuHomePhabricator

arichardson (Alexander Richardson)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 4 2015, 4:18 PM (263 w, 6 d)

Recent Activity

Yesterday

arichardson added inline comments to D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option.
Thu, Sep 24, 3:45 PM · Restricted Project
arichardson added inline comments to D88239: [clang-format] Fix spaces around */& in multi-variable declarations.
Thu, Sep 24, 3:31 PM · Restricted Project
arichardson added a comment to D88252: z_Linux_asm.S modifications for arm64 (AARCH64) for Darwin/macOS.

For CHERI-extended architectures (RISCV,MIPS,AArch64), we need .size to get sensible bounds on pointers. While we don't support any of this code yet, keeping existing .size directives would be good.

Thu, Sep 24, 1:52 PM · Restricted Project, Restricted Project
arichardson updated the diff for D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option.
  • Add a multi-variable-decl test (depends on D88239)
Thu, Sep 24, 9:21 AM · Restricted Project
arichardson requested review of D88239: [clang-format] Fix spaces around */& in multi-variable declarations.
Thu, Sep 24, 9:20 AM · Restricted Project
arichardson updated the diff for D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option.

merge if with existing condition

Thu, Sep 24, 7:15 AM · Restricted Project
arichardson added inline comments to D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option.
Thu, Sep 24, 7:02 AM · Restricted Project
arichardson added inline comments to D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option.
Thu, Sep 24, 7:01 AM · Restricted Project
arichardson requested review of D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option.
Thu, Sep 24, 6:48 AM · Restricted Project

Mon, Sep 21

arichardson committed rGaa85c6f2a528: [compiler-rt] Fix atomic support functions on 32-bit architectures (authored by arichardson).
[compiler-rt] Fix atomic support functions on 32-bit architectures
Mon, Sep 21, 2:22 AM
arichardson committed rG8cf6778d3040: [RISC-V] Implement RISCVInstrInfo::isCopyInstrImpl() (authored by arichardson).
[RISC-V] Implement RISCVInstrInfo::isCopyInstrImpl()
Mon, Sep 21, 2:22 AM
arichardson closed D86510: [compiler-rt] Fix atomic support functions on 32-bit architectures.
Mon, Sep 21, 2:21 AM · Restricted Project
arichardson closed D86522: [RISC-V] Implement RISCVInstrInfo::isCopyInstrImpl().
Mon, Sep 21, 2:21 AM · Restricted Project

Thu, Sep 17

arichardson added a comment to D83004: [UpdateCCTestChecks] Include generated functions if asked.

I think this approach seems fine, just a few very minor comments inlines.

Thu, Sep 17, 4:19 PM · Restricted Project, Restricted Project
arichardson added a comment to D86522: [RISC-V] Implement RISCVInstrInfo::isCopyInstrImpl().

I was hoping others would chime in regarding what instructions should be handled in this hook.

@arichardson How do you feel about removing the ORI/XORI and landing this patch? (I also have no major objections to just landing as is). We can always further improve it later. Ideally this would add tests, but if that's not easy I think it's OK to land it as is.

Thu, Sep 17, 1:57 AM · Restricted Project
arichardson added inline comments to D83004: [UpdateCCTestChecks] Include generated functions if asked.
Thu, Sep 17, 1:51 AM · Restricted Project, Restricted Project
arichardson added a comment to D83004: [UpdateCCTestChecks] Include generated functions if asked.

Maybe add another test that checks for the @__cxx_global_var_init() constructor function?
E.g. something like this:

int init_func(int arg) {
    return arg + 1;
}
Thu, Sep 17, 1:43 AM · Restricted Project, Restricted Project

Wed, Sep 16

arichardson added inline comments to D87352: Fix typo.
Wed, Sep 16, 6:45 AM · Restricted Project

Mon, Sep 7

arichardson added a comment to D48803: Place the BlockAddress type in the program address space.

@dylanmckay does this change look good to you now?

Mon, Sep 7, 2:29 AM · Restricted Project
arichardson updated the summary of D48803: Place the BlockAddress type in the program address space.
Mon, Sep 7, 2:28 AM · Restricted Project
arichardson updated the diff for D86510: [compiler-rt] Fix atomic support functions on 32-bit architectures.

Use 0 instead of NULL and fix broken alignment check

Mon, Sep 7, 2:11 AM · Restricted Project
arichardson committed rG05147d330917: [clang-format] Correctly parse function declarations with TypenameMacros (authored by arichardson).
[clang-format] Correctly parse function declarations with TypenameMacros
Mon, Sep 7, 2:10 AM
arichardson committed rG9a22eba15091: [clang-format] Parse __underlying_type(T) as a type (authored by arichardson).
[clang-format] Parse __underlying_type(T) as a type
Mon, Sep 7, 2:10 AM
arichardson committed rG56fa7d1dc6a8: [clang-format] Fix formatting of _Atomic() qualifier (authored by arichardson).
[clang-format] Fix formatting of _Atomic() qualifier
Mon, Sep 7, 2:10 AM
arichardson committed rGcd01eec14bc0: [clang-format] Check that */& after typename macros are pointers/references (authored by arichardson).
[clang-format] Check that */& after typename macros are pointers/references
Mon, Sep 7, 2:10 AM
arichardson closed D87007: [clang-format] Correctly parse function declarations with TypenameMacros.
Mon, Sep 7, 2:10 AM · Restricted Project
arichardson committed rG8aa3b8da5db2: [clang-format] Handle typename macros inside cast expressions (authored by arichardson).
[clang-format] Handle typename macros inside cast expressions
Mon, Sep 7, 2:10 AM
arichardson committed rGe7bd058c7e2c: [clang-format] Allow configuring list of macros that map to attributes (authored by arichardson).
[clang-format] Allow configuring list of macros that map to attributes
Mon, Sep 7, 2:10 AM
arichardson closed D86960: [clang-format] Parse __underlying_type(T) as a type.
Mon, Sep 7, 2:10 AM · Restricted Project
arichardson closed D86959: [clang-format] Fix formatting of _Atomic() qualifier.
Mon, Sep 7, 2:10 AM · Restricted Project
arichardson closed D86950: [clang-format] Check that */& after typename macros are pointers/references.
Mon, Sep 7, 2:09 AM · Restricted Project
arichardson closed D86930: [clang-format] Handle typename macros inside cast expressions.
Mon, Sep 7, 2:09 AM · Restricted Project
arichardson closed D86782: [clang-format] Allow configuring list of macros that map to attributes.
Mon, Sep 7, 2:09 AM · Restricted Project
arichardson added inline comments to D87028: [clang-format] Improve heuristic for detecting function declarations.
Mon, Sep 7, 1:52 AM · Restricted Project

Fri, Sep 4

arichardson updated the diff for D86510: [compiler-rt] Fix atomic support functions on 32-bit architectures.

Use the lock-free code when

a) atomic ops of that size are always lock-free
b) aligned atomics ops are lock-free and the pointer is aligned
Fri, Sep 4, 9:38 AM · Restricted Project
arichardson updated the diff for D86782: [clang-format] Allow configuring list of macros that map to attributes.

fix configuration parsing test

Fri, Sep 4, 9:15 AM · Restricted Project
arichardson committed rG2108bceceb5e: FormatTest: Provide real line number in failure messages (authored by arichardson).
FormatTest: Provide real line number in failure messages
Fri, Sep 4, 8:58 AM
arichardson committed rGe0ff5a8410ea: [clang-format] Add a test showing the current config file list parsing (authored by arichardson).
[clang-format] Add a test showing the current config file list parsing
Fri, Sep 4, 8:58 AM
arichardson committed rG8c810acc94ed: [clang-format] Parse __ptr32/__ptr64 as a pointer qualifier (authored by arichardson).
[clang-format] Parse __ptr32/__ptr64 as a pointer qualifier
Fri, Sep 4, 8:58 AM
arichardson closed D86926: FormatTest: Provide real line number in failure messages.
Fri, Sep 4, 8:58 AM · Restricted Project
arichardson closed D86941: [clang-format] Add a test showing the current config file list parsing.
Fri, Sep 4, 8:58 AM · Restricted Project
arichardson closed D86775: [clang-format] Parse __ptr32/__ptr64 as a pointer qualifier.
Fri, Sep 4, 8:58 AM · Restricted Project
arichardson added a comment to D84625: Execute llvm-lit with the python found by CMake by default.

This puts #!/usr/bin/python3.8 instead of #!/usr/bin/env python3.8 in llvm-bulid/bin/llvm-lit (in a cmake build). That seems undesirable?

Fri, Sep 4, 7:26 AM · Restricted Project

Wed, Sep 2

arichardson committed rGd70e05c9e36a: [clang-format] Parse double-square attributes as pointer qualifiers (authored by arichardson).
[clang-format] Parse double-square attributes as pointer qualifiers
Wed, Sep 2, 10:35 AM
arichardson closed D86721: [clang-format] Parse double-square attributes as pointer qualifiers.
Wed, Sep 2, 10:35 AM · Restricted Project
arichardson updated the diff for D86960: [clang-format] Parse __underlying_type(T) as a type.

rebase to keep dependent revisions happy

Wed, Sep 2, 10:34 AM · Restricted Project
arichardson updated the diff for D86959: [clang-format] Fix formatting of _Atomic() qualifier.
  • fix test
Wed, Sep 2, 10:33 AM · Restricted Project
arichardson updated the diff for D87028: [clang-format] Improve heuristic for detecting function declarations.

fix tests

Wed, Sep 2, 10:31 AM · Restricted Project
arichardson requested review of D87028: [clang-format] Improve heuristic for detecting function declarations.
Wed, Sep 2, 7:17 AM · Restricted Project
arichardson updated the diff for D86960: [clang-format] Parse __underlying_type(T) as a type.

rebase

Wed, Sep 2, 5:25 AM · Restricted Project
arichardson updated the diff for D86959: [clang-format] Fix formatting of _Atomic() qualifier.
  • use valid C++ syntax in the test case
Wed, Sep 2, 5:23 AM · Restricted Project
arichardson updated the diff for D87007: [clang-format] Correctly parse function declarations with TypenameMacros.
  • fix formatting of test case
Wed, Sep 2, 5:19 AM · Restricted Project
arichardson updated the diff for D87006: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield.
  • remove unncessary cast+check
Wed, Sep 2, 5:18 AM · Restricted Project
arichardson requested review of D87007: [clang-format] Correctly parse function declarations with TypenameMacros.
Wed, Sep 2, 5:15 AM · Restricted Project
arichardson requested review of D87006: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield.
Wed, Sep 2, 5:10 AM · Restricted Project
arichardson added a comment to D86930: [clang-format] Handle typename macros inside cast expressions.

I am a beginner to compiler, interesting in how to write Unit Test case for change so I ran it, but found difference with my expection.

You mentioned
Before: x = (STACK_OF(uint64_t)) & a;
After: x = (STACK_OF(uint64_t))&a;

Your input test data is identical with the expected data. Does this exactly you need? Attach with a screenshot for your reference.

Wed, Sep 2, 3:12 AM · Restricted Project

Tue, Sep 1

arichardson updated the diff for D84345: [AMDGPU] Set the default globals address space to 1.

clang-format

Tue, Sep 1, 11:38 AM · Restricted Project, Restricted Project
arichardson added a comment to D86713: [clang-format] Parse nullability attributes as a pointer qualifier.

LGTM, again assuming tests pass locally (patch did not resolve).

Out of curiosity, is _Atomic on your radar? I found some code in clang proper that handled restrict and _Atomic together. C/C++ have way too many qualifiers...

I have not looked at _Atomic yet and it's probably low priority for me unless it's a trivial change.
My main motivation with these changes is to format a __capability pointer qualifier correctly (an extension that we add for our out-of-tree CHERI C/C++ dialect).

I don't know of anyone who uses it yet, so just adding it for posterity, definitely not a blocker. Were you planning on handling __capability directly or in a user-configurable option? I can imagine other ad-hoc pointer qualifiers specific to static analysis tools or as properly-ifdef'd aliases of __attribute__(...), so an option might be useful.

I'm not sure yet what the best solution is. I was thinking of either

a) option to treat double-underscore prefixed strings after `*/&` as qualifiers (probably on by default, but not sure about that).
b) adding a config option with a list of strings that should be treated as qualifiers
c) Adding a new __capability keyword to clang-format since it already includes things such as Qt-specific keywords.
d) Option b) but with __capability included in the default list of qualifiers.
Tue, Sep 1, 11:26 AM · Restricted Project
arichardson updated the diff for D48803: Place the BlockAddress type in the program address space.

clang-format

Tue, Sep 1, 11:18 AM · Restricted Project
arichardson updated the diff for D48803: Place the BlockAddress type in the program address space.

Rebase on latest master and merge suggestions

Tue, Sep 1, 11:15 AM · Restricted Project
arichardson committed rG7be868292166: [tsan] Fix "failed to intercept sysctlnametomib" on FreeBSD (authored by arichardson).
[tsan] Fix "failed to intercept sysctlnametomib" on FreeBSD
Tue, Sep 1, 10:26 AM
arichardson closed D85292: [tsan] Fix "failed to intercept sysctlnametomib" on FreeBSD.
Tue, Sep 1, 10:25 AM · Restricted Project
arichardson requested review of D86960: [clang-format] Parse __underlying_type(T) as a type.
Tue, Sep 1, 10:14 AM · Restricted Project
arichardson requested review of D86959: [clang-format] Fix formatting of _Atomic() qualifier.
Tue, Sep 1, 10:10 AM · Restricted Project
arichardson requested review of D86950: [clang-format] Check that */& after typename macros are pointers/references.
Tue, Sep 1, 8:16 AM · Restricted Project
arichardson updated the diff for D86926: FormatTest: Provide real line number in failure messages.
  • fix missing argument
Tue, Sep 1, 8:12 AM · Restricted Project
arichardson updated the diff for D86782: [clang-format] Allow configuring list of macros that map to attributes.
  • Add test for config parsing
Tue, Sep 1, 8:10 AM · Restricted Project
arichardson added inline comments to D86926: FormatTest: Provide real line number in failure messages.
Tue, Sep 1, 8:02 AM · Restricted Project
arichardson updated the diff for D86782: [clang-format] Allow configuring list of macros that map to attributes.
  • fix name of key in config file
Tue, Sep 1, 7:54 AM · Restricted Project
arichardson added a comment to D86782: [clang-format] Allow configuring list of macros that map to attributes.

The documentation currently shows __capability being included, but from looking at this patch does the configuration file not append (which I think makes sense, at least for __capability) rather than replace?

Tue, Sep 1, 7:53 AM · Restricted Project
arichardson requested review of D86941: [clang-format] Add a test showing the current config file list parsing.
Tue, Sep 1, 7:52 AM · Restricted Project
arichardson added a comment to D86782: [clang-format] Allow configuring list of macros that map to attributes.

I'm wondering if this could be used to help the CUDA usages of clang-format

Tue, Sep 1, 7:07 AM · Restricted Project
arichardson added inline comments to D86926: FormatTest: Provide real line number in failure messages.
Tue, Sep 1, 7:05 AM · Restricted Project
arichardson requested review of D86930: [clang-format] Handle typename macros inside cast expressions.
Tue, Sep 1, 5:02 AM · Restricted Project
arichardson updated the diff for D86782: [clang-format] Allow configuring list of macros that map to attributes.

fix formatting and rebase

Tue, Sep 1, 3:36 AM · Restricted Project
arichardson updated the diff for D86775: [clang-format] Parse __ptr32/__ptr64 as a pointer qualifier.

rebase and add one more testcase

Tue, Sep 1, 3:35 AM · Restricted Project
arichardson requested review of D86926: FormatTest: Provide real line number in failure messages.
Tue, Sep 1, 3:34 AM · Restricted Project
arichardson updated the diff for D86721: [clang-format] Parse double-square attributes as pointer qualifiers.

add test case with argument

Tue, Sep 1, 3:28 AM · Restricted Project
arichardson updated the diff for D86522: [RISC-V] Implement RISCVInstrInfo::isCopyInstrImpl().

Drop additional cases, keeping only the ones also listed in isAsCheapAsAMove().

Tue, Sep 1, 2:57 AM · Restricted Project

Fri, Aug 28

arichardson requested review of D86782: [clang-format] Allow configuring list of macros that map to attributes.
Fri, Aug 28, 6:07 AM · Restricted Project
arichardson requested review of D86775: [clang-format] Parse __ptr32/__ptr64 as a pointer qualifier.
Fri, Aug 28, 4:36 AM · Restricted Project
arichardson updated the summary of D86721: [clang-format] Parse double-square attributes as pointer qualifiers.
Fri, Aug 28, 3:33 AM · Restricted Project
arichardson committed rG96824abe7d80: [clang-format] Detect pointer qualifiers in cast expressions (authored by arichardson).
[clang-format] Detect pointer qualifiers in cast expressions
Fri, Aug 28, 3:32 AM
arichardson committed rGd304360decef: [clang-format] Parse nullability attributes as a pointer qualifier (authored by arichardson).
[clang-format] Parse nullability attributes as a pointer qualifier
Fri, Aug 28, 3:32 AM
arichardson committed rG37cdabdb82e3: [clang-format] Parse __attribute((foo)) as a pointer qualifier (authored by arichardson).
[clang-format] Parse __attribute((foo)) as a pointer qualifier
Fri, Aug 28, 3:32 AM
arichardson committed rG4f103695646b: [clang-format] Parse restrict as a pointer qualifier (authored by arichardson).
[clang-format] Parse restrict as a pointer qualifier
Fri, Aug 28, 3:32 AM
arichardson closed D86716: [clang-format] Detect pointer qualifiers in cast expressions.
Fri, Aug 28, 3:32 AM · Restricted Project
arichardson committed rG1908da2658fc: [clang-format] Parse volatile as a pointer qualifier (authored by arichardson).
[clang-format] Parse volatile as a pointer qualifier
Fri, Aug 28, 3:32 AM
arichardson closed D86713: [clang-format] Parse nullability attributes as a pointer qualifier.
Fri, Aug 28, 3:32 AM · Restricted Project
arichardson closed D86711: [clang-format] Parse __attribute((foo)) as a pointer qualifier.
Fri, Aug 28, 3:32 AM · Restricted Project
arichardson closed D86710: [clang-format] Parse restrict as a pointer qualifier.
Fri, Aug 28, 3:32 AM · Restricted Project
arichardson closed D86708: [clang-format] Parse volatile as a pointer qualifier.
Fri, Aug 28, 3:32 AM · Restricted Project
arichardson added inline comments to D86711: [clang-format] Parse __attribute((foo)) as a pointer qualifier.
Fri, Aug 28, 2:57 AM · Restricted Project
arichardson updated the diff for D86721: [clang-format] Parse double-square attributes as pointer qualifiers.

drop unnecesssary const

Fri, Aug 28, 2:56 AM · Restricted Project
arichardson updated the diff for D86716: [clang-format] Detect pointer qualifiers in cast expressions.

drop unncessary const from test

Fri, Aug 28, 2:55 AM · Restricted Project

Thu, Aug 27

arichardson added a comment to D86713: [clang-format] Parse nullability attributes as a pointer qualifier.

LGTM, again assuming tests pass locally (patch did not resolve).

Out of curiosity, is _Atomic on your radar? I found some code in clang proper that handled restrict and _Atomic together. C/C++ have way too many qualifiers...

I have not looked at _Atomic yet and it's probably low priority for me unless it's a trivial change.
My main motivation with these changes is to format a __capability pointer qualifier correctly (an extension that we add for our out-of-tree CHERI C/C++ dialect).

I don't know of anyone who uses it yet, so just adding it for posterity, definitely not a blocker. Were you planning on handling __capability directly or in a user-configurable option? I can imagine other ad-hoc pointer qualifiers specific to static analysis tools or as properly-ifdef'd aliases of __attribute__(...), so an option might be useful.

Thu, Aug 27, 9:03 AM · Restricted Project
arichardson added inline comments to D86711: [clang-format] Parse __attribute((foo)) as a pointer qualifier.
Thu, Aug 27, 8:48 AM · Restricted Project
arichardson requested review of D86721: [clang-format] Parse double-square attributes as pointer qualifiers.
Thu, Aug 27, 8:47 AM · Restricted Project
arichardson added a comment to D86713: [clang-format] Parse nullability attributes as a pointer qualifier.

LGTM, again assuming tests pass locally (patch did not resolve).

Out of curiosity, is _Atomic on your radar? I found some code in clang proper that handled restrict and _Atomic together. C/C++ have way too many qualifiers...

Thu, Aug 27, 8:44 AM · Restricted Project
arichardson added a comment to D86710: [clang-format] Parse restrict as a pointer qualifier.

LGTM, assuming tests pass (automated checks failed to resolve your patch since you based it off of your other one). Looks like enabling C99 should have no other effects, right?

Thu, Aug 27, 8:17 AM · Restricted Project