Page MenuHomePhabricator

sammccall (Sam McCall)
UserAdministrator

Projects

User does not belong to any projects.

User Details

User Since
Aug 26 2016, 6:53 AM (343 w, 4 d)
Roles
Administrator

Recent Activity

Yesterday

sammccall added inline comments to D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.
Mon, Mar 27, 4:24 AM · Restricted Project, Restricted Project
sammccall updated the diff for D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.

Only show the filename, not the full path, to avoid overflowing the box

Mon, Mar 27, 1:07 AM · Restricted Project, Restricted Project
sammccall updated the diff for D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.

Address Dmitri's comments
Update demo link

Mon, Mar 27, 1:06 AM · Restricted Project, Restricted Project
sammccall committed rGe884e005f363: [dataflow] Delete legacy aliases (authored by sammccall).
[dataflow] Delete legacy aliases
Mon, Mar 27, 12:30 AM · Restricted Project, Restricted Project
sammccall closed D146864: [dataflow] Delete legacy aliases.
Mon, Mar 27, 12:30 AM · Restricted Project, Restricted Project

Fri, Mar 24

sammccall requested review of D146864: [dataflow] Delete legacy aliases.
Fri, Mar 24, 8:45 PM · Restricted Project, Restricted Project
sammccall committed rGcc4e774d5b45: [Analysis] Fix use-after-scope in CFGElement dump (authored by sammccall).
[Analysis] Fix use-after-scope in CFGElement dump
Fri, Mar 24, 8:33 PM · Restricted Project, Restricted Project
sammccall committed rGd630134f1f1f: [dataflow] handle missing case in value debug strings (authored by sammccall).
[dataflow] handle missing case in value debug strings
Fri, Mar 24, 8:28 PM · Restricted Project, Restricted Project
sammccall closed D146625: [dataflow] handle missing case in value debug strings.
Fri, Mar 24, 8:28 PM · Restricted Project, Restricted Project
sammccall updated the diff for D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.

revert accidental edit

Fri, Mar 24, 8:07 PM · Restricted Project, Restricted Project
sammccall updated the diff for D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.

Move data into JSON object, render into DOM with templates.

Fri, Mar 24, 8:05 PM · Restricted Project, Restricted Project

Thu, Mar 23

sammccall planned changes to D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.

Going to have a go at passing data via JSON

Thu, Mar 23, 6:18 AM · Restricted Project, Restricted Project
sammccall updated the diff for D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.

Address all comments except moving data from HTML => JSON

Thu, Mar 23, 6:18 AM · Restricted Project, Restricted Project
sammccall added inline comments to D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.
Thu, Mar 23, 6:17 AM · Restricted Project, Restricted Project
sammccall committed rG48f97e575137: [FlowSensitive] Log analysis progress for debugging purposes (authored by sammccall).
[FlowSensitive] Log analysis progress for debugging purposes
Thu, Mar 23, 3:43 AM · Restricted Project, Restricted Project
sammccall closed D144730: [FlowSensitive] Log analysis progress for debugging purposes.
Thu, Mar 23, 3:43 AM · Restricted Project, Restricted Project

Wed, Mar 22

sammccall added inline comments to D144730: [FlowSensitive] Log analysis progress for debugging purposes.
Wed, Mar 22, 10:09 AM · Restricted Project, Restricted Project
sammccall updated the diff for D144730: [FlowSensitive] Log analysis progress for debugging purposes.

address review comments

Wed, Mar 22, 10:09 AM · Restricted Project, Restricted Project
sammccall added a comment to D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.

While I am OK with this approach, I wonder if it would be too much work to split the HTML generation and emitting data up. E.g., the logger could emit YAML or JSON that could be parsed by a python script to create the HTML (or the HTML itself could use JS to parse it and generate the DOM).

