[PATCH] D73613: [clangd][Hover] Make tests hermetic by setting target triplet

2020-01-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:583 TU.ExtraArgs.push_back("-std=c++17"); TU.ExtraArgs.push_back("-fno-delayed-template-parsing"); +// Types might be different depending on the target triplet, we chose a

[PATCH] D73613: [clangd][Hover] Make tests hermetic by setting target triplet

2020-01-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 241085. kadircet marked 4 inline comments as done. kadircet added a comment. - Add fixme for delayed-template-parsing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73613/new/ https://reviews.llvm.org/D73613 F

[PATCH] D73615: [clangd] Get rid of delayed template parsing

2020-01-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. No need to pass fno-delayed-template-parsing as the opposite flag is only passed to cc1 when abi is set

[PATCH] D73613: [clangd][Hover] Make tests hermetic by setting target triplet

2020-01-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG55b0e9c9d5de: [clangd][Hover] Make tests hermetic by setting target triplet (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73613/new/

[PATCH] D73615: [clangd] Get rid of delayed template parsing

2020-01-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7830c2d44f53: [clangd] Get rid of delayed template parsing (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73615/new/ https://reviews.

[PATCH] D73628: [clangd] Log directory when a CDB is loaded

2020-01-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Fixes https://github.com/clangd/clangd/issues/268 Repository: rG LLVM Github Monorepo https://revi

[PATCH] D73628: [clangd] Log directory when a CDB is loaded

2020-01-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 241388. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73628/new/ https://reviews.llvm.org/D73628 Files: clang-tools-ex

[PATCH] D73628: [clangd] Log directory when a CDB is loaded

2020-01-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4fb1adcde22c: [clangd] Log directory when a CDB is loaded (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73628/new/ https://reviews.l

[PATCH] D73693: [clang][DeclPrinter] Implement visitors for {TemplateType,NonTypeTemplate}Parms

2020-01-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, kristof.beyls. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73693 Files: clang-tools-extra/clangd/unitte

[PATCH] D73696: [clang][Index] Introduce a TemplateParm SymbolKind

2020-01-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, ilya-biryukov, kristof.beyls. Herald added a project: clang. Currently template parameters has symbolkind `Unknown`. This patch introduces a new kind `Templat

[PATCH] D73723: [clangd][Hover] Handle uninstantiated default args

2020-01-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. Default args might exist but be unparsed or uninstantiated. getDefaultArg asserts on those. This patch ma

[PATCH] D73780: [clangd] Separate protobuf-related functions to a dedicated file.

2020-01-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. LG. I might be missing some context though, what's the reasoning behind? Because, I think it is not necessary to treat protobufs differently. It might be sensible to have a more generic `isSymbolFromGeneratedFile` filter, but also for this one I don't see any developme

[PATCH] D73723: [clangd][Hover] Handle uninstantiated default args

2020-01-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 241707. kadircet marked an inline comment as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73723/new/ https://reviews.llvm.org/D73723 Files: clang-tools-ex

[PATCH] D73723: [clangd][Hover] Handle uninstantiated default args

2020-01-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9c903d0373ff: [clangd][Hover] Handle uninstantiated default args (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73723/new/ https://re

[PATCH] D146026: [clangd] Patch PragmaMarks in preamble section of the file

2023-03-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 505091. kadircet marked an inline comment as done. kadircet added a comment. - Use collectPragmaMarksCallback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146026/new/ https://reviews.llvm.org/D146026 Files:

[PATCH] D146026: [clangd] Patch PragmaMarks in preamble section of the file

2023-03-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Preamble.cpp:576 + +std::vector getPragmaMarks(const ScannedPreamble &Modified) { + std::vector Marks; hokein wrote: > any reason not calling `collectPragmaMarksCallback` just like the > https

[PATCH] D146028: [clangd] Patch main file macros in preamble

2023-03-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 505093. kadircet marked an inline comment as done. kadircet added a comment. - Rebase - Prevent unnecessary copies Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146028/new/ https://reviews.llvm.org/D146028 Fi

[PATCH] D146026: [clangd] Patch PragmaMarks in preamble section of the file

2023-03-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9c888120e3c8: [clangd] Patch PragmaMarks in preamble section of the file (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146026/new/ h

[PATCH] D146028: [clangd] Patch main file macros in preamble

2023-03-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG82c8bf8fcc91: [clangd] Patch main file macros in preamble (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146028/new/ https://reviews.

[PATCH] D146116: [clangd] Respect WantDiags when emitting diags from possibly stale preambles

2023-03-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added subscribers: arphaman, javed.absar. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Rep

[PATCH] D146116: [clangd] Respect WantDiags when emitting diags from possibly stale preambles

2023-03-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9e8bac748064: [clangd] Respect WantDiags when emitting diags from possibly stale preambles (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D146202: [clang] Fix a UsingTemplate regression after 3e78fa860235431323aaf08c8fa922d75a7cfffa

2023-03-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a subscriber: ChuanqiXu. kadircet added a comment. This revision is now accepted and ready to land. FWIW, I believe this patch does the right thing by marking the `DeducedTemplateSpecializationType` as `using`. It's explicitly introduced into the g

[PATCH] D143755: [clang-format] Add a space between an overloaded operator and '>'

2023-03-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Hi @owenpan, this seems to be crashing for: struct Foo { operator enum foo{} }; with stack trace: $ ~/repos/llvm/build/bin/clang-format format_crash.cc --dry-run clang-format: /usr/local/google/home/kadircet/repos/llvm/clang/lib/Format/TokenAnnotator.cpp:1229:

[PATCH] D146406: [IncludeCleaner][clangd] Mark umbrella headers as users of private

2023-03-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added a subscriber: arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added projects: clang, clang-tools-extra. Private h

[PATCH] D146417: [clangd] Fix AddUsing in the face of typo-correction

2023-03-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added a subscriber: arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Fixes https://g

[PATCH] D146279: [clangd] Extend CollectMainFileMacros.

2023-03-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks! Comment at: clang-tools-extra/clangd/CollectMacros.h:48 public: - explicit CollectMainFileMacros(const SourceManager &SM, MainFileMacros &Out) - : SM(SM),

[PATCH] D146406: [IncludeCleaner][clangd] Mark umbrella headers as users of private

2023-03-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/Analysis.cpp:100 + // Check if main file is the public interface for a private header. If so + // we shouldn't diagnose it as unused. + if (auto PHeader = PI->getPublic(I.Resolved); !

[PATCH] D146417: [clangd] Fix AddUsing in the face of typo-correction

2023-03-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6f23fee4ef98: [clangd] Fix AddUsing in the face of typo-correction (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D145843: [clangd] Add option to always insert headers with <> instead of ""

2023-03-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. sorry but I am not sure what's the value proposed by this patch in its current form. in https://github.com/clangd/clangd/issues/1247 and other places we've discussed this, i believe the sentiment was towards providing a config option that'll let people customize header

[PATCH] D146426: [Sema] Fix crash on __fp16 parameters in template instantiations

2023-03-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. as discussed offline, this feels a little fishy and we should probably try and not put nulls into the parameter lists at all (and mark the functiontype as invalid instead), but since i don

[PATCH] D145843: [clangd] Add option to always insert headers with <> instead of ""

2023-03-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a subscriber: sammccall. kadircet added a comment. In D145843#4207101 , @nridge wrote: > My understanding is that a more elaborate configuration scheme has been > proposed in https://github.com/clangd/clangd/issues/1367, and the feedback

[PATCH] D146417: [clangd] Fix AddUsing in the face of typo-correction

2023-03-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 506723. kadircet added a comment. Disable msvc compatibility to enable typo-correction on windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146417/new/ https://reviews.llvm.org/D146417 Files: clang-too

[PATCH] D146490: [Support] On Windows, ensure that UniqueID is really stable

2023-03-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. > To fix the issue, we keep the file handles open during the lifetime of their > corresponding UniqueID instances. Since handles will live longer now, this > requires particular attention when performing some file actions, such as file > deletions. I am a little worri

[PATCH] D146490: [Support] On Windows, ensure that UniqueID is really stable

2023-03-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D146490#4209495 , @aganea wrote: > Fair enough. There are several choices forward: either we mark the issue as > "Will Not Fix" or I can try only scoping this patch to only keep the handle > open for network drives/paths. An

[PATCH] D146417: [clangd] Fix AddUsing in the face of typo-correction

2023-03-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet closed this revision. kadircet added a comment. relanded in 35c2aac6e3957c2e82bf92269039fa02bab0e1d9 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146417/new/ https://r

[PATCH] D146634: [clang][USR] Prevent crashes when parameter lists have nulls

2023-03-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added a subscriber: arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Similar to D146426 Repository: rG LLVM Github

[PATCH] D146634: [clang][USR] Prevent crashes when parameter lists have nulls

2023-03-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. I am aware that this null checking at leaves are not considered a sustainable solution and I agree with the sentiment there. But we're seeing an increasing number of crashes in production on invalid code recently. Happy to take a different course if there are alternati

[PATCH] D146406: [IncludeCleaner][clangd] Mark umbrella headers as users of private

2023-03-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 2 inline comments as done. kadircet added a comment. thanks a lot for the review! Comment at: clang-tools-extra/include-cleaner/lib/Analysis.cpp:100 + // Check if main file is the public interface for a private header. If so + // we shouldn't diagnose

[PATCH] D146406: [IncludeCleaner][clangd] Mark umbrella headers as users of private

2023-03-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 507701. kadircet added a comment. - address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146406/new/ https://reviews.llvm.org/D146406 Files: clang-tools-extra/clangd/IncludeCleaner.cpp clang-too

[PATCH] D146406: [IncludeCleaner][clangd] Mark umbrella headers as users of private

2023-03-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG43fcfdb1d6a6: [IncludeCleaner][clangd] Mark umbrella headers as users of private (authored by kadircet). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D146732: [include-cleaner] Attribute references to explicit specializations

2023-03-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added a project: All. kadircet requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/61652 Repository: rG

[PATCH] D146717: [clangd] Handle the C++2b elifdef and elindef PP structure in CollectMainFileMacros.

2023-03-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks, LG apart from the using decls Comment at: clang-tools-extra/clangd/CollectMacros.h:69 const MacroDefinition &MD) override; + using PPCallbacks::Elifdef; + using PPCallbacks::Elifndef; why do we have these using

[PATCH] D146727: [clangd] Use expansion location for missing include diagnostics.

2023-03-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:382 -auto &Tokens = AST.getTokens(); -auto SpelledForExpanded = -Tokens.spelledForExpanded(Tokens.expandedTokens(Ref.RefLocation)); -if (!SpelledForExpand

[PATCH] D146732: [include-cleaner] Attribute references to explicit specializations

2023-03-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 3 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/WalkAST.cpp:82 +if (llvm::isa(ND) || !RD) + return ND; +return RD; hokein wrote: > We seem to miss a testcase for `TypeAliasT

[PATCH] D146732: [include-cleaner] Attribute references to explicit specializations

2023-03-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 508025. kadircet marked an inline comment as done. kadircet added a comment. - use isa_and_present - indentation for tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146732/new/ https://reviews.llvm.org/D14

[PATCH] D146732: [include-cleaner] Attribute references to explicit specializations

2023-03-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG03101e141bf7: [include-cleaner] Attribute references to explicit specializations (authored by kadircet). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D146244: [clangd] Show used symbols on #include line hover.

2023-03-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. (pardon the interruption, some drive-by comments :)) Comment at: clang-tools-extra/clangd/Hover.cpp:1174 + return; + +for (const include_cleaner::Header &H : Providers) { note that we don't care about each reference of

[PATCH] D146916: [include-cleaner] Fix crash on unresolved headers

2023-03-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added a project: All. kadircet requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Make sure unresolved headers are not analyzed as part of unused includes. Also introduces a testing fixture f

[PATCH] D146916: [include-cleaner] Fix crash on unresolved headers

2023-03-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf5b6e9b6d355: [include-cleaner] Fix crash on unresolved headers (a

[PATCH] D146941: [clangd] Use all inputs to SystemIncludeExtractor in cache key

2023-03-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: nridge. Herald added a subscriber: arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Instead of pass

[PATCH] D138546: Clangd: Preserve target flags in system includes extractor

2023-03-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Sorry I was waiting for D139277 to land, but it seems to be stuck so sent out D146941 . Let's take a look at this again after that one lands CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1385

[PATCH] D146727: [clangd] Use expansion location for missing include diagnostics.

2023-03-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:380 +auto Loc = SM.getFileLoc(Ref.RefLocation); +auto Range = Lexer::makeFileCharRange( +CharSourceRange{SourceRange{Loc}, true}, SM, AST.getLangOpts()); --

[PATCH] D146727: [clangd] Use expansion location for missing include diagnostics.

2023-03-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:380 +auto Loc = SM.getFileLoc(Ref.RefLocation); +auto Range = Lexer::makeFileCharRange( +CharSourceRange{SourceRange{Loc}, true}, SM, AST.getLangOpts()); --

[PATCH] D146727: [clangd] Use expansion location for missing include diagnostics.

2023-03-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146727/new/ https://reviews.llvm.org/D146727

[PATCH] D146244: [clangd] Show used symbols on #include line hover.

2023-03-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:1173 +if (Ref.RT != include_cleaner::RefType::Explicit || +UsedSymbolNames.find(getRefName(Ref)) != UsedSymbolNames.end()) + return; creating these symbol

[PATCH] D146634: [clang][USR] Prevent crashes when parameter lists have nulls

2023-03-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 508934. kadircet added a comment. Herald added a project: clang-tools-extra. - Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146634/new/ https://reviews.llvm.org/D146634 Files: clang-tools-extra/cl

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-03-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. i've added a reproducer for https://reviews.llvm.org/D146634, can you patch that into here? unfortunately i couldn't get it to crash in any place other than through clangd. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14

[PATCH] D146244: [clangd] Show used symbols on #include line hover.

2023-03-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. thanks the pieces i looked at LG too Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146244/new/ https://reviews.llvm.org/D146244 ___ cfe-commits

[PATCH] D146717: [clangd] Handle the C++2b elifdef and elindef PP structure in CollectMainFileMacros.

2023-03-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146717/new/ https://reviews.llvm.org/D146717 _

[PATCH] D147139: [clangd] Map references from include'd files to directives

2023-03-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added a subscriber: arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository: r

[PATCH] D147144: [include-cleaner] Report references to operator calls as implicit

2023-03-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added a project: All. kadircet requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Missing these references can result in false negatives in the used-ness ana

[PATCH] D145364: [include-cleaner] Fix a crash on non-identifier-name symbols.

2023-03-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, LGTM! Comment at: clang-tools-extra/include-cleaner/test/nocrash.cpp:1 +// RUN: clang-include-cleaner %s -- + hokein wrote: > I have considered t

[PATCH] D145365: [Tooling/Inclusion] Add missing index_sequence symbols.

2023-03-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc:252 +// Remove them when the cppreference offline archive catches up. +SYMBOL(index_sequence, std::, ) +SYMBOL(index_sequence_for, std::, ) there's also `integ

[PATCH] D145365: [Tooling/Inclusion] Add missing index_sequence symbols.

2023-03-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc:252 +// Remove them when the cppreference offline archive catches up. +SYMBOL(index_sequence,

[PATCH] D143496: [clangd] Add support for missing includes analysis.

2023-03-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks, looks great! Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:451 + tooling::HeaderIncludes HeaderIncludes(AST.tuPath(), Code, + tooling::IncludeStyle{}); + const SourceManager &SM = AST.getSourc

[PATCH] D145228: [clangd] Add clangd headers to install targets

2023-03-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet requested changes to this revision. kadircet added a comment. This revision now requires changes to proceed. i agree with Sam's concerns here. clangd isn't designed to be consumed as a library, but rather as a binary through LSP. increasing surface are here and letting people build appl

[PATCH] D143496: [clangd] Add support for missing includes analysis.

2023-03-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:456 + auto IncludeStyle = + clang::format::getLLVMStyle().IncludeStyle; + auto DefaultStyle = clang::format::getStyle( creating a copy of LLVM style unnecessarily all t

[PATCH] D143496: [clangd] Add support for missing includes analysis.

2023-03-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks for bearing with me, let's ship it! Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:456 + tooling::IncludeStyle IncludeStyle; + auto DefaultStyle = forma

[PATCH] D145553: [Tooling/Inclusion] Add missing placerholder _1 symbols.

2023-03-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc:260 +// text, which are not handled by the script. +// N is an implementation-defined number,

[PATCH] D143436: [clangd] Move standard options adaptor to CommandMangler

2023-03-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. > @kadircet it is obvious that there is something in this diff that causes this > hesitancy in accepting it. I'm ready to keep iterating on the solution but I > need a clue what needs the improvement. Please comment. sorry for the late reply, i was on vacation and just

[PATCH] D145773: [clangd] UnusedIncludes: Strict config now uses the include-cleaner-library implementation.

2023-03-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ConfigCompile.cpp:438 + .map("Experiment", + Config::IncludesPolicy::Strict) // for backward + //

[PATCH] D145776: [clangd] Remove the classical clangd-own unsued-include implementation.

2023-03-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. i'd still merge this with the previous patch, as all of this is dead code after config option deletion. so it'd be better to just revert a single patch if we want to restore the old behavi

[PATCH] D145773: [clangd] UnusedIncludes: Strict config now uses the include-cleaner-library implementation.

2023-03-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/ConfigCompile.cpp:438 + .map("Experiment", + Config::IncludesPolicy::Strict)

[PATCH] D145921: [clangd] Add missing unittests to build graph

2023-03-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, hokein. Herald added a subscriber: arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Also

[PATCH] D127184: [clangd] Add to header map

2023-03-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. we can also handle them through the stdlib symbol mappings, see https://github.com/llvm/llvm-project/issues/61373 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127184/new/ https://reviews.llvm.org/D127184 ___

[PATCH] D145921: [clangd] Add missing unittests to build graph

2023-03-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 504597. kadircet marked an inline comment as done. kadircet added a comment. - Disable special members tweaks on unions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145921/new/ https://reviews.llvm.org/D14592

[PATCH] D145921: [clangd] Add missing unittests to build graph

2023-03-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/tweaks/SpecialMembersTests.cpp:21 EXPECT_UNAVAILABLE("struct S { ^ };"); - EXPECT_UNAVAILABLE("union ^U {};"); + EXPECT_AVAILABLE("union ^U {};"); EXP

[PATCH] D143436: [clangd] Move standard options adaptor to CommandMangler

2023-03-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Comment at: clang-tools-extra/clangd/CompileCommands.cpp:199 + // use/change working directory, which ExpandResponseFiles doesn't). + FS = llvm::vfs::getR

[PATCH] D145921: [clangd] Add missing unittests to build graph

2023-03-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe26dad0a661e: [clangd] Add missing unittests to build graph (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146024: [clangd] Drop stale macro and mark ranges

2023-03-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added a subscriber: arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. I'll follow up

[PATCH] D146026: [clangd] Patch PragmaMarks in preamble section of the file

2023-03-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added a subscriber: arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository: r

[PATCH] D146028: [clangd] Patch main file macros in preamble

2023-03-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added a subscriber: arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Depends on D146026

[PATCH] D146021: [Tooling/Inclusion] Index more sub std namespace symbols.

2023-03-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146021/new/ https://reviews.llvm.org/D146021

[PATCH] D146024: [clangd] Drop stale macro and mark ranges

2023-03-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. kadircet marked an inline comment as done. Closed by commit rGc11c2f5f6548: [clangd] Drop stale macro and mark ranges (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D146024?vs=504990&id=505046#t

[PATCH] D153330: [include-cleaner] Ignore the ParmVarDecl itself in WalkAST.cpp

2023-06-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks! Comment at: clang-tools-extra/include-cleaner/lib/WalkAST.cpp:219 +// as they don't contribute to the main-file #include. +if (isa(VD)) + return true

[PATCH] D150978: [clang][Sema] Add CodeCompletionContext::CCC_ObjCClassForwardDecl

2023-06-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:407 +// reference the declaration. +if (ContextKind == CodeCompletionContext::CCC_ObjCClassForwardDecl) + ShouldInsert = false; rather than doing this here, can you

[PATCH] D152900: [clangd] Update symbol collector to use include-cleaner.

2023-06-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ParsedAST.cpp:628 CanonIncludes.addSystemHeadersMapping(Clang->getLangOpts()); - std::unique_ptr IWYUHandler = - collectIWYUHeaderMaps(&CanonIncludes); can you also add a FIXME here s

[PATCH] D153340: [include-cleaner] Add an IgnoreHeaders flag to the command-line tool.

2023-06-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:54 +"ignore-headers", +cl::desc("A comma-separated list of headers to ignore."), +cl::init(""), `A comma-separated list of regexes to match against s

[PATCH] D153259: [clangd] Store offsets in MacroOccurrence

2023-06-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Comment at: clang-tools-extra/clangd/CollectMacros.cpp:37 Out.Names.insert(Name); - auto Range = halfOpenToRange( - SM, CharSourceRange::getCharRan

[PATCH] D145302: [clangd] Add library for clangd main function

2023-06-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks LG and seems to be working in a couple build configurations I tried. but there might still be breakages in different configs, so please be on the watchout after landing this for breakages in https://lab.llvm.org/. FWIW something like: # Needed by LLVM's CMake

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:164 AST.getHeuristicResolver())) { Result.insert(canonicalRenameDecl(D)); } before calling `canonicalRenameDecl` here we can do a `D = pickInteres

[PATCH] D147034: [clangd] Replace the hacky include-cleaner macro-reference implementation.

2023-06-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:360 +for (const auto &Ref : Refs) { + SourceLocation Loc = SM.getLocForStartOfFile(SM.getMainFileID()

[PATCH] D152900: [clangd] Update symbol collector to use include-cleaner.

2023-06-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:846 +void SymbolCollector::setSymbolProviders( +const Symbol &S, const llvm::SmallVector Headers) { + if (Opts.CollectIncludePath && kadircet wrote: > what about

[PATCH] D152720: [clangd][ObjC] Support ObjC class rename from implementation decls

2023-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks! Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:144 +const NamedDecl *pickInterestingTarget(const NamedDecl *D) { + // We only support renaming the cl

[PATCH] D152686: [clangd] Enforce strict unused includes by default

2023-06-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D152686#4449481 , @cjdb wrote: > This patch seems to have broken clangd for a project of mine. Most of my > headers are now flagged as not being directly used even though they're the > root header for the symbol. replied on

[PATCH] D153882: [clangd] Always allow diagnostics from stale preambles

2023-06-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added subscribers: arphaman, javed.absar. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. We'

[PATCH] D153882: [clangd] Always allow diagnostics from stale preambles

2023-06-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 534995. kadircet added a comment. - Squash base commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153882/new/ https://reviews.llvm.org/D153882 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-

[PATCH] D150978: [clang][Sema] Add CodeCompletionContext::CCC_ObjCClassForwardDecl

2023-06-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150978/new/ https://reviews.llvm.org/D150978 _

[PATCH] D153882: [clangd] Always allow diagnostics from stale preambles

2023-06-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/ConfigYAML.cpp:137 Dict.handle("ClangTidy", [&](Node &N) { parse(F.ClangTidy, N); }); -Dict.handle("AllowStalePreamble", [&](Node &N) { - F.AllowStalePrea

[PATCH] D153882: [clangd] Always allow diagnostics from stale preambles

2023-06-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. kadircet marked an inline comment as done. Closed by commit rGbd89f9ec293e: [clangd] Always allow diagnostics from stale preambles (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D153882?vs=53499

<    29   30   31   32   33   34   35   36   37   38   >