Page MenuHomePhabricator
Feed Advanced Search

May 12 2018

kimgr added a comment to D46522: [clang] cmake: resolve symlinks in ClangConfig.cmake.

I'm interested in this, I've tried for a while to fix the Debian packaging but I'm completely new to the packaging toolchain, so I'm making slow headway.

May 12 2018, 1:06 AM

May 11 2018

kimgr added a comment to D46652: [clang-cl, PCH] Implement support for MS-style PCH through headers.

When using a PCH, tokens are skipped until after the through header is seen.

May 11 2018, 1:50 AM

Apr 14 2018

kimgr added a comment to D43578: -ftime-report switch support in Clang.

I disagreed up until the last paragraph :)

Can you say which things you disagree with? There seem to be two important facts here:

  1. LLVM's timing infrastructure cannot correctly report timings when one function containing a timing region calls another. That will happen all the time with this patch applied.
  2. Clang's architecture means that if you time the amount of time spent in, say, the "ParseTemplate" function, you have not computed the amount of time spent parsing templates, because the parser calls into Sema, which might perform tasks that are only somewhat related to parsing the template (such as performing other instantiations), and likewise Sema calls into other layers (such as AST file deserialization and code generation).

The first might have been fixed in LLVM at this point, but I can't see any evidence of that in LLVM's Timer implementation. And the second seems even more fundamental. But if there's some way around that, which would allow us to produce (correct!) numbers for times spent parsing / whatever else, without, for instance, adding a correctness requirement that we annotate every Parser -> Sema entry point with a timer, then that's definitely something we should discuss.

Apr 14 2018, 9:27 AM
kimgr added a comment to D43578: -ftime-report switch support in Clang.

Heh, my e-mail response was eaten along the way. Continued here:

Apr 14 2018, 1:06 AM
kimgr updated subscribers of D43578: -ftime-report switch support in Clang.

Hi Richard,

Apr 14 2018, 12:57 AM

Mar 23 2018

kimgr updated subscribers of D44602: [clang-tidy] readability-function-size: add VariableThreshold param..

I have to say I disagree that either the nested struct/function or macros
(in any form) should count toward a function's total variable count.

Mar 23 2018, 12:24 PM · Restricted Project

Feb 17 2018

kimgr added a comment to D43430: Omit nullptr check for sufficiently simple delete-expressions.

Peanut gallery observation: there was a discussion on the Boost list years and years ago where someone made the case that if (x != nullptr) delete x; was measurably faster than just calling delete x; I can't find it now, but I think it might have been in the context of their checked_delete library. Anyway, the reasoning was that with an external nullptr check, you'd pay for one comparison, but without it you'd always pay for a jump + a comparison. I suppose that only holds true for null pointers, for non-null pointers the extra check is just waste.

Feb 17 2018, 1:41 AM
kimgr added a comment to D31696: Automatically add include-what-you-use for when building in tree.

Ping! It would be nice to get some traction on this.

Feb 17 2018, 1:26 AM

Jan 7 2018

kimgr requested changes to D41809: Clang counterpart change for fuzzer FreeBSD support.

Typo in the commit title: buzzer :)

Jan 7 2018, 11:08 AM

Oct 26 2017

kimgr added a comment to D39360: [C++11] Don't put empty quotes in static_assert diagnostic..

Why? It seems easier to me to map back if the diagnostic mirrors the code as-written.

Oct 26 2017, 11:51 PM · Restricted Project

Aug 2 2017

kimgr added a comment to D36156: [rename] Introduce symbol occurrences.

I was about to suggest SymbolLocation or even SymbolLoc, but it appears to keep track of more than locations. "Reference" sounds a little open-ended. No more ideas here, I'm afraid.

Aug 2 2017, 1:01 AM

Aug 1 2017

kimgr added a comment to D36156: [rename] Introduce symbol occurrences.

High-level comment from the peanut gallery:

Aug 1 2017, 10:28 AM

Jul 24 2017