Wed, Mar 22, 9:55 AM · Restricted Project, Restricted Project
sammccall published D146625: [dataflow] handle missing case in value debug strings for review.
Wed, Mar 22, 7:48 AM · Restricted Project, Restricted Project
sammccall updated the diff for D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.

Use a process-shared counter for HTML output filenames to avoid clobbering.

Wed, Mar 22, 6:25 AM · Restricted Project, Restricted Project
sammccall committed rGee2cd606abd9: [dataflow] Log flow condition to the correct stream. (authored by sammccall).
[dataflow] Log flow condition to the correct stream.
Wed, Mar 22, 2:58 AM · Restricted Project, Restricted Project
sammccall closed D146527: [dataflow] Log flow condition to the correct stream..
Wed, Mar 22, 2:57 AM · Restricted Project, Restricted Project

Tue, Mar 21

sammccall added a comment to D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.

Added a bunch of reviewers for feedback on how this should work.

Tue, Mar 21, 4:12 PM · Restricted Project, Restricted Project
sammccall added reviewers for D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state: gribozavr2, xazax.hun, sgatev, ymandel.
Tue, Mar 21, 4:01 PM · Restricted Project, Restricted Project
sammccall requested review of D146591: [dataflow] add HTML logger: browse code/cfg/analysis timeline/state.
Tue, Mar 21, 3:52 PM · Restricted Project, Restricted Project
sammccall added a comment to D144730: [FlowSensitive] Log analysis progress for debugging purposes.

I love such debugging facilities! They're a massive boost to developer productivity compared to ad-hoc debug prints, and they allow new contributors to study how the tool works. I'm excited to see how this thing turns out.

Tue, Mar 21, 3:26 PM · Restricted Project, Restricted Project
sammccall added a reviewer for D144730: [FlowSensitive] Log analysis progress for debugging purposes: xazax.hun.

Thanks! I cleaned up a bit and added tests, as well as a -dataflow-log flag to make this easy to access when running unit tests, tidy checks etc.
The HTML experiments seem to have validated that the logging API is sufficient to produce something useful there.

Tue, Mar 21, 11:36 AM · Restricted Project, Restricted Project
sammccall updated the diff for D144730: [FlowSensitive] Log analysis progress for debugging purposes.

Address review comments
Added -dataflow-log flag to enable logging without code changes
Removed example tool from this patch

Tue, Mar 21, 11:29 AM · Restricted Project, Restricted Project
sammccall added a comment to D145843: [clangd] Add option to always insert headers with <> instead of "".

My understanding is that a more elaborate configuration scheme has been proposed in https://github.com/clangd/clangd/issues/1367, and the feedback there was (quoting Sam from this comment):
The approach taken in this patch seemed to me to be in line with this direction of a "simple config-based solution".

I am afraid this approach is a little "too simple". The intent on @sammccall 's comment there is probably around getting rid of the re-writing of include spellings completely, not for specifying quoted or system includes based on the include spelling.
Even if not, I feel like my argument above still applies. I still can't think of many projects benefiting from always using angles/quotes for include spellings.

Tue, Mar 21, 7:59 AM · Restricted Project, Restricted Project
sammccall requested review of D146527: [dataflow] Log flow condition to the correct stream..
Tue, Mar 21, 7:35 AM · Restricted Project, Restricted Project

Mon, Mar 20

sammccall added a reviewer for D146490: [Support] On Windows, ensure that UniqueID is really stable: kadircet.
Mon, Mar 20, 9:27 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Mon, Mar 13

sammccall accepted D145921: [clangd] Add missing unittests to build graph.

doh, thanks!

Mon, Mar 13, 5:01 AM · Restricted Project, Restricted Project

Wed, Mar 8

sammccall added a comment to D124351: [Clang] Implement Change scope of lambda trailing-return-type.

Sorry for the delay, extracting the repro from the build system seems about as much work as minimizing it :-)

- running repro.sh hits an assert for me on the main.cpp compile.

