[clang] [clang][modules] Remove preloaded SLocEntries from PCM files (PR #66962)

2023-09-29 Thread Sam McCall via cfe-commits
sam-mccall wrote: Ripping out this feature sounds great, as does fixing the non-translation of builtin buffer locations. My only concern is that this will make isBeforeInTranslationUnit more expensive. A loc being in one of these special "" is the rare case, and the code recognizing them does

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall commented: Sorry about the delay - this looks like a much more manageable scope! Comments mostly on structure still... https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -45,6 +45,10 @@ class GlobalCompilationDatabase { return std::nullopt; } + virtual std::vector getAllFilesInProjectOf(PathRef File) const { sam-mccall wrote: The layering here looks close, but not quite right to me. Rather than having GCDB expose "

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.h *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.h *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -442,6 +448,9 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs, std::move(CI), PreamblePCH, llvm::MemoryBuffer::getMemBufferCopy(Inputs.Contents, Filename), VFS, *DiagConsumer); + + // Clangd Modules TODO: refactor the command line

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.h *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.h *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.h *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-09-29 Thread Sam McCall via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.h *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] 6a01da4 - [clang]Interp] Re-add some header deps of Source.h

2023-10-02 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-10-02T15:57:16+02:00 New Revision: 6a01da4b7cbd70988151f1aa0af6213cf14246e8 URL: https://github.com/llvm/llvm-project/commit/6a01da4b7cbd70988151f1aa0af6213cf14246e8 DIFF: https://github.com/llvm/llvm-project/commit/6a01da4b7cbd70988151f1aa0af6213cf14246e8.diff LO