kimgr added a comment to D35783: Ignore shadowing for declarations coming from within macros..

Any chance you could try my example too? It seems like this approach might catch it.

Jul 24 2017, 11:35 PM

Jul 23 2017

kimgr added a comment to D35783: Ignore shadowing for declarations coming from within macros..

I've seen this in the wild:

Jul 23 2017, 11:29 PM

Jul 2 2017

kimgr added a comment to D31697: Check for null before using TUScope.

only for the function templates that use Microsoft intrinsics (e.g. _BitScanForward in TrailingZerosCounter<T>.)
So there's something in the parsing of builtins/intrinsics that requires TUScope to be non-null.

Jul 2 2017, 3:53 AM

Jun 29 2017

kimgr added a comment to D31697: Check for null before using TUScope.

I did some more debugging today. This happens when we attempt to analyze llvm/Support/MathExtras.h, and only for the function templates that use Microsoft intrinsics (e.g. _BitScanForward in TrailingZerosCounter<T>.) So there's something in the parsing of builtins/intrinsics that requires TUScope to be non-null.

Jun 29 2017, 5:12 AM

Jun 11 2017

kimgr added a comment to D31697: Check for null before using TUScope.

We'd love to see this addressed, either in our code or in Clang. But we're not sure what to do on our end, so... a gentle ping for help!

Jun 11 2017, 1:39 PM

May 16 2017

kimgr added a comment to D32480: clang-format: Add CompactNamespaces option.

We have a large closed-source codebase with this style, and would welcome clang-format support.

May 16 2017, 6:58 AM · Restricted Project

May 1 2017

kimgr created D32696: More detailed docs for UsingShadowDecl.
May 1 2017, 1:27 AM

Apr 20 2017

kimgr added a comment to D32294: [clang-tidy] run-clang-tidy.py: check if clang-apply-replacements succeeds.

Python 3 concern inline

Apr 20 2017, 9:05 AM · Restricted Project

Apr 8 2017

kimgr added a comment to D31697: Check for null before using TUScope.

For some context, the backtrace when this happens is:

Apr 8 2017, 1:47 AM
kimgr added inline comments to D31696: Automatically add include-what-you-use for when building in tree.
Apr 8 2017, 1:14 AM

Apr 6 2017

kimgr added a comment to D31696: Automatically add include-what-you-use for when building in tree.

BTW, kimgr@, is there any particular reason you haven't tried to upstream the tool?
Maybe even as not a standalone tool but as a set of checks in clang-tidy.

Apr 6 2017, 12:51 PM

Apr 5 2017

kimgr added a comment to D31696: Automatically add include-what-you-use for when building in tree.

As an include-what-you-use maintainer, I would very much welcome this. I've been too shy to suggest it myself ;-).

Apr 5 2017, 12:34 PM

Mar 10 2017

kimgr added a comment to D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration.

A few more 'inhertiance' left, otherwise spelling looks good to me :-)

Mar 10 2017, 6:51 AM · Restricted Project

Mar 9 2017

kimgr added a comment to D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration.

Oops, the flag is called BreakBeforeInhertianceComma with a misspelling throughout. May want to search for inhertiance throughout and see if there are more cases.

Mar 9 2017, 8:40 AM · Restricted Project
kimgr added inline comments to D30773: Make git-clang-format python 3 compatible.
Mar 9 2017, 1:08 AM
kimgr added a comment to D30773: Make git-clang-format python 3 compatible.

Some nits from a Python3 hacker.

Mar 9 2017, 12:16 AM

Mar 3 2017

kimgr added a comment to D30532: Add examples to clang-format configuration.

For what it's worth, I also find this useful to be able to see at a glance what the setting does. I know I've tried several different settings in the past before finding the one I was looking for.

Mar 3 2017, 2:08 AM
kimgr added inline comments to D30564: [clang-tidy] Format code around applied fixes.
Mar 3 2017, 1:46 AM

Feb 1 2017

kimgr added a comment to D20561: Warn when taking address of packed member.