Wed, Mar 8, 8:32 AM · Restricted Project, Restricted Project

Tue, Mar 7

sammccall added a comment to D124351: [Clang] Implement Change scope of lambda trailing-return-type.

We're seeing new clang crashes that bisect to this commit, with modules only.

Tue, Mar 7, 9:52 AM · Restricted Project, Restricted Project
sammccall added a comment to D145228: [clangd] Add clangd headers to install targets.

If someone wants to work on producing a more modular, component-based design, that's probably a good idea (but tricky to get right). Probably a good place to start is working out what pieces can be moved into separate libraries with e.g. a coherent layering story, thinking about how they might be reused in other tools etc.

Tue, Mar 7, 4:51 AM · Restricted Project, Restricted Project

Mon, Mar 6

sammccall added a comment to D145244: [clang-format] Add ability to trace tokens..

Oops, sorry for the noise.

Mon, Mar 6, 3:05 AM · Restricted Project, Restricted Project
sammccall added a comment to D145228: [clangd] Add clangd headers to install targets.

The install target for clang distributes the clangd static libs

I don't think this was ever intended, looks like an accidental side-effect of using LLVM's many cmake macros.
Can we fix this instead?

Why not allow people building custom clangd outside of LLVM repo?

Mon, Mar 6, 2:23 AM · Restricted Project, Restricted Project
sammccall added inline comments to D145244: [clang-format] Add ability to trace tokens..
Mon, Mar 6, 1:58 AM · Restricted Project, Restricted Project
sammccall added a comment to D145302: [clangd] Add library for clangd main function.

