[PATCH] D93164: [AST] Add generator for source location introspection

2022-01-19 Thread Lance Fredrickson via Phabricator via cfe-commits
lancethepants added a comment. > @lancethepants @smeenai thanks for the pointers! Unfortunately, it still > doesn't work for me after passing -DCMAKE_SYSTEM_NAME="Linux". Passing that > option did change the CMake output, so it's definitely recognized at least > (the messages about which saniti

[PATCH] D93164: [AST] Add generator for source location introspection

2022-01-19 Thread Andrew Anderson via Phabricator via cfe-commits
andrew-wja added a comment. In D93164#3252509 , @lancethepants wrote: > In D93164#3250945 , @andrew-wja > wrote: > >> In D93164#3048130 , @lancethepants >> wrote: >> >>> I

[PATCH] D93164: [AST] Add generator for source location introspection

2022-01-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D93164#3252509 , @lancethepants wrote: > In D93164#3250945 , @andrew-wja > wrote: > >> In D93164#3048130 , @lancethepants >> wrote: >> >>> In D

[PATCH] D93164: [AST] Add generator for source location introspection

2022-01-18 Thread Lance Fredrickson via Phabricator via cfe-commits
lancethepants added a comment. In D93164#3048130 , @lancethepants wrote: > In D93164#2653067 , @mgorny wrote: > >> This change breaks cross-compilation now, as it tries running an executable >> built for the targe

[PATCH] D93164: [AST] Add generator for source location introspection

2022-01-18 Thread Andrew Anderson via Phabricator via cfe-commits
andrew-wja added a comment. In D93164#3048130 , @lancethepants wrote: > In D93164#2653067 , @mgorny wrote: > >> This change breaks cross-compilation now, as it tries running an executable >> built for the target s

[PATCH] D93164: [AST] Add generator for source location introspection

2021-11-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/lib/Tooling/CMakeLists.txt:29-30 +if (NOT Python3_EXECUTABLE +OR WIN32 +OR APPLE +OR GENERATOR_IS_MULTI_CONFIG smeenai wrote: > I'm looking at this commit in the context of > https://bugs.llvm.org/sho

[PATCH] D93164: [AST] Add generator for source location introspection

2021-11-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: clang/lib/Tooling/CMakeLists.txt:29-30 +if (NOT Python3_EXECUTABLE +OR WIN32 +OR APPLE +OR GENERATOR_IS_MULTI_CONFIG I'm looking at this commit in the context of https://bugs.llvm.org/show_bug.cgi?id=52106.

[PATCH] D93164: [AST] Add generator for source location introspection

2021-10-07 Thread Lance Fredrickson via Phabricator via cfe-commits
lancethepants added a comment. In D93164#2653067 , @mgorny wrote: > This change breaks cross-compilation now, as it tries running an executable > built for the target system: > > FAILED: tools/clang/lib/Tooling/ASTNodeAPI.json > cd /home/mgorny/llvm-

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-26 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. This change breaks cross-compilation now, as it tries running an executable built for the target system: FAILED: tools/clang/lib/Tooling/ASTNodeAPI.json cd /home/mgorny/llvm-project/build.arm64/tools/clang/lib/Tooling && /home/mgorny/llvm-project/build.arm64/bin/cla

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-16 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. In D93164#2630534 , @steveire wrote: > In D93164#2630203 , @nathanchance > wrote: > >> I am seeing a spew of errors after 19740652c4c4329e2b9e77f96e5e31c360b4e8bb >>

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D93164#2630203 , @nathanchance wrote: > I am seeing a spew of errors after 19740652c4c4329e2b9e77f96e5e31c360b4e8bb > (what > appears to be the latest ver

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-16 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. I am seeing a spew of errors after 19740652c4c4329e2b9e77f96e5e31c360b4e8bb (what appears to be the latest version of this patch): $ cmake \ -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAK

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. ast-dump-tool is still somewhere in lib/ instead of in tools/ in the reland as far as I can tell. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 ___

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG477e4b974653: [AST] Add generator for source location introspection (authored by stephenkelly). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://re

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. It may be wise to alter this so there is no need for the python script. How about altering the dump tool to support outputting both json files and the cpp code needed for node introspection. Maybe have arguments to the tool `--json-output-path` and `--introspection-outp

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py:1 +#!/usr/bin/python +# -*- coding: utf-8 -*- Maybe this should be `#!/use/bin/env python` (or python3) instead? Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. @steveire When running the command manually I get: /root/llvm-compile-time-tracker/llvm-project/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py --json-input-path /root/llvm-compile-time-tracker/llvm-project-build/ASTNodeAPI.json --output-file generated/NodeIntrosp

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D93164#2624798 , @nikic wrote: > Reverted in > https://github.com/llvm/llvm-project/commit/e0f70a8a979f5b843e90a0a20442ca79e2507208 > due to build failure. @nikic How do I run a test build on that machine? Or can you diagno

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D93164#2624798 , @nikic wrote: > Reverted in > https://github.com/llvm/llvm-project/commit/e0f70a8a979f5b843e90a0a20442ca79e2507208 > due to build failure. Was the problem there just the shebang line? Repository: rG LLVM

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Nikita Popov via Phabricator via cfe-commits
nikic reopened this revision. nikic added a comment. This revision is now accepted and ready to land. Reverted in https://github.com/llvm/llvm-project/commit/e0f70a8a979f5b843e90a0a20442ca79e2507208 due to build failure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D93164#2624760 , @dmgreen wrote: > Hello. Does this work when the default target triple isn't native? This seems > to be trying to compile clang sources with the just built clang - something > that I don't think is always pos

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D93164#2624690 , @thakis wrote: > A few more high-level questions: > > - What's the point of the intermediary json file? Why not generate the final > c++ directly? (As far as I can tell, this wasn't discussed during the review

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. Hello. Does this work when the default target triple isn't native? This seems to be trying to compile clang sources with the just built clang - something that I don't think is always possible. I'm seeing errors like `fatal error: 'cstddef' file not found`, and failing t

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Nico Weber via Phabricator via cfe-commits
thakis added a subscriber: rsmith. thakis added a comment. A few more high-level questions: - What's the point of the intermediary json file? Why not generate the final c++ directly? (As far as I can tell, this wasn't discussed during the review yet) - Do we need to generate code for this at al

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. @thakis Presumably you'll have to update the GN build now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 ___ cfe-commits mailing list

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Stephen Kelly 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 rGd627a27d264b: [AST] Add generator for source location introspection (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. nit: A few reformat hints Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 9 inline comments as done. steveire added inline comments. Comment at: clang/lib/Tooling/CMakeLists.txt:99 + NodeIntrospection.cpp + NodeIntrospection.inc Tooling.cpp njames93 wrote: > This shouldn't appear in the source list. We need to tell

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 329759. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 329737. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 329735. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This is almost ready but a few more points need addressing. Running clang-format over the inc file is pointless and just extends compilation time while adding an unnecessary dependency on clang-format. The inc file should likely live in the include build directory, All t

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 329509. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326997. steveire marked an inline comment as done. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Toolin

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 2 inline comments as done. steveire added inline comments. Comment at: clang/include/clang/Tooling/NodeIntrospection.h:54 +public: + static std::string format(LocationCall *Call) { +std::vector vec; njames93 wrote: > Should this (and potentia

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 3 inline comments as done. steveire added inline comments. Comment at: clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp:22-25 +auto publicAccessor = [](auto... InnerMatcher) { + return cxxMethodDecl(isPublic(), parameterCountIs(0), isConst(), +

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326987. steveire marked 7 inline comments as done. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Toolin

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326986. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326985. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Another point, is there any use case of this outside of clang-query. If not would it not be wise to move this infrastructure to clang-tools-extra/clang-query? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ http

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Mostly mechanical changes requested here. In D93164#2456247 , @steveire wrote: > @thakis FYI - I think the GN build would need to be adapted to this. FWIW the GN build has a bot that can typically update its gn files. ===

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326923. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 326922. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/include/clang/Tooling/NodeIntrospection.h clang/lib/Tooling/C

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 312039. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/lib/Tooling/CMakeLists.txt clang/lib/Tooling/DumpTool/APIData

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a subscriber: thakis. steveire added a comment. @thakis FYI - I think the GN build would need to be adapted to this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 __

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 312033. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/lib/Tooling/CMakeLists.txt clang/lib/Tooling/DumpTool/APIData

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 312027. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/lib/Tooling/CMakeLists.txt clang/lib/Tooling/DumpTool/APIData

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 312026. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/lib/Tooling/CMakeLists.txt clang/lib/Tooling/DumpTool/APIData

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 3 inline comments as done. steveire added inline comments. Comment at: clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp:40 + // TODO: Extend this with other clades + namedDecl(hasName("clang::Stmt")).bind("nodeClade")), + option

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 312024. steveire marked 19 inline comments as done. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/lib/Tooling/CMakeLi

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. > Do I understand correctly that the workflow is to use the new dumping tool to > generate the needed JSON file that then gets used as input to > generate_cxx_src_locs.py which creates NodeLocationIntrospection.cpp/.h that > then gets used by clang-query (eventually)?

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 312023. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/lib/Tooling/CMakeLists.txt clang/lib/Tooling/DumpTool/APIData

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Do I understand correctly that the workflow is to use the new dumping tool to generate the needed JSON file that then gets used as input to generate_cxx_src_locs.py which creates NodeLocationIntrospection.cpp/.h that then gets used by clang-query (eventually)? So

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 311398. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 Files: clang/lib/Tooling/CMakeLists.txt clang/lib/Tooling/DumpTool/APIData

[PATCH] D93164: [AST] Add generator for source location introspection

2020-12-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, njames93. Herald added a subscriber: mgorny. steveire requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Generate a json file