... and both revisions should be in the 4.0 branch (taken from r291814)

Feb 1 2017, 3:59 AM · Restricted Project, Restricted Project

Jan 6 2017

kimgr added a comment to D28399: PR31469: Don't add friend template class decls to redecl chain in dependent contexts..

I think we're seeing similar new behavior in IWYU, I've been meaning to bring it up on cfe-dev. But since it might be relevant here, I'll add our observations.

Jan 6 2017, 9:41 AM

Jan 3 2017

kimgr added a comment to D28223: clean up use of _WIN32.

I agree. Since the current set of encodings all have different element sizes and this is not likely to change, this looks good.

Jan 3 2017, 12:20 PM
kimgr added a comment to D28223: clean up use of _WIN32.

Another belated thought: it all depends on the intended meaning of the symbol:

Jan 3 2017, 12:03 PM
kimgr added a comment to D28223: clean up use of _WIN32.

@smeenai I think I tried to make a jumbled mess of points :-)

Jan 3 2017, 11:45 AM
kimgr added a comment to D28220: provide Win32 native threading.

Re Eric's windows.h concern.

Jan 3 2017, 1:41 AM
kimgr added a comment to D28223: clean up use of _WIN32.

I don't think wchar_t is UCS-2 anymore, I read somewhere that they switched to UTF-16 as of Windows 2000.

Jan 3 2017, 1:29 AM

Dec 27 2016

kimgr added a comment to D26167: [Clang-tidy] check for malloc, realloc and free calls.

Minor spelling nits inline

Dec 27 2016, 3:42 AM · Restricted Project

Jul 28 2016

kimgr added a comment to D21459: Implement http://wg21.link/P0254R1: "Integrating std::string_view and std::string".

This is probably not the right place for this discussion, but I thought I'd offer one more note.

Jul 28 2016, 9:11 AM

Jul 21 2016

kimgr added inline comments to D21459: Implement http://wg21.link/P0254R1: "Integrating std::string_view and std::string".
Jul 21 2016, 1:58 PM
kimgr added inline comments to D21459: Implement http://wg21.link/P0254R1: "Integrating std::string_view and std::string".
Jul 21 2016, 8:57 AM
kimgr added a comment to D21459: Implement http://wg21.link/P0254R1: "Integrating std::string_view and std::string".

Inline question on ctor+nullptr

Jul 21 2016, 1:01 AM

Jul 7 2016

kimgr added a comment to D22087: [clang-rename] add basic vim integration.

I only caught this typo after it was committed.

Jul 7 2016, 8:09 AM

May 4 2016

kimgr added a comment to D19816: [find-all-symbols] Add IWYU private pragma support..

Re semantics, you may want to link to IWYU's docs at
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md
.

May 4 2016, 12:06 AM

Apr 7 2016

kimgr added inline comments to D18852: [clang-tidy] fix a crash with -fdelayed-template-parsing in UnnecessaryValueParamCheck..
Apr 7 2016, 11:26 AM
kimgr added a comment to D18852: [clang-tidy] fix a crash with -fdelayed-template-parsing in UnnecessaryValueParamCheck..

The RUN line looks weird to me, but I'm no lit expert...

Apr 7 2016, 11:05 AM
kimgr added a comment to D18852: [clang-tidy] fix a crash with -fdelayed-template-parsing in UnnecessaryValueParamCheck..

A test case would be nice here. You can repro on all systems by passing -fdelayed-template-parsing explicitly.

Apr 7 2016, 12:59 AM

Jan 25 2016

kimgr added a comment to D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics..

Cool check, I like how it pays attention to indentation!

Jan 25 2016, 12:39 PM

Jan 19 2016

kimgr added inline comments to D16259: Add clang-tidy readability-redundant-control-flow check.
Jan 19 2016, 11:24 AM
kimgr added a comment to D16259: Add clang-tidy readability-redundant-control-flow check.

Came up with another test case.

Jan 19 2016, 11:09 AM

Dec 13 2015