IIUC we want to link some extra targets into the clangd binary in order to provide extra clang-tidy checks, but *don't* want to customize the binary further.
(The latter can be useful, but this interface isn't sufficient for it).

Mon, Mar 6, 1:44 AM · Restricted Project, Restricted Project
sammccall added a comment to D145228: [clangd] Add clangd headers to install targets.

The install target for clang distributes the clangd static libs

Mon, Mar 6, 1:41 AM · Restricted Project, Restricted Project
sammccall added a reviewer for D145228: [clangd] Add clangd headers to install targets: kadircet.
Mon, Mar 6, 1:40 AM · Restricted Project, Restricted Project

Mon, Feb 27

sammccall added a comment to D140794: [ASTMatcher] Add coroutineBodyStmt matcher.

It seems pretty weird to me that the two child edges from functiondecl -> coroutinebodystmt -> compoundstmt are both called "body".

Mon, Feb 27, 4:26 PM · Restricted Project, Restricted Project

Feb 24 2023

sammccall added a comment to D144730: [FlowSensitive] Log analysis progress for debugging purposes.

I wanted to share this to get some initial thoughts as we'd discussed debuggability a while ago.
As mentioned I'd at least want to get a reasonable HTML report before moving forward with it though.

Feb 24 2023, 8:36 AM · Restricted Project, Restricted Project
sammccall added reviewers for D144730: [FlowSensitive] Log analysis progress for debugging purposes: gribozavr2, ymandel.
Feb 24 2023, 8:35 AM · Restricted Project, Restricted Project
sammccall added a comment to D144170: [clang-format] Add simple macro replacements in formatting..

Still LG

Feb 24 2023, 6:45 AM · Restricted Project, Restricted Project, Restricted Project
sammccall updated the diff for D144730: [FlowSensitive] Log analysis progress for debugging purposes.

Fix colors, log source

Feb 24 2023, 6:04 AM · Restricted Project, Restricted Project
sammccall added a comment to D144730: [FlowSensitive] Log analysis progress for debugging purposes.

Example textual log (though better with colors):

=== Beginning data flow analysis ===
int target(int x) {
    while (x > 0)
        {
            --x;
        }
    return x + 1;
}
Feb 24 2023, 6:03 AM · Restricted Project, Restricted Project
sammccall updated the diff for D144730: [FlowSensitive] Log analysis progress for debugging purposes.

A little more docs

Feb 24 2023, 5:51 AM · Restricted Project, Restricted Project
sammccall requested review of D144730: [FlowSensitive] Log analysis progress for debugging purposes.
Feb 24 2023, 5:50 AM · Restricted Project, Restricted Project
sammccall accepted D144170: [clang-format] Add simple macro replacements in formatting..

The overloading impl is a little surprising to me.
I was assuming that object would always win over function (or that it would be disallowed to combine the two).
I think that is simpler to implement, as you know in advance what type of expansion you're attempting.
But what you have isn't that much more complicated, and the extra flexibility may prove useful.

Feb 24 2023, 4:04 AM · Restricted Project, Restricted Project, Restricted Project
sammccall added inline comments to D144706: [Support][MemBuffer] Prevent UB on empty StringRefs.
Feb 24 2023, 2:16 AM · Restricted Project, Restricted Project

Feb 23 2023

sammccall added a comment to D144170: [clang-format] Add simple macro replacements in formatting..

Thanks, this all looks good, at least as far as I understand it! The two-passes-over-the-whole-file approach is easier for me to follow, too.

Feb 23 2023, 3:33 AM · Restricted Project, Restricted Project, Restricted Project

Feb 22 2023

sammccall accepted D144456: [clangd] Publish diagnostics with stale preambles.
Feb 22 2023, 5:43 AM · Restricted Project, Restricted Project
sammccall accepted D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens..
Feb 22 2023, 12:50 AM · Restricted Project, Restricted Project

Feb 21 2023

sammccall added a comment to D144456: [clangd] Publish diagnostics with stale preambles.

Looks pretty good. I think we can build the main file & preamble in parallel. Otherwise nits.

Feb 21 2023, 7:06 AM · Restricted Project, Restricted Project

Feb 17 2023

sammccall accepted D143096: [clangd] Provide patched diagnostics with preamble patch.

LG thanks!

Feb 17 2023, 4:33 AM · Restricted Project, Restricted Project

Feb 16 2023

sammccall added inline comments to D143096: [clangd] Provide patched diagnostics with preamble patch.
Feb 16 2023, 11:03 AM · Restricted Project, Restricted Project
sammccall accepted D142890: [clangd] Add config option for fast diagnostics mode.
Feb 16 2023, 10:31 AM · Restricted Project, Restricted Project
sammccall added a comment to D144170: [clang-format] Add simple macro replacements in formatting..

It's happening!

Feb 16 2023, 5:43 AM · Restricted Project, Restricted Project, Restricted Project

Feb 15 2023

sammccall accepted D143070: [clang-format] Enable FormatTokenSource to insert tokens..
Feb 15 2023, 2:36 AM · Restricted Project, Restricted Project

Feb 8 2023

sammccall accepted D143597: [clangd] Drop includes from disabled PP regions in preamble patch.
Feb 8 2023, 9:10 PM · Restricted Project, Restricted Project
sammccall accepted D143197: [clangd] Fix bugs in main-file include patching for stale preambles.
Feb 8 2023, 7:28 AM · Restricted Project, Restricted Project
sammccall added a comment to D140745: Generate Config {Fragment structure, json schema, docs, YAML parser} from schema spec.

Based on offline discussion, doubling down on checking in generated files to make these easy/possible to consume where they're needed.

Feb 8 2023, 5:59 AM · Restricted Project, Restricted Project
sammccall updated the diff for D140745: Generate Config {Fragment structure, json schema, docs, YAML parser} from schema spec.

Add comments to schema.yaml.
Add tests that generated files are up-to-date, and script to regenerate
Rename doc.md -> documentation.md

Feb 8 2023, 5:58 AM · Restricted Project, Restricted Project
sammccall added a comment to D143070: [clang-format] Enable FormatTokenSource to insert tokens..

Only serious concern is getPreviousToken().

Feb 8 2023, 1:39 AM · Restricted Project, Restricted Project
sammccall accepted D143095: [clangd] Respect preamble-patch when handling diags.
Feb 8 2023, 1:07 AM · Restricted Project, Restricted Project
sammccall accepted D143093: [clangd] #undef macros inside preamble patch.
Feb 8 2023, 12:59 AM · Restricted Project, Restricted Project
sammccall added inline comments to D143096: [clangd] Provide patched diagnostics with preamble patch.
Feb 8 2023, 12:45 AM · Restricted Project, Restricted Project
sammccall added inline comments to D143096: [clangd] Provide patched diagnostics with preamble patch.
Feb 8 2023, 12:13 AM · Restricted Project, Restricted Project

Feb 7 2023

sammccall added a comment to D143197: [clangd] Fix bugs in main-file include patching for stale preambles.

Code looks reasonable, but I don't understand why the changes are being made - can you explain/link to a bug in the commit message?

Feb 7 2023, 10:39 PM · Restricted Project, Restricted Project
sammccall added a comment to D142890: [clangd] Add config option for fast diagnostics mode.

The code looks good, but I have a very hard time following the tests.

Feb 7 2023, 10:31 PM · Restricted Project, Restricted Project

Feb 3 2023

sammccall added inline comments to rGe1aaa314a46c: [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name().
Feb 3 2023, 4:49 AM · Restricted Project, Restricted Project
sammccall committed rG506e55b041b9: Revert unintended debug things :-( (authored by sammccall).
Revert unintended debug things :-(
Feb 3 2023, 4:48 AM · Restricted Project, Restricted Project
sammccall committed rGe1aaa314a46c: [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name() (authored by sammccall).
[Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name()
Feb 3 2023, 4:22 AM · Restricted Project, Restricted Project
sammccall closed D142467: [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name().
Feb 3 2023, 4:22 AM · Restricted Project, Restricted Project
sammccall added inline comments to D142467: [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name().
Feb 3 2023, 3:58 AM · Restricted Project, Restricted Project

Feb 2 2023

sammccall added a comment to D143096: [clangd] Provide patched diagnostics with preamble patch.

It looks like this fixes up the location only of diagnostics attached to particular directives (#include) based on some "deep" idea about the content of the directive (the spelled header name).

Feb 2 2023, 6:45 AM · Restricted Project, Restricted Project
sammccall added a comment to D143093: [clangd] #undef macros inside preamble patch.

I can't understand from the description, code, or testcases what problem this is fixing. Can you clarify, ideally by improving the testcases?

Feb 2 2023, 6:33 AM · Restricted Project, Restricted Project
sammccall added inline comments to D142890: [clangd] Add config option for fast diagnostics mode.
Feb 2 2023, 5:09 AM · Restricted Project, Restricted Project

Feb 1 2023

sammccall added inline comments to D142890: [clangd] Add config option for fast diagnostics mode.
Feb 1 2023, 5:31 AM · Restricted Project, Restricted Project

Jan 31 2023

sammccall accepted D142637: A slightly more concise AST dump :).
Jan 31 2023, 6:21 AM · Restricted Project, Restricted Project
sammccall added inline comments to D142871: [clangd] Semantic highlighting for constrained-parameter.
Jan 31 2023, 6:14 AM · Restricted Project, Restricted Project

Jan 26 2023

sammccall added inline comments to D142637: A slightly more concise AST dump :).
Jan 26 2023, 3:58 PM · Restricted Project, Restricted Project
sammccall accepted D142637: A slightly more concise AST dump :).
Jan 26 2023, 9:53 AM · Restricted Project, Restricted Project

Jan 24 2023

sammccall updated the diff for D142467: [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name().

oops, helps if I run tests on the right branch

Jan 24 2023, 7:00 AM · Restricted Project, Restricted Project
sammccall requested review of D142467: [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name().
Jan 24 2023, 6:40 AM · Restricted Project, Restricted Project
sammccall added a comment to D142214: [MC] Do not copy MCInstrDescs. NFC..

TL;DR: this doesn't work in C++20, maybe revert?

I'm surprised the aggregate init works given the deleted copy ctor here, but if it works, it works I guess *shrug*

The aggregate init works up to C++17, but not in C++20.
(The rules change from "no user-provided, inherited, or explicit constructors" to "no user-declared or inherited constructors").

I think the current status of building LLVM in C++20 mode is "theoretically supported, but no stable buildbot yet". It's being worked on.

Since C++20 compatibility is something we'll need to do in the medium-term, and incompatible constructs make building a good bot harder in the short-term, I'd reluctantly suggest reverting this.

(Eliminating the aggregate init or finding an alternative technique to break copy/move also seem fine, starting with a revert would still be nice if it's not trivial)

Interesting. Is there any easy way I can test building in C++20 mode on my own machine?

Jan 24 2023, 1:58 AM · Restricted Project, Restricted Project
sammccall added a comment to D142214: [MC] Do not copy MCInstrDescs. NFC..

TL;DR: this doesn't work in C++20, maybe revert?

Jan 24 2023, 1:36 AM · Restricted Project, Restricted Project

Jan 23 2023

sammccall accepted D142125: [clang] Fix the location of UsingTypeLoc..
Jan 23 2023, 1:24 AM · Restricted Project, Restricted Project, Restricted Project

Jan 19 2023

sammccall accepted D139921: [include-cleaner] Ranking of providers based on hints.

LG, just nits really!

Jan 19 2023, 7:27 AM · Restricted Project, Restricted Project

Jan 13 2023

sammccall added a comment to D141580: [clang] Don't consider a nullptr returned from ActOnTag() as a valid result in ParseClassSpecifier..

To offer the opposing argument: if DeclResult is just a bad idea, then using it consistently/right might be worse than using it as little as possible.

Jan 13 2023, 12:04 PM · Restricted Project, Restricted Project

Jan 12 2023

sammccall committed rG1feb7af04688: [clangd] support expanding `decltype(expr)` (authored by v1nh1shungry).
[clangd] support expanding `decltype(expr)`
Jan 12 2023, 6:27 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
sammccall closed D141226: [clangd] support expanding `decltype(expr)`.
Jan 12 2023, 6:27 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
sammccall committed rZORG4444f3417b66: Use optimized tablegen in clangd builds (authored by kadircet).
Use optimized tablegen in clangd builds
Jan 12 2023, 10:47 AM · Restricted Project
sammccall accepted D141508: [utils][filecheck-lint] Add filecheck-lint, a linter for FileCheck directives..

LG, thanks!

Jan 12 2023, 5:15 AM · Restricted Project, Restricted Project
sammccall committed rGbb1b0e61cda6: [clangd] Tag clang-tidy diagnostics: modernize-*=deprecated, misc-unused… (authored by sammccall).
[clangd] Tag clang-tidy diagnostics: modernize-*=deprecated, misc-unused…
Jan 12 2023, 4:22 AM · Restricted Project, Restricted Project
sammccall closed D141537: [clangd] Tag clang-tidy diagnostics: modernize-*=deprecated, misc-unused-*=unneccesary.
Jan 12 2023, 4:22 AM · Restricted Project, Restricted Project
sammccall added a comment to D141508: [utils][filecheck-lint] Add filecheck-lint, a linter for FileCheck directives..

Thanks! This all looks pretty good to me apart from the complexity around comment markers, detecting which comment markers to use for which language etc.
I'd really like if you could either:

Jan 12 2023, 3:45 AM · Restricted Project, Restricted Project
sammccall accepted D141280: [clang] Build UsingType for elaborated type specifiers..
Jan 12 2023, 2:46 AM · Restricted Project, Restricted Project, Restricted Project