[clang] fa2a8c2 - [dataflow] Don't crash in Environment::dump when decls have weird names

2023-04-21 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-04-21T21:08:26+02:00 New Revision: fa2a8c2e1cdf188ce985d69fca6f78866390b715 URL: https://github.com/llvm/llvm-project/commit/fa2a8c2e1cdf188ce985d69fca6f78866390b715 DIFF: https://github.com/llvm/llvm-project/commit/fa2a8c2e1cdf188ce985d69fca6f78866390b715.diff LO

[clang] 271a73d - [dataflow] HTMLLogger: fix off-by-one in the BB listing

2023-04-24 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-04-24T15:55:21+02:00 New Revision: 271a73dae32f5eac2011a2f85351975484496262 URL: https://github.com/llvm/llvm-project/commit/271a73dae32f5eac2011a2f85351975484496262 DIFF: https://github.com/llvm/llvm-project/commit/271a73dae32f5eac2011a2f85351975484496262.diff LO

[clang] b56b15e - [dataflow] HTMLLogger - show the value of the current expr

2023-04-26 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-04-26T17:15:23+02:00 New Revision: b56b15ed719b4b6a5fe1a0a8b5ece54467ab2fee URL: https://github.com/llvm/llvm-project/commit/b56b15ed719b4b6a5fe1a0a8b5ece54467ab2fee DIFF: https://github.com/llvm/llvm-project/commit/b56b15ed719b4b6a5fe1a0a8b5ece54467ab2fee.diff LO

[clang-tools-extra] f69110d - Check for a ‘buffer’ type instead of ‘buffer-live’.

2023-06-05 Thread Sam McCall via cfe-commits
Author: Philipp Stephani Date: 2023-06-05T15:10:31+02:00 New Revision: f69110dcc9739f9449a77f6010f8c20759d4e0a6 URL: https://github.com/llvm/llvm-project/commit/f69110dcc9739f9449a77f6010f8c20759d4e0a6 DIFF: https://github.com/llvm/llvm-project/commit/f69110dcc9739f9449a77f6010f8c20759d4e0a6.di

[clang-tools-extra] 4cb5e43 - [clangd] Show size, offset and padding for bit fields on hover

2023-06-05 Thread Sam McCall via cfe-commits
Author: SR_team Date: 2023-06-05T17:52:34+02:00 New Revision: 4cb5e436ae713579cfee00cfc8e516cf965b91e9 URL: https://github.com/llvm/llvm-project/commit/4cb5e436ae713579cfee00cfc8e516cf965b91e9 DIFF: https://github.com/llvm/llvm-project/commit/4cb5e436ae713579cfee00cfc8e516cf965b91e9.diff LOG:

[clang-tools-extra] 3f9f146 - [clangd] Move completion signatures and labelDetails

2023-06-05 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-06-05T18:05:18+02:00 New Revision: 3f9f1463719d7491768e9a224ac089c8f9baab68 URL: https://github.com/llvm/llvm-project/commit/3f9f1463719d7491768e9a224ac089c8f9baab68 DIFF: https://github.com/llvm/llvm-project/commit/3f9f1463719d7491768e9a224ac089c8f9baab68.diff LO

[clang] e3f91ac - Fix namespace of operator<< defn

2023-06-07 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-06-08T01:36:59+02:00 New Revision: e3f91acad38e6637f1589bb4b33e9c4b8b58581f URL: https://github.com/llvm/llvm-project/commit/e3f91acad38e6637f1589bb4b33e9c4b8b58581f DIFF: https://github.com/llvm/llvm-project/commit/e3f91acad38e6637f1589bb4b33e9c4b8b58581f.diff LO

[clang] 3fffe68 - [Serialization] Add -ftime-trace block for reading loaded modules.

2022-12-09 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-12-09T14:36:57+01:00 New Revision: 3fffe6826448ac2daf9c4feb8e48ae8d601aca06 URL: https://github.com/llvm/llvm-project/commit/3fffe6826448ac2daf9c4feb8e48ae8d601aca06 DIFF: https://github.com/llvm/llvm-project/commit/3fffe6826448ac2daf9c4feb8e48ae8d601aca06.diff LO

[clang] bd672e2 - [CodeComplete] Provide designated-init completions in (const) reference context

2022-12-14 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-12-14T19:41:25+01:00 New Revision: bd672e2fc03823e536866da6721b9f053cfd586b URL: https://github.com/llvm/llvm-project/commit/bd672e2fc03823e536866da6721b9f053cfd586b DIFF: https://github.com/llvm/llvm-project/commit/bd672e2fc03823e536866da6721b9f053cfd586b.diff LO

[clang] 33e3edd - [CodeComplete] Complete members of dependent `auto` variables

2022-12-15 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-12-15T16:10:19+01:00 New Revision: 33e3edde44952ed2be44ad00e6cb73208580bb85 URL: https://github.com/llvm/llvm-project/commit/33e3edde44952ed2be44ad00e6cb73208580bb85 DIFF: https://github.com/llvm/llvm-project/commit/33e3edde44952ed2be44ad00e6cb73208580bb85.diff LO