[clang] [clang][dataflow] HTML logger: Mark iterations that have converged. (PR #68204)

2023-10-04 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. This is great! https://github.com/llvm/llvm-project/pull/68204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] e289ee9 - [clangd] enable unused-include warnings for standard library headers

2023-07-19 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-19T23:43:47+02:00 New Revision: e289ee99cec4607243aeaa01504f6b3cf65b65fe URL: https://github.com/llvm/llvm-project/commit/e289ee99cec4607243aeaa01504f6b3cf65b65fe DIFF: https://github.com/llvm/llvm-project/commit/e289ee99cec4607243aeaa01504f6b3cf65b65fe.diff LO

[clang-tools-extra] ee032bc - [clangd] Add BlockEnd comments for control flow statements

2023-07-21 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-21T22:57:46+02:00 New Revision: ee032bccc934d034909962a9306f7c9d1ca72759 URL: https://github.com/llvm/llvm-project/commit/ee032bccc934d034909962a9306f7c9d1ca72759 DIFF: https://github.com/llvm/llvm-project/commit/ee032bccc934d034909962a9306f7c9d1ca72759.diff LO

[clang-tools-extra] d9d9a2c - [clangd] Use index for go-to-type

2023-07-21 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-21T23:10:33+02:00 New Revision: d9d9a2cb2f0db7a92eb7d5ef0c619fb41aa5c8a8 URL: https://github.com/llvm/llvm-project/commit/d9d9a2cb2f0db7a92eb7d5ef0c619fb41aa5c8a8 DIFF: https://github.com/llvm/llvm-project/commit/d9d9a2cb2f0db7a92eb7d5ef0c619fb41aa5c8a8.diff LO

[clang-tools-extra] 290a98c - [clangd] Allow indexing of __reserved_names outside system headers

2023-07-21 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-21T23:30:31+02:00 New Revision: 290a98c7b00899b6aba0fc892e8f29fecc00a82e URL: https://github.com/llvm/llvm-project/commit/290a98c7b00899b6aba0fc892e8f29fecc00a82e DIFF: https://github.com/llvm/llvm-project/commit/290a98c7b00899b6aba0fc892e8f29fecc00a82e.diff LO

[clang-tools-extra] ab4e461 - [include-cleaner] allow spelling strategies to customize verbatim/system headers

2023-07-21 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-22T02:36:29+02:00 New Revision: ab4e461353bb16e538aca260121533fec7e0678c URL: https://github.com/llvm/llvm-project/commit/ab4e461353bb16e538aca260121533fec7e0678c DIFF: https://github.com/llvm/llvm-project/commit/ab4e461353bb16e538aca260121533fec7e0678c.diff LO

[clang-tools-extra] 0478ef2 - [clangd] Exclude builtin headers from system include extraction

2023-07-25 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-25T18:19:37+02:00 New Revision: 0478ef2d366c6f88678e37d54190dcdaa0ec69da URL: https://github.com/llvm/llvm-project/commit/0478ef2d366c6f88678e37d54190dcdaa0ec69da DIFF: https://github.com/llvm/llvm-project/commit/0478ef2d366c6f88678e37d54190dcdaa0ec69da.diff LO

[clang-tools-extra] f6307b2 - [include-cleaner] Switch Include from FileEntry* -> FileEntryRef

2023-07-26 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-26T13:41:55+02:00 New Revision: f6307b260b0c0d93d25d13bab7ec02d762f4a2a6 URL: https://github.com/llvm/llvm-project/commit/f6307b260b0c0d93d25d13bab7ec02d762f4a2a6 DIFF: https://github.com/llvm/llvm-project/commit/f6307b260b0c0d93d25d13bab7ec02d762f4a2a6.diff LO

[clang-tools-extra] 16b5e18 - [include-cleaner] Loose matching for verbatim headers

2023-07-27 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-27T18:19:24+02:00 New Revision: 16b5e1897b7efaa4250b04dface0c807a02ae31a URL: https://github.com/llvm/llvm-project/commit/16b5e1897b7efaa4250b04dface0c807a02ae31a DIFF: https://github.com/llvm/llvm-project/commit/16b5e1897b7efaa4250b04dface0c807a02ae31a.diff LO

[clang-tools-extra] d97a341 - [clangd] Loose include-cleaner matching for verbatim headers

2023-07-27 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-27T19:20:53+02:00 New Revision: d97a3419c0a35cfa07cb67459846d76ea80c058c URL: https://github.com/llvm/llvm-project/commit/d97a3419c0a35cfa07cb67459846d76ea80c058c DIFF: https://github.com/llvm/llvm-project/commit/d97a3419c0a35cfa07cb67459846d76ea80c058c.diff LO

[clang] efe4a54 - [Sema] Clean up ActionResult type a little. NFCI

2023-08-18 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-08-18T13:30:14+02:00 New Revision: efe4a54884cb1e5f1d6306f5e831d369c6fd6f54 URL: https://github.com/llvm/llvm-project/commit/efe4a54884cb1e5f1d6306f5e831d369c6fd6f54 DIFF: https://github.com/llvm/llvm-project/commit/efe4a54884cb1e5f1d6306f5e831d369c6fd6f54.diff LO

[clang] 30f0cd5 - [Sema] followups from efe4a54884cb

2023-08-18 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-08-18T13:33:30+02:00 New Revision: 30f0cd55c614639ad5af7b32846cd4fea75d968e URL: https://github.com/llvm/llvm-project/commit/30f0cd55c614639ad5af7b32846cd4fea75d968e DIFF: https://github.com/llvm/llvm-project/commit/30f0cd55c614639ad5af7b32846cd4fea75d968e.diff LO

[clang] 23459f1 - [Lex] Preambles should contain the global module fragment.

2023-08-22 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-08-22T11:55:51+02:00 New Revision: 23459f13fcd9c424a41debb2d11eb56843d4e679 URL: https://github.com/llvm/llvm-project/commit/23459f13fcd9c424a41debb2d11eb56843d4e679 DIFF: https://github.com/llvm/llvm-project/commit/23459f13fcd9c424a41debb2d11eb56843d4e679.diff LO

[clang-tools-extra] 31a8f84 - [clangd] Fix crash with sanitizers if blocking with no timeout

2023-08-22 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-08-22T11:57:42+02:00 New Revision: 31a8f840f327694a6c74dac15702eeb85281c1e2 URL: https://github.com/llvm/llvm-project/commit/31a8f840f327694a6c74dac15702eeb85281c1e2 DIFF: https://github.com/llvm/llvm-project/commit/31a8f840f327694a6c74dac15702eeb85281c1e2.diff LO

[clang] [clang][USR] Encode full decl-context also for anon namespaces (PR #68325)

2023-10-06 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. https://github.com/llvm/llvm-project/pull/68325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Various formatting tweaks to HTMLLogger. (PR #68392)

2023-10-09 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. https://github.com/llvm/llvm-project/pull/68392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall commented: Sorry to arrive late with this. This looks pretty solid, all comments optional, happy to stamp a followup commit if you find them useful. https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
@@ -0,0 +1,50 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +Detects when objects of certain hostile RAII types persists across suspension +points in a coroutine. Such hostile types include scoped-lockable types and

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
@@ -0,0 +1,50 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +Detects when objects of certain hostile RAII types persists across suspension +points in a coroutine. Such hostile types include scoped-lockable types and

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
@@ -0,0 +1,50 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +Detects when objects of certain hostile RAII types persists across suspension +points in a coroutine. Such hostile types include scoped-lockable types and

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
@@ -0,0 +1,98 @@ +//===--- CoroutineHostileRAII.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
@@ -0,0 +1,98 @@ +//===--- CoroutineHostileRAII.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/65949: This records facts that are not sensitive to the current flow condition, and should apply to all environments. The motivating case is recording information about where a Value originated, such as nullability:

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall review_requested https://github.com/llvm/llvm-project/pull/65949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall review_requested https://github.com/llvm/llvm-project/pull/65949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall review_requested https://github.com/llvm/llvm-project/pull/65949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall review_requested https://github.com/llvm/llvm-project/pull/65949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/65949: >From 1d765a3b22cd81d6739a20f2b2f7b68935773f2a Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Mon, 11 Sep 2023 13:21:11 +0200 Subject: [PATCH 1/2] [dataflow] Add global condition to DataflowAnalysisContext

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/65484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
@@ -223,6 +238,22 @@ void JSONNodeDumper::Visit(const APValue &Value, QualType Ty) { JOS.attribute("value", OS.str()); } +void JSONNodeDumper::Visit(const ConceptReference *CR) { + JOS.attribute("kind", "ConceptReference"); + JOS.attribute("id", createPointerRepresentatio

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/65484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
@@ -415,9 +443,55 @@ class ASTNodeTraverser if (!T->isSugared()) Visit(T->getPattern()); } + void VisitAutoType(const AutoType *T) { +for (const auto &Arg : T->getTypeConstraintArguments()) + Visit(Arg); + } // FIXME: ElaboratedType, DependentNameType,

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
@@ -458,6 +532,9 @@ class ASTNodeTraverser if (Traversal == TK_IgnoreUnlessSpelledInSource && D->isCXXForRangeDecl()) return; +if (VisitLocs) + if (const auto *TSI = D->getTypeSourceInfo()) +Visit(TSI->getTypeLoc()); sam-mccall wrote

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/65484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/65484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/65484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
@@ -96,6 +96,21 @@ void JSONNodeDumper::Visit(QualType T) { JOS.attribute("qualifiers", T.split().Quals.getAsString()); } +void JSONNodeDumper::Visit(TypeLoc TL) { + if (TL.isNull()) +return; + JOS.attribute("kind", +(llvm::Twine(TL.getTypeLocClass() ==

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
@@ -415,9 +443,55 @@ class ASTNodeTraverser if (!T->isSugared()) Visit(T->getPattern()); } + void VisitAutoType(const AutoType *T) { +for (const auto &Arg : T->getTypeConstraintArguments()) + Visit(Arg); + } // FIXME: ElaboratedType, DependentNameType,

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/65484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
@@ -458,6 +532,9 @@ class ASTNodeTraverser if (Traversal == TK_IgnoreUnlessSpelledInSource && D->isCXXForRangeDecl()) return; +if (VisitLocs) sam-mccall wrote: Yes, there may be others but for now this is the only place I found where a Loc node

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/65484: >From f2269d93e313378581085bca418914229316bfc6 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Mon, 4 Sep 2023 15:48:47 +0200 Subject: [PATCH 1/3] [AST] Add dump() method to TypeLoc The ability to dump AST n

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-13 Thread Sam McCall via cfe-commits
@@ -108,6 +108,16 @@ class DataflowAnalysisContext { /// A null `PointeeType` can be used for the pointee of `std::nullptr_t`. PointerValue &getOrCreateNullPointerValue(QualType PointeeType); + /// Adds `Constraint` to current and future flow conditions in this context. +

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-13 Thread Sam McCall via cfe-commits
@@ -172,27 +179,33 @@ bool DataflowAnalysisContext::equivalentFormulas(const Formula &Val1, } void DataflowAnalysisContext::addTransitiveFlowConditionConstraints( -Atom Token, llvm::SetVector &Constraints, -llvm::DenseSet &VisitedTokens) { - auto Res = VisitedTokens.

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-13 Thread Sam McCall via cfe-commits
@@ -172,27 +179,33 @@ bool DataflowAnalysisContext::equivalentFormulas(const Formula &Val1, } void DataflowAnalysisContext::addTransitiveFlowConditionConstraints( -Atom Token, llvm::SetVector &Constraints, -llvm::DenseSet &VisitedTokens) { - auto Res = VisitedTokens.

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-13 Thread Sam McCall via cfe-commits
@@ -150,7 +157,7 @@ bool DataflowAnalysisContext::flowConditionImplies(Atom Token, Constraints.insert(&arena().makeAtomRef(Token)); Constraints.insert(&arena().makeNot(Val)); llvm::DenseSet VisitedTokens; sam-mccall wrote: Indeed, oops! https://github.

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-13 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/65949: >From 1d765a3b22cd81d6739a20f2b2f7b68935773f2a Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Mon, 11 Sep 2023 13:21:11 +0200 Subject: [PATCH 1/3] [dataflow] Add global condition to DataflowAnalysisContext

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-13 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/65949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-13 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall resolved https://github.com/llvm/llvm-project/pull/65949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] In tests, error out if we didn't find any matching target functions. (PR #66197)

2023-09-13 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. https://github.com/llvm/llvm-project/pull/66197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-14 Thread Sam McCall via cfe-commits
@@ -108,6 +108,16 @@ class DataflowAnalysisContext { /// A null `PointeeType` can be used for the pointee of `std::nullptr_t`. PointerValue &getOrCreateNullPointerValue(QualType PointeeType); + /// Adds `Constraint` to current and future flow conditions in this context. +

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-14 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/65949: >From 1d765a3b22cd81d6739a20f2b2f7b68935773f2a Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Mon, 11 Sep 2023 13:21:11 +0200 Subject: [PATCH 1/4] [dataflow] Add global condition to DataflowAnalysisContext

[clang] [dataflow] Add global condition to DataflowAnalysisContext (PR #65949)

2023-09-14 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall closed https://github.com/llvm/llvm-project/pull/65949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Ignore assignment where base class's operator is used (PR #66364)

2023-09-14 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. https://github.com/llvm/llvm-project/pull/66364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Ignore assignment where base class's operator is used (PR #66364)

2023-09-14 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall closed https://github.com/llvm/llvm-project/pull/66364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-14 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/66424: My immediate use for this is not in checked-in code, but rather the ability to plug printed flow conditions (from analysis logs) back into sat solver unittests to reproduce slowness. It does allow simplifying

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-14 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall review_requested https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-14 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall review_requested https://github.com/llvm/llvm-project/pull/66424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Parse formulas from text (PR #66424)

2023-09-14 Thread Sam McCall via cfe-commits
sam-mccall wrote: Not sure if this is really important to have checked in, but I've wanted to investigate/reproduce flow condition slowness a few times now, so thought I should send the patch in case others think it's useful. https://github.com/llvm/llvm-project/pull/66424

[clang] 2fd614e - [dataflow] Add dedicated representation of boolean formulas

2023-07-04 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-04T12:19:44+02:00 New Revision: 2fd614efc1bb9c27f1bc6c3096c60a7fe121e274 URL: https://github.com/llvm/llvm-project/commit/2fd614efc1bb9c27f1bc6c3096c60a7fe121e274 DIFF: https://github.com/llvm/llvm-project/commit/2fd614efc1bb9c27f1bc6c3096c60a7fe121e274.diff LO

[clang] 1c3ac8d - Reland "[dataflow] Add dedicated representation of boolean formulas"

2023-07-05 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-05T13:35:16+02:00 New Revision: 1c3ac8dfa16c42a631968aadd0396cfe7f7778e0 URL: https://github.com/llvm/llvm-project/commit/1c3ac8dfa16c42a631968aadd0396cfe7f7778e0 DIFF: https://github.com/llvm/llvm-project/commit/1c3ac8dfa16c42a631968aadd0396cfe7f7778e0.diff LO

[clang] 5e4ad81 - [dataflow] Replace most BoolValue subclasses with references to Formula (and AtomicBoolValue => Atom and BoolValue => Formula where appropriate)

2023-07-05 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-05T13:54:32+02:00 New Revision: 5e4ad816bf100b0325ed45ab1cfea18deb3ab3d1 URL: https://github.com/llvm/llvm-project/commit/5e4ad816bf100b0325ed45ab1cfea18deb3ab3d1 DIFF: https://github.com/llvm/llvm-project/commit/5e4ad816bf100b0325ed45ab1cfea18deb3ab3d1.diff LO

[clang] 7157956 - [dataflow] use true/false literals in formulas, rather than variables

2023-07-05 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-05T14:06:48+02:00 New Revision: 71579569f4399d3cf6bc618dcd449b5388d749cc URL: https://github.com/llvm/llvm-project/commit/71579569f4399d3cf6bc618dcd449b5388d749cc DIFF: https://github.com/llvm/llvm-project/commit/71579569f4399d3cf6bc618dcd449b5388d749cc.diff LO

[clang] 9d5cfed - [dataflow] Remove [[deprecated]] from deprecated functions

2023-07-07 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-07T14:35:29+02:00 New Revision: 9d5cfed2443aa294e67bea694d5aab02c40fa278 URL: https://github.com/llvm/llvm-project/commit/9d5cfed2443aa294e67bea694d5aab02c40fa278 DIFF: https://github.com/llvm/llvm-project/commit/9d5cfed2443aa294e67bea694d5aab02c40fa278.diff LO

[clang] fa68972 - [dataflow] document flow condition

2023-07-11 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-12T07:20:46+02:00 New Revision: fa689726768b7b5cae01970cce2e59a72a0229b4 URL: https://github.com/llvm/llvm-project/commit/fa689726768b7b5cae01970cce2e59a72a0229b4 DIFF: https://github.com/llvm/llvm-project/commit/fa689726768b7b5cae01970cce2e59a72a0229b4.diff LO

[clang] 7d935d0 - [dataflow] improve determinism of generated SAT system

2023-07-11 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-12T08:09:10+02:00 New Revision: 7d935d083659c9ddaf3389c1747fc8c59f07e3fc URL: https://github.com/llvm/llvm-project/commit/7d935d083659c9ddaf3389c1747fc8c59f07e3fc DIFF: https://github.com/llvm/llvm-project/commit/7d935d083659c9ddaf3389c1747fc8c59f07e3fc.diff LO

[clang] 6272226 - [dataflow] Remove deprecated BoolValue flow condition accessors

2023-07-13 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-13T09:39:23+02:00 New Revision: 6272226b9f94ba252eabfa7d32e44408b8a12883 URL: https://github.com/llvm/llvm-project/commit/6272226b9f94ba252eabfa7d32e44408b8a12883 DIFF: https://github.com/llvm/llvm-project/commit/6272226b9f94ba252eabfa7d32e44408b8a12883.diff LO

[clang-tools-extra] 9e6a342 - [clangd] Implement end-definition-comment inlay hints

2023-07-15 Thread Sam McCall via cfe-commits
Author: daiyousei-qz Date: 2023-07-16T01:19:02+02:00 New Revision: 9e6a342fdac8978ef6d3e373cbbc7425e3dfe0f8 URL: https://github.com/llvm/llvm-project/commit/9e6a342fdac8978ef6d3e373cbbc7425e3dfe0f8 DIFF: https://github.com/llvm/llvm-project/commit/9e6a342fdac8978ef6d3e373cbbc7425e3dfe0f8.diff

[clang] 3dcf3cb - [ASTMatchers] Bring comments & docs back in sync

2023-09-04 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-09-04T13:42:29+02:00 New Revision: 3dcf3cbc421cb5ee985b3b4a697c51247df8b5dc URL: https://github.com/llvm/llvm-project/commit/3dcf3cbc421cb5ee985b3b4a697c51247df8b5dc DIFF: https://github.com/llvm/llvm-project/commit/3dcf3cbc421cb5ee985b3b4a697c51247df8b5dc.diff LO

Re: [PATCH] D159309: [ASTMatchers] basic matcher support for ConceptReference

2023-09-04 Thread Sam McCall via cfe-commits
(by mail as phab is unusable today) On Mon, Sep 4, 2023 at 10:16 AM Jens Massberg via Phabricator < revi...@reviews.llvm.org> wrote: > massberg added inline comments. > > > > Comment at: clang/docs/LibASTMatchersReference.html:2545 >}; > -dependentSizedArrayType() > +dependen

[clang] da5e11c - [AST] Support ConceptReference in DynTypedNode, add dump().

2023-09-04 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-09-04T13:56:15+02:00 New Revision: da5e11cd1ce0754a123ff0bf6f3ce4a41be14355 URL: https://github.com/llvm/llvm-project/commit/da5e11cd1ce0754a123ff0bf6f3ce4a41be14355 DIFF: https://github.com/llvm/llvm-project/commit/da5e11cd1ce0754a123ff0bf6f3ce4a41be14355.diff LO

[clang-tools-extra] a8c9b9f - [clangd] Support ConceptReference in generic AST wrangling code

2023-09-04 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-09-04T14:58:25+02:00 New Revision: a8c9b9f1402ccf93955a26d5933cd8c3150c3845 URL: https://github.com/llvm/llvm-project/commit/a8c9b9f1402ccf93955a26d5933cd8c3150c3845 DIFF: https://github.com/llvm/llvm-project/commit/a8c9b9f1402ccf93955a26d5933cd8c3150c3845.diff LO

[clang] [AST] Fix nested name specifiers printing as NamespaceNamespace (PR #65266)

2023-09-04 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/65266: This happens because we print both the kind of the NNS and the kind of decl (when it refers to one). These are always the same string. >From 0f32300def7e8bdbac3612f2e26a623629d308b7 Mon Sep 17 00:00:00 2001

[clang] [AST] Fix nested name specifiers printing as NamespaceNamespace (PR #65266)

2023-09-04 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall review_requested https://github.com/llvm/llvm-project/pull/65266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Fix nested name specifiers printing as NamespaceNamespace (PR #65266)

2023-09-04 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall review_requested https://github.com/llvm/llvm-project/pull/65266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Fix test constexpr-function-recovery-crash.cpp (PR #65269)

2023-09-05 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/65269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Fix test constexpr-function-recovery-crash.cpp (PR #65269)

2023-09-05 Thread Sam McCall via cfe-commits
@@ -99,6 +99,10 @@ TEST_EVALUATE(DoWhileCond, do {} while (some_cond < 10);); // expected-error // expected-error {{constexpr variable 'forceEvaluateDoWhileCond' must be initialized by a constant expression}} TE

[clang] [NFC][Clang] Fix test constexpr-function-recovery-crash.cpp (PR #65269)

2023-09-05 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. LGTM I don't have a strong opinion about keeping the old even-more-broken versions. They're not very likely, and we don't attempt to cover most things like that. A fuzzer is probably a better approach (we have one, it finds an ~infinite

[clang] [AST] Fix nested name specifiers printing as NamespaceNamespace (PR #65266)

2023-09-05 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall closed https://github.com/llvm/llvm-project/pull/65266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd][unittests] Limit paralelism for clangd unittests (PR #65444)

2023-09-06 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. https://github.com/llvm/llvm-project/pull/65444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-06 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/65484: The ability to dump AST nodes is important to ad-hoc debugging, and the fact this doesn't work with TypeLoc nodes is an obvious missing feature in e.g. clang-query (`set output dump` simply does nothing). Hav

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-06 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall review_requested https://github.com/llvm/llvm-project/pull/65484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Add dump() method to TypeLoc (PR #65484)

2023-09-06 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/65484: >From f2269d93e313378581085bca418914229316bfc6 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Mon, 4 Sep 2023 15:48:47 +0200 Subject: [PATCH 1/2] [AST] Add dump() method to TypeLoc The ability to dump AST n

[clang-tools-extra] [include-cleaner] Always keep non-self-contained files (PR #65499)

2023-09-06 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. Oops, I thought we had this already! https://github.com/llvm/llvm-project/pull/65499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

<    8   9   10   11   12   13   14   15   16   17   >