kimgr added a comment to D9600: Add scan-build python implementation.

Comment at: tools/scan-build-py/bin/analyze-cc:14
@@ +13,2 @@
+from libscanbuild.analyze import wrapper

+sys.exit(wrapper(False))

It is hard to figure out/search which functions actually get called from the top level tools. Could you rename all of the public functions so that they
have unique names? For example, "wrapper" -> "scan_build_wrapper". This would greatly improve searchability!

Dec 13 2015, 12:06 AM

Nov 7 2015

kimgr added a comment to D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk.

Add debugging ideas.

Nov 7 2015, 1:17 AM

Aug 15 2015

kimgr added inline comments to D10431: PR21174 - clang only searches current working directory for precompiled include file.
Aug 15 2015, 12:17 PM

Jul 22 2015

kimgr added inline comments to D11324: [PM/AA] Replace the only use of the AliasAnalysis::deleteValue API (in GlobalsModRef) with CallbackVHs that trigger the same behavior..
Jul 22 2015, 3:39 AM

Jul 14 2015

kimgr added inline comments to D10431: PR21174 - clang only searches current working directory for precompiled include file.
Jul 14 2015, 5:41 AM
kimgr added inline comments to D10431: PR21174 - clang only searches current working directory for precompiled include file.
Jul 14 2015, 2:33 AM

Jul 10 2015

kimgr added a comment to D10431: PR21174 - clang only searches current working directory for precompiled include file.

Thanks! I just looked at this again, and I think I found a bug, see inline.

Jul 10 2015, 3:11 PM

Jul 9 2015

kimgr added a comment to D10892: warning when inner condition is identical.

Some style nits and a question around the purpose of Sr. It doesn't appear to do what I thought it would.

Jul 9 2015, 11:40 AM

Jul 2 2015

kimgr added a comment to D10892: warning when inner condition is identical.

Added some ideas for tests that might break.

Jul 2 2015, 1:38 PM

Jun 25 2015

kimgr added a comment to D10431: PR21174 - clang only searches current working directory for precompiled include file.

Also, is a test possible? I still haven't got my head around the Clang test fx, but it feels like it should be possible to create a .gch in a temporary path, add the path to -I and verify that clang sees it when you attempt to force it in with -include.

Jun 25 2015, 12:29 PM

Jun 24 2015

kimgr added a comment to D10431: PR21174 - clang only searches current working directory for precompiled include file.

My co-worker (who reported the bug) has tested the patch and it works in our build system, so the patch is functional.

Jun 24 2015, 1:36 PM

Sep 21 2014

kimgr added a comment to D5393: [clang-tidy] Add a checker that warns on TODO comments without username..

See inline.

Sep 21 2014, 12:21 PM

Aug 13 2014

kimgr added a comment to D4854: Only use MSVC-compatible dependent base class hack for class template members..

... and by 'should', I mean what I intended, to avoid this fallback when the chance of dependent bases is zero.

Aug 13 2014, 1:32 PM
kimgr updated the diff for D4854: Only use MSVC-compatible dependent base class hack for class template members..

Thanks! Could you try this one instead? I think it's more representative of what we should do, i.e. only fall back if we're in a CXXRecordDecl and said record has dependent bases.

Aug 13 2014, 1:30 PM

Aug 12 2014

kimgr added a comment to D4854: Only use MSVC-compatible dependent base class hack for class template members..

I've played with another approach, to just ask the DeclContext if its parent is a record, i.e.

Aug 12 2014, 8:26 AM
kimgr added a reviewer for D4854: Only use MSVC-compatible dependent base class hack for class template members.: rsmith.
Aug 12 2014, 8:26 AM

Aug 11 2014

kimgr updated D4854: Only use MSVC-compatible dependent base class hack for class template members..
Aug 11 2014, 2:58 PM
kimgr retitled D4854: Only use MSVC-compatible dependent base class hack for class template members. from to Only use MSVC-compatible dependent base class hack for class template members..
Aug 11 2014, 2:56 PM