r293473 - Revert r293455, which breaks v8 with a spurious error. Testcase added.

2017-01-30 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 30 04:44:11 2017 New Revision: 293473 URL: http://llvm.org/viewvc/llvm-project?rev=293473&view=rev Log: Revert r293455, which breaks v8 with a spurious error. Testcase added. Summary: Revert r293455, which breaks v8 with a spurious error. Testcase added. Reviewers

r293604 - In VirtualCallChecker, handle indirect calls

2017-01-30 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 30 23:23:20 2017 New Revision: 293604 URL: http://llvm.org/viewvc/llvm-project?rev=293604&view=rev Log: In VirtualCallChecker, handle indirect calls Summary: In VirtualCallChecker, handle indirect calls. getDirectCallee() can be nullptr, and dyn_cast(nullptr) is U

r293611 - Revert r293585 "Add better ODR checking for modules."

2017-01-31 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jan 31 02:24:40 2017 New Revision: 293611 URL: http://llvm.org/viewvc/llvm-project?rev=293611&view=rev Log: Revert r293585 "Add better ODR checking for modules." We're seeing what we believe are false positives. (It's hard to tell with the available diagnostics, and I'

r322371 - [CodeComplete] Add an option to omit results from the preamble.

2018-01-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 12 06:51:47 2018 New Revision: 322371 URL: http://llvm.org/viewvc/llvm-project?rev=322371&view=rev Log: [CodeComplete] Add an option to omit results from the preamble. Summary: Enumerating the contents of a namespace or global scope will omit any decls that aren't

[clang-tools-extra] r322377 - [clangd] Incorporate fuzzy-match into result rankings.

2018-01-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 12 08:16:09 2018 New Revision: 322377 URL: http://llvm.org/viewvc/llvm-project?rev=322377&view=rev Log: [clangd] Incorporate fuzzy-match into result rankings. Summary: The scoring function is fuzzy-match-quality * existing quality score. Reviewers: ioeric Subscri

[clang-tools-extra] r322379 - [clangd] Include debugging tags for both static and dynamic index. NFC

2018-01-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 12 09:09:49 2018 New Revision: 322379 URL: http://llvm.org/viewvc/llvm-project?rev=322379&view=rev Log: [clangd] Include debugging tags for both static and dynamic index. NFC Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp clang-tools-extra/trunk/

[clang-tools-extra] r322387 - [clangd] Code completion uses Sema for NS-level things in the current file.

2018-01-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 12 10:30:08 2018 New Revision: 322387 URL: http://llvm.org/viewvc/llvm-project?rev=322387&view=rev Log: [clangd] Code completion uses Sema for NS-level things in the current file. Summary: To stay fast, it avoids deserializing anything outside the current file, by

[clang-tools-extra] r322443 - [clangd] Fix uninitialized-read found by asan

2018-01-13 Thread Sam McCall via cfe-commits
Author: sammccall Date: Sat Jan 13 08:46:26 2018 New Revision: 322443 URL: http://llvm.org/viewvc/llvm-project?rev=322443&view=rev Log: [clangd] Fix uninitialized-read found by asan Modified: clang-tools-extra/trunk/clangd/FuzzyMatch.cpp clang-tools-extra/trunk/unittests/clangd/FuzzyMatch

[clang-tools-extra] r322480 - [clangd] Merge results from static/dynamic index.

2018-01-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 15 04:33:00 2018 New Revision: 322480 URL: http://llvm.org/viewvc/llvm-project?rev=322480&view=rev Log: [clangd] Merge results from static/dynamic index. Summary: We now hide the static/dynamic split from the code completion, behind a new implementation of the Symb

[clang-tools-extra] r322509 - [clangd] Improve const-correctness of Symbol->Detail. NFC

2018-01-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 15 12:09:09 2018 New Revision: 322509 URL: http://llvm.org/viewvc/llvm-project?rev=322509&view=rev Log: [clangd] Improve const-correctness of Symbol->Detail. NFC Summary: This would have caught a bug I wrote in an early version of D42049, where an index user could

[clang-tools-extra] r322547 - [clangd] Avoid combinatorial explosion in CodeCompleteTests.

2018-01-16 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jan 16 04:21:24 2018 New Revision: 322547 URL: http://llvm.org/viewvc/llvm-project?rev=322547&view=rev Log: [clangd] Avoid combinatorial explosion in CodeCompleteTests. Summary: This test dominates our unit test runtime, and the change speeds it up by 10x. We lose cove

r322548 - Ensure code complete with !LoadExternal sees all local decls.

2018-01-16 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jan 16 04:33:46 2018 New Revision: 322548 URL: http://llvm.org/viewvc/llvm-project?rev=322548&view=rev Log: Ensure code complete with !LoadExternal sees all local decls. Summary: noload_lookups() was too lazy: in addition to avoiding external decls, it avoided populati

r322549 - Squash -Wcovered-switch-default wairning

2018-01-16 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jan 16 04:54:28 2018 New Revision: 322549 URL: http://llvm.org/viewvc/llvm-project?rev=322549&view=rev Log: Squash -Wcovered-switch-default wairning Modified: cfe/trunk/tools/c-index-test/c-index-test.c Modified: cfe/trunk/tools/c-index-test/c-index-test.c URL: h

[clang-tools-extra] r322668 - [clangd] Avoid divide-by-zero

2018-01-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jan 17 07:25:55 2018 New Revision: 322668 URL: http://llvm.org/viewvc/llvm-project?rev=322668&view=rev Log: [clangd] Avoid divide-by-zero Modified: clang-tools-extra/trunk/clangd/FuzzyMatch.cpp Modified: clang-tools-extra/trunk/clangd/FuzzyMatch.cpp URL: http://l

r322672 - [Index] Fix GCC warning. This is silly, but no llvm_unreachable and no C99.

2018-01-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jan 17 07:57:14 2018 New Revision: 322672 URL: http://llvm.org/viewvc/llvm-project?rev=322672&view=rev Log: [Index] Fix GCC warning. This is silly, but no llvm_unreachable and no C99. Modified: cfe/trunk/tools/c-index-test/c-index-test.c Modified: cfe/trunk/tools/

Re: r322549 - Squash -Wcovered-switch-default wairning

2018-01-17 Thread Sam McCall via cfe-commits
function ‘CursorToText’: > /home/buildslave/am1i-slv2/ubuntu-gcc7.1-werror/llvm/ > tools/clang/tools/c-index-test/c-index-test.c:741:1: error: control > reaches end of non-void function [-Werror=return-type] > } > ^ > cc1: all warnings being treated as errors > > Please

r322720 - [Index] Fix GCC warning again :-(

2018-01-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jan 17 10:20:57 2018 New Revision: 322720 URL: http://llvm.org/viewvc/llvm-project?rev=322720&view=rev Log: [Index] Fix GCC warning again :-( Modified: cfe/trunk/tools/c-index-test/c-index-test.c Modified: cfe/trunk/tools/c-index-test/c-index-test.c URL: http://l

[clang-tools-extra] r322821 - [clangd] Use fuzzy match to select top N index results.

2018-01-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jan 18 00:35:04 2018 New Revision: 322821 URL: http://llvm.org/viewvc/llvm-project?rev=322821&view=rev Log: [clangd] Use fuzzy match to select top N index results. Summary: This makes performance slower but more predictable (it always processes every symbol). We need t

[clang-tools-extra] r322824 - [clangd] CodeCompleteTests cleanup: naming, ordering, helpers. NFC

2018-01-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jan 18 01:27:56 2018 New Revision: 322824 URL: http://llvm.org/viewvc/llvm-project?rev=322824&view=rev Log: [clangd] CodeCompleteTests cleanup: naming, ordering, helpers. NFC Modified: clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp Modified: clang-

[clang-tools-extra] r322827 - [clangd] Output log messages to stderr when not configured (e.g. in tests). NFC

2018-01-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jan 18 02:24:01 2018 New Revision: 322827 URL: http://llvm.org/viewvc/llvm-project?rev=322827&view=rev Log: [clangd] Output log messages to stderr when not configured (e.g. in tests). NFC Modified: clang-tools-extra/trunk/clangd/Logger.cpp clang-tools-extra/tru

[clang-tools-extra] r322856 - [clangd] Remove unused IncludeGlobals completion option, always pass true to sema

2018-01-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jan 18 07:31:30 2018 New Revision: 322856 URL: http://llvm.org/viewvc/llvm-project?rev=322856&view=rev Log: [clangd] Remove unused IncludeGlobals completion option, always pass true to sema Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp clang-tools-

[clang-tools-extra] r322945 - [clangd] Merge index-provided completions with those from Sema.

2018-01-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 19 06:34:02 2018 New Revision: 322945 URL: http://llvm.org/viewvc/llvm-project?rev=322945&view=rev Log: [clangd] Merge index-provided completions with those from Sema. Summary: - we match on USR, and do a field-by-field merge if both have results - scoring is pos

[clang-tools-extra] r322949 - [clangd] Fix memcpy(?, null, 0) UB by switching to std::copy

2018-01-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 19 07:03:49 2018 New Revision: 322949 URL: http://llvm.org/viewvc/llvm-project?rev=322949&view=rev Log: [clangd] Fix memcpy(?, null, 0) UB by switching to std::copy Modified: clang-tools-extra/trunk/clangd/FuzzyMatch.cpp Modified: clang-tools-extra/trunk/clang

[clang-tools-extra] r322996 - [clangd] Change index scope convention from "outer::inner" to "outer::inner::"

2018-01-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 19 13:58:58 2018 New Revision: 322996 URL: http://llvm.org/viewvc/llvm-project?rev=322996&view=rev Log: [clangd] Change index scope convention from "outer::inner" to "outer::inner::" Global scope is "" (was "") Top-level namespace scope is "ns::" (was "ns") Nested

[clang-tools-extra] r322998 - Revert "[clangd] Change index scope convention from "outer::inner" to "outer::inner::""

2018-01-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 19 14:09:34 2018 New Revision: 322998 URL: http://llvm.org/viewvc/llvm-project?rev=322998&view=rev Log: Revert "[clangd] Change index scope convention from "outer::inner" to "outer::inner::"" This reverts commit r322996. Modified: clang-tools-extra/trunk/clan

[clang-tools-extra] r323000 - [clangd] Change index scope convention from "outer::inner" to "outer::inner::"

2018-01-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 19 14:18:21 2018 New Revision: 323000 URL: http://llvm.org/viewvc/llvm-project?rev=323000&view=rev Log: [clangd] Change index scope convention from "outer::inner" to "outer::inner::" Global scope is "" (was "") Top-level namespace scope is "ns::" (was "ns") Nested

r323148 - [CodeComplete] Omit templated constructors from member list too.

2018-01-22 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 22 12:44:47 2018 New Revision: 323148 URL: http://llvm.org/viewvc/llvm-project?rev=323148&view=rev Log: [CodeComplete] Omit templated constructors from member list too. Also avoid printing a 'void' return type for constructor expressions. Modified: cfe/trunk/l

[clang-tools-extra] r323149 - [clangd] Drop ~destructor completions - rarely helpful and work inconsistently

2018-01-22 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 22 13:05:00 2018 New Revision: 323149 URL: http://llvm.org/viewvc/llvm-project?rev=323149&view=rev Log: [clangd] Drop ~destructor completions - rarely helpful and work inconsistently Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp clang-tools-extr

r323347 - [CodeComplete] only respect LoadExternal hint at namespace/tu scope

2018-01-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jan 24 09:50:20 2018 New Revision: 323347 URL: http://llvm.org/viewvc/llvm-project?rev=323347&view=rev Log: [CodeComplete] only respect LoadExternal hint at namespace/tu scope Reviewers: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.ll

[clang-tools-extra] r323350 - [clangd] add test for r323347 CodeComplete behavior we rely on

2018-01-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jan 24 09:53:32 2018 New Revision: 323350 URL: http://llvm.org/viewvc/llvm-project?rev=323350&view=rev Log: [clangd] add test for r323347 CodeComplete behavior we rely on Modified: clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp Modified: clang-tool

[clang-tools-extra] r323443 - [clangd] Replace homegrown make_scope_exit with one from ADT

2018-01-25 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jan 25 09:01:39 2018 New Revision: 323443 URL: http://llvm.org/viewvc/llvm-project?rev=323443&view=rev Log: [clangd] Replace homegrown make_scope_exit with one from ADT Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp clang-tools-extra/trunk/clangd/Fun

[clang-tools-extra] r323448 - [clangd] Add ClangdUnit diagnostics tests using annotated code.

2018-01-25 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jan 25 09:29:17 2018 New Revision: 323448 URL: http://llvm.org/viewvc/llvm-project?rev=323448&view=rev Log: [clangd] Add ClangdUnit diagnostics tests using annotated code. Summary: This adds checks that our diagnostics emit correct ranges in a bunch of cases, as promis

[clang-tools-extra] r323511 - [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-26 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 26 01:00:30 2018 New Revision: 323511 URL: http://llvm.org/viewvc/llvm-project?rev=323511&view=rev Log: [clangd] Modify the Span API so that Spans propagate with contexts. Summary: This is probably the right behavior for distributed tracers, and makes unpaired begi

[clang-tools-extra] r323518 - [clangd] Fix GCC build break 'declaration changes meaning'

2018-01-26 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 26 03:23:33 2018 New Revision: 323518 URL: http://llvm.org/viewvc/llvm-project?rev=323518&view=rev Log: [clangd] Fix GCC build break 'declaration changes meaning' Modified: clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp Modified: clang-tools-extra/trunk/

r323524 - [ASTImporter] avoid warnings: unused var, switch covered

2018-01-26 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 26 04:06:44 2018 New Revision: 323524 URL: http://llvm.org/viewvc/llvm-project?rev=323524&view=rev Log: [ASTImporter] avoid warnings: unused var, switch covered Modified: cfe/trunk/lib/AST/ASTImporter.cpp cfe/trunk/lib/AST/ExternalASTMerger.cpp Modified: c

Re: [clang-tools-extra] r323149 - [clangd] Drop ~destructor completions - rarely helpful and work inconsistently

2018-01-29 Thread Sam McCall via cfe-commits
g, but not ~string We do indirectly test that destructor completions are turned off in clangd. I don't really know where to add the FIXMEs. I can add XFAIL tests to c-index-test I think, is anyone likely to go looking for them? On Mon, Jan 22, 2018 at 1:06 PM Sam McCall via cfe-commits <

[clang-tools-extra] r323734 - [clangd] Enable completion index by default, limit results to 100.

2018-01-30 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jan 30 01:21:30 2018 New Revision: 323734 URL: http://llvm.org/viewvc/llvm-project?rev=323734&view=rev Log: [clangd] Enable completion index by default, limit results to 100. Summary: This should speed up global code completion by avoiding deserializing preamble declar

[clang-tools-extra] r323751 - [clangd] Fix windows path manipulation

2018-01-30 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jan 30 03:23:11 2018 New Revision: 323751 URL: http://llvm.org/viewvc/llvm-project?rev=323751&view=rev Log: [clangd] Fix windows path manipulation Modified: clang-tools-extra/trunk/clangd/Protocol.cpp Modified: clang-tools-extra/trunk/clangd/Protocol.cpp URL: htt

[clang-tools-extra] r323792 - [clangd] Trace code completion.

2018-01-30 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jan 30 09:20:54 2018 New Revision: 323792 URL: http://llvm.org/viewvc/llvm-project?rev=323792&view=rev Log: [clangd] Trace code completion. Context passing is a little messy, but will go away with TLS soon. Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp

[clang-tools-extra] r323949 - [clangd] Use pthread instead of thread_local to support more runtimes.

2018-02-01 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Feb 1 02:01:25 2018 New Revision: 323949 URL: http://llvm.org/viewvc/llvm-project?rev=323949&view=rev Log: [clangd] Use pthread instead of thread_local to support more runtimes. Summary: thread_local has nice syntax and semantics, but requires __cxa_thread_atexit, and

Re: [PATCH] D42796: [clangd] Skip inline namespace when collecting scopes for index symbols.

2018-02-02 Thread Sam McCall via cfe-commits
Yeah this is just a bug in clang's pprinter. I'll fix it. If you give multiple C++ names to the same linker symbol using extern C, I'm pretty sure you're in UB land. On Fri, Feb 2, 2018, 12:04 Ilya Biryukov via Phabricator < revi...@reviews.llvm.org> wrote: > ilya-biryukov added inline comments.

Re: [PATCH] D42796: [clangd] Skip inline namespace when collecting scopes for index symbols.

2018-02-02 Thread Sam McCall via cfe-commits
Right. And multiple TUs that *are* linked together would be fine too. But in that case I don't think we need to be clever about treating these as the same symbol. Indexing them twice is fine. On Fri, Feb 2, 2018 at 1:42 PM, Ilya Biryukov wrote: > In a single translation unit, yes. In multiple tr

Re: [PATCH] D42796: [clangd] Skip inline namespace when collecting scopes for index symbols.

2018-02-02 Thread Sam McCall via cfe-commits
My intuition was that the USRs would be different, that linkage would either be included or not included from the USR, but it wouldn't affect whether the namespace is included. (Reasoning: USRs model language concepts, not linker ones) But we're both wrong. If I'm reading USRGeneration correctly,

Re: [PATCH] D42796: [clangd] Skip inline namespace when collecting scopes for index symbols.

2018-02-02 Thread Sam McCall via cfe-commits
I was misreading: we set isIgnored if we're trying to generate a USR for a linkagespecdecl itself (not a symbol in it). For other e.g. a var, we check if the DC is a NamedDecl and if so, visit it before visiting the var. Linkagespec isn't a nameddecl, so this is a no-op. Result: things (directly) u

Re: [PATCH] D42796: [clangd] Skip inline namespace when collecting scopes for index symbols.

2018-02-02 Thread Sam McCall via cfe-commits
Talked to Ben, he thinks this is probably unintentional and that it's probably OK to change. I'll see if it breaks anything. On Fri, Feb 2, 2018 at 2:11 PM, Sam McCall wrote: > I was misreading: we set isIgnored if we're trying to generate a USR for a > linkagespecdecl itself (not a symbol in it

r324081 - [AST] namespace ns { extern "C" { int X; }} prints as "ns::X", not as "X"

2018-02-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Feb 2 05:34:47 2018 New Revision: 324081 URL: http://llvm.org/viewvc/llvm-project?rev=324081&view=rev Log: [AST] namespace ns { extern "C" { int X; }} prints as "ns::X", not as "X" Modified: cfe/trunk/lib/AST/Decl.cpp cfe/trunk/unittests/AST/NamedDeclPrinterTe

r324093 - [Index] fix USR generation for namespace{extern{X}}

2018-02-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Feb 2 06:13:37 2018 New Revision: 324093 URL: http://llvm.org/viewvc/llvm-project?rev=324093&view=rev Log: [Index] fix USR generation for namespace{extern{X}} Added: cfe/trunk/test/Index/USR/linkage.cpp Modified: cfe/trunk/lib/Index/USRGeneration.cpp Modified

Re: [PATCH] D42796: [clangd] Skip inline namespace when collecting scopes for index symbols.

2018-02-02 Thread Sam McCall via cfe-commits
Fixed prettyprinter in r324081 and USRs in r324093. On Fri, Feb 2, 2018 at 2:16 PM, Sam McCall wrote: > Talked to Ben, he thinks this is probably unintentional and that it's > probably OK to change. > I'll see if it breaks anything. > > On Fri, Feb 2, 2018 at 2:11 PM, Sam McCall wrote: > >> I w

[clang-tools-extra] r324105 - [clangd] Fix ExternC test broken by r324081

2018-02-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Feb 2 09:01:36 2018 New Revision: 324105 URL: http://llvm.org/viewvc/llvm-project?rev=324105&view=rev Log: [clangd] Fix ExternC test broken by r324081 Modified: clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp Modified: clang-tools-extra/trunk/un

Re: [PATCH] D30210: [include-fixer] Add usage count to find-all-symbols.

2017-02-23 Thread Sam McCall via cfe-commits
On Feb 23, 2017 8:48 PM, "Haojian Wu via Phabricator" < revi...@reviews.llvm.org> wrote: hokein added inline comments. Comment at: unittests/include-fixer/find-all-symbols/ FindAllSymbolsTests.cpp:40 + void reportSymbols(llvm::StringRef FileName, + SymbolInf

Re: [PATCH] D30210: [include-fixer] Add usage count to find-all-symbols.

2017-02-24 Thread Sam McCall via cfe-commits
That's two votes for "this is too surprising" - changed. https://imgflip.com/i/1k93rm https://68.media.tumblr.com/8db2fe0a6f84ff128157a2b615f519bf/tumblr_inline_nenq4hMoQA1sb080b.gif On Fri, Feb 24, 2017 at 9:54 AM, Manuel Klimek wrote: > On Thu, Feb 23, 2017 at 10:40 PM Sam McCall wrote: > >>

Re: [PATCH] D29303: In VirtualCallChecker, handle indirect calls

2017-02-24 Thread Sam McCall via cfe-commits
Thanks Anna, I'm new to the release process here. Hans: this is a simple fix for a null-dereference in the static analyzer. Does it make sense to cherrypick? On Sat, Feb 18, 2017 at 2:46 AM, Anna Zaks via Phabricator < revi...@reviews.llvm.org> wrote: > zaks.anna added a comment. > > Has this be

[clang-tools-extra] r296446 - [include-fixer] Add usage count to find-all-symbols.

2017-02-28 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Feb 28 02:13:15 2017 New Revision: 296446 URL: http://llvm.org/viewvc/llvm-project?rev=296446&view=rev Log: [include-fixer] Add usage count to find-all-symbols. Summary: Add usage count to find-all-symbols. FindAllSymbols now finds (most!) main-file usages of the disc

[clang-tools-extra] r297371 - [include-fixer] Remove line number from Symbol identity

2017-03-09 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Mar 9 04:47:44 2017 New Revision: 297371 URL: http://llvm.org/viewvc/llvm-project?rev=297371&view=rev Log: [include-fixer] Remove line number from Symbol identity Summary: Remove line number from Symbol identity. For our purposes (include-fixer and clangd autocomplet

[clang-tools-extra] r297630 - [include-fixer] Add fuzzy SymbolIndex, where identifier needn't match exactly.

2017-03-13 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Mar 13 10:55:59 2017 New Revision: 297630 URL: http://llvm.org/viewvc/llvm-project?rev=297630&view=rev Log: [include-fixer] Add fuzzy SymbolIndex, where identifier needn't match exactly. Summary: Add fuzzy SymbolIndex, where identifier needn't match exactly. The purpo

r288892 - Compilation database test: don't try to output to CWD

2016-12-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Dec 7 03:19:07 2016 New Revision: 288892 URL: http://llvm.org/viewvc/llvm-project?rev=288892&view=rev Log: Compilation database test: don't try to output to CWD Summary: Write output from compilation database test to %T rather than the working dir. Sometimes CWD isn't

[PATCH] D25311: Add FixItHint for missing #include (err_module_unimported_use_header)

2016-10-21 Thread Sam McCall via cfe-commits
sammccall added a comment. > I don't know the history behind the desired dependencies, I'll let others > comment whether this is OK, but my guess it that it depends on the tradeoff, > it's hard to justify 3 new deps for a change that is supposed to be simple. > How hard is to implement this wit

[PATCH] D25936: Fix format string for err_os_log_argument_to_big (currently unused)

2016-10-25 Thread Sam McCall via cfe-commits
sammccall created this revision. sammccall added a reviewer: bkramer. sammccall added subscribers: cfe-commits, mehdi_amini. https://reviews.llvm.org/D25936 Files: include/clang/Basic/DiagnosticSemaKinds.td Index: include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D25936: Fix format string for err_os_log_argument_to_big (currently unused)

2016-10-25 Thread Sam McCall via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D25936#578341, @mehdi_amini wrote: > Good catch! How did you find this? We've got a library that parses diagnostics that consumes DiagnosticSemaKinds.inc, and it failed to parse this message format. > We need a test though. > (I can take

[PATCH] D25983: Fix use-after-free in ASTContext.

2016-10-26 Thread Sam McCall via cfe-commits
sammccall created this revision. sammccall added a reviewer: bkramer. sammccall added subscribers: cfe-commits, rsmith. Extend lifetime of ExceptionTypeStorage, as it is referenced by CanonicalEPI and used outside the block (ExceptionSpec.Exceptions is an ArrayRef) https://reviews.llvm.org/D259

[PATCH] D26024: [Xray] Don't generate output for xray tests

2016-10-27 Thread Sam McCall via cfe-commits
sammccall created this revision. sammccall added a reviewer: dberris. sammccall added a subscriber: cfe-commits. Don't generate output for xray tests https://reviews.llvm.org/D26024 Files: test/Driver/XRay/xray-instrument-cpu.c test/Driver/XRay/xray-instrument-os.c Index: test/Driver/XRay

[PATCH] D26067: [openmp] Remove test assumption that invoked binary name contains "clang"

2016-10-28 Thread Sam McCall via cfe-commits
sammccall created this revision. sammccall added a reviewer: bkramer. sammccall added a subscriber: cfe-commits. Remove test assumption that driver-invoked binary name contains "clang" https://reviews.llvm.org/D26067 Files: test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c ===

[PATCH] D26067: [openmp] Remove test assumption that invoked binary name contains "clang"

2016-10-28 Thread Sam McCall via cfe-commits
sammccall updated this revision to Diff 76172. sammccall added a comment. Use -no-canonical-prefixes so that the invoked binary name will contain "clang" https://reviews.llvm.org/D26067 Files: test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c =

[PATCH] D26132: [clang-format] Skip over AnnotatedLines with >50 levels of nesting.

2016-10-30 Thread Sam McCall via cfe-commits
sammccall created this revision. sammccall added a reviewer: djasper. sammccall added a subscriber: cfe-commits. Herald added a subscriber: klimek. Skip over AnnotatedLines with >50 levels of nesting; don't format them. Reasoning: - ExpressionParser uses a lot of stack for these, bad in some env

[PATCH] D26132: [clang-format] Skip over AnnotatedLines with >50 levels of nesting.

2016-10-30 Thread Sam McCall via cfe-commits
sammccall updated this revision to Diff 76348. sammccall added a comment. Fixing style. https://reviews.llvm.org/D26132 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp =

[PATCH] D26132: [clang-format] Skip over AnnotatedLines with >50 levels of nesting.

2016-10-31 Thread Sam McCall via cfe-commits
sammccall added a comment. Thanks Daniel. I don't have commit access, could you land this? https://reviews.llvm.org/D26132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] SelectionTree marks nodes as complete only if children are complete (PR #82237)

2024-02-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/82237 This seems to be the semantics expected by ~all callers, and simplifies upcoming patches extending extract-variable. >From 517d60a66ecae616e7c4037980b61fb4162b0c29 Mon Sep 17 00:00:00 2001 From: Sam McCall D

[clang] [clang][nullability] allow _Nonnull etc on gsl::Pointer types (PR #82705)

2024-02-22 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/82705 This enables external nullability checkers to make use of these annotations on smart pointer types. Existing static warnings for raw pointers are extended to smart pointers: - nullptr used as return value or

[clang] [clang][nullability] allow _Nonnull etc on gsl::Pointer types (PR #82705)

2024-02-22 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/82705 >From 090c0b01d1b02fd68c15971a1f3d9548aba24670 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Thu, 22 Feb 2024 16:00:44 +0100 Subject: [PATCH] [clang][nullability] allow _Nonnull etc on gsl::Pointer types Th

[clang] [clang][nullability] allow _Nonnull etc on gsl::Pointer types (PR #82705)

2024-02-22 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/82705 >From 77ba6fd11bd7ae58a2d95ec002414d6e6e9b Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Thu, 22 Feb 2024 16:00:44 +0100 Subject: [PATCH] [clang][nullability] allow _Nonnull etc on gsl::Pointer types Th

[clang] [clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2024-02-22 Thread Sam McCall via cfe-commits
sam-mccall wrote: I don't know that this class brings enough value to warrant the dependency - we don't really seem to be simplifying the code, we're mostly just using it as a fancy `vector`. (For some context: we went to some effort in the past to untangle this from tooling/Refactoring/Renam

[clang] [clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2024-02-22 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/82061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2024-02-22 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall requested changes to this pull request. As mentioned: unless there's a clear reason, I'd avoid not to add the dependency on Tooling/Refactoring as it doesn't seem to simplify the implementation much. (My last comment should have been on the review - sorry, I'm sti

[clang] [clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2024-02-22 Thread Sam McCall via cfe-commits
@@ -27,19 +31,45 @@ namespace tooling { /// // ^~ string 0 ~ ^~ string 1 ~ /// \endcode class SymbolName { + llvm::SmallVector NamePieces; + public: - explicit SymbolName(StringRef Name) { -// While empty symbol names are valid (Objective-C selector

[clang] [clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2024-02-22 Thread Sam McCall via cfe-commits
@@ -27,19 +31,45 @@ namespace tooling { /// // ^~ string 0 ~ ^~ string 1 ~ /// \endcode class SymbolName { + llvm::SmallVector NamePieces; sam-mccall wrote: I'm a little wary of using this class as: - it seems like the design has only

[clang] [clang][dataflow] Fix handling of cyclical data structures in HTMLLogger. (PR #66887)

2024-06-11 Thread Sam McCall via cfe-commits
@@ -88,10 +88,12 @@ class ModelDumper { void dump(Value &V) { JOS.attribute("value_id", llvm::to_string(&V)); -if (!Visited.insert(&V).second) - return; - JOS.attribute("kind", debugString(V.getKind())); +if (!Visited.insert(&V).second) { + JOS.att

[clang] [clang][dataflow] Fix handling of cyclical data structures in HTMLLogger. (PR #66887)

2024-06-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. The code looks good for the changes you want to make. Personally I'd keep the existing pruning behavior for all duplicated nodes, and use cosmetic/navigation changes to clarify. But I think you probably know better than me what's useful

[clang-tools-extra] [include-cleaner] don't consider the associated header unused (PR #67228)

2024-06-19 Thread Sam McCall via cfe-commits
@@ -227,6 +230,7 @@ class PragmaIncludes::RecordPragma : public PPCallbacks, public CommentHandler { IncludedHeader = *File; checkForExport(HashFID, HashLine, std::move(IncludedHeader), File); sam-mccall wrote: Nice catch, thanks! https://github.com

[clang-tools-extra] [include-cleaner] don't consider the associated header unused (PR #67228)

2024-06-19 Thread Sam McCall via cfe-commits
@@ -379,6 +379,54 @@ TEST_F(PragmaIncludeTest, IWYUKeep) { EXPECT_TRUE(PI.shouldKeep(FM.getFile("std/set").get())); } +TEST_F(PragmaIncludeTest, AssociatedHeader) { + createEmptyFiles({"foo/main.h", "bar/main.h", "bar/other.h", "std/vector"}); + auto IsKeep = [&](llvm::Str

[clang-tools-extra] [include-cleaner] don't consider the associated header unused (PR #67228)

2024-06-19 Thread Sam McCall via cfe-commits
@@ -379,6 +379,54 @@ TEST_F(PragmaIncludeTest, IWYUKeep) { EXPECT_TRUE(PI.shouldKeep(FM.getFile("std/set").get())); } +TEST_F(PragmaIncludeTest, AssociatedHeader) { + createEmptyFiles({"foo/main.h", "bar/main.h", "bar/other.h", "std/vector"}); + auto IsKeep = [&](llvm::Str

[clang-tools-extra] [include-cleaner] don't consider the associated header unused (PR #67228)

2024-06-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: Apologies & thanks all for the pings. I unfortunately won't be active on llvm-project for a while (other work commitments), but I can get this landed. https://github.com/llvm/llvm-project/pull/67228 ___ cfe-commits mailing list cfe-c

[clang-tools-extra] [include-cleaner] don't consider the associated header unused (PR #67228)

2024-06-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/67228 >From a736ebb34a31fa0fd1c21a4f03c88d63856fb998 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Sat, 23 Sep 2023 10:44:30 +0200 Subject: [PATCH] [include-cleaner] don't consider the associated header unused Lo

[clang-tools-extra] [include-cleaner] don't consider the associated header unused (PR #67228)

2024-06-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall closed https://github.com/llvm/llvm-project/pull/67228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix -Wnullability-completeness false-positive in dependent code (PR #88727)

2024-04-15 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/88727 The intent was that smart-pointers do not participate in completeness checks, but we failed to capture dependent `unique_ptr`, which is not a RecordType but a TemplateSpecializationType. >From f1bea480b599b43

[clang-tools-extra] [clangd] Propagate context into stdlib indexing thread (PR #87611)

2024-04-15 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall commented: I'm iffy on whether this is semantically right or not, but we need to solve this problem somehow, so let's try the most obvious way. https://github.com/llvm/llvm-project/pull/87611 ___ cfe-commits mailing list

[clang-tools-extra] [clangd] Propagate context into stdlib indexing thread (PR #87611)

2024-04-15 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/87611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Propagate context into stdlib indexing thread (PR #87611)

2024-04-15 Thread Sam McCall via cfe-commits
@@ -112,7 +112,10 @@ struct UpdateIndexCallbacks : public ParsingCallbacks { // Index outlives TUScheduler (declared first) FIndex(FIndex), // shared_ptr extends lifetime - Stdlib(Stdlib)]() mutable { +

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/88014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Sam McCall via cfe-commits
@@ -3391,7 +3391,7 @@ class Sema final : public SemaBase { bool ConstexprSupported, bool CLinkageMayDiffer); /// type checking declaration initializers (C99 6.7.8) - bool CheckForConstantInitializer(Expr *e, QualType t); + bool CheckForConstantInitializer(Expr *Init,

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. Thanks, this looks like the right fix, and cleaning up DclT while here makes sense. https://github.com/llvm/llvm-project/pull/88014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

<    11   12   13   14   15   16   17   18   >