[all-commits] [llvm/llvm-project] b97856: [pseudo] Move pseudoparser from clang to clang-too...

Sam McCall via All-commits all-commits at lists.llvm.org
Tue Mar 15 16:14:28 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b97856c4cfe7efb13887d5691002a7aa38440924
      https://github.com/llvm/llvm-project/commit/b97856c4cfe7efb13887d5691002a7aa38440924
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2022-03-16 (Wed, 16 Mar 2022)

  Changed paths:
    M clang-tools-extra/CMakeLists.txt
    A clang-tools-extra/pseudo/CMakeLists.txt
    A clang-tools-extra/pseudo/README.md
    A clang-tools-extra/pseudo/include/clang-pseudo/DirectiveMap.h
    A clang-tools-extra/pseudo/include/clang-pseudo/Grammar.h
    A clang-tools-extra/pseudo/include/clang-pseudo/LRGraph.h
    A clang-tools-extra/pseudo/include/clang-pseudo/LRTable.h
    A clang-tools-extra/pseudo/include/clang-pseudo/Token.h
    A clang-tools-extra/pseudo/lib/CMakeLists.txt
    A clang-tools-extra/pseudo/lib/DirectiveMap.cpp
    A clang-tools-extra/pseudo/lib/Grammar.cpp
    A clang-tools-extra/pseudo/lib/GrammarBNF.cpp
    A clang-tools-extra/pseudo/lib/LRGraph.cpp
    A clang-tools-extra/pseudo/lib/LRTable.cpp
    A clang-tools-extra/pseudo/lib/LRTableBuild.cpp
    A clang-tools-extra/pseudo/lib/Lex.cpp
    A clang-tools-extra/pseudo/lib/Token.cpp
    A clang-tools-extra/pseudo/lib/cxx.bnf
    A clang-tools-extra/pseudo/test/CMakeLists.txt
    A clang-tools-extra/pseudo/test/Unit/lit.cfg.py
    A clang-tools-extra/pseudo/test/Unit/lit.site.cfg.py.in
    A clang-tools-extra/pseudo/test/check-cxx-bnf.test
    A clang-tools-extra/pseudo/test/lex.c
    A clang-tools-extra/pseudo/test/lit.cfg.py
    A clang-tools-extra/pseudo/test/lit.local.cfg
    A clang-tools-extra/pseudo/test/lit.site.cfg.py.in
    A clang-tools-extra/pseudo/test/lr-build-basic.test
    A clang-tools-extra/pseudo/test/lr-build-conflicts.test
    A clang-tools-extra/pseudo/tool/CMakeLists.txt
    A clang-tools-extra/pseudo/tool/ClangPseudo.cpp
    A clang-tools-extra/pseudo/unittests/CMakeLists.txt
    A clang-tools-extra/pseudo/unittests/DirectiveMapTest.cpp
    A clang-tools-extra/pseudo/unittests/GrammarTest.cpp
    A clang-tools-extra/pseudo/unittests/LRTableTest.cpp
    A clang-tools-extra/pseudo/unittests/TokenTest.cpp
    R clang/include/clang/Tooling/Syntax/Pseudo/DirectiveMap.h
    R clang/include/clang/Tooling/Syntax/Pseudo/Grammar.h
    R clang/include/clang/Tooling/Syntax/Pseudo/LRGraph.h
    R clang/include/clang/Tooling/Syntax/Pseudo/LRTable.h
    R clang/include/clang/Tooling/Syntax/Pseudo/Token.h
    M clang/lib/Tooling/Syntax/CMakeLists.txt
    R clang/lib/Tooling/Syntax/Pseudo/CMakeLists.txt
    R clang/lib/Tooling/Syntax/Pseudo/DirectiveMap.cpp
    R clang/lib/Tooling/Syntax/Pseudo/Grammar.cpp
    R clang/lib/Tooling/Syntax/Pseudo/GrammarBNF.cpp
    R clang/lib/Tooling/Syntax/Pseudo/LRGraph.cpp
    R clang/lib/Tooling/Syntax/Pseudo/LRTable.cpp
    R clang/lib/Tooling/Syntax/Pseudo/LRTableBuild.cpp
    R clang/lib/Tooling/Syntax/Pseudo/Lex.cpp
    R clang/lib/Tooling/Syntax/Pseudo/README.md
    R clang/lib/Tooling/Syntax/Pseudo/Token.cpp
    R clang/lib/Tooling/Syntax/Pseudo/cxx.bnf
    R clang/test/Syntax/check-cxx-bnf.test
    R clang/test/Syntax/lex.c
    R clang/test/Syntax/lit.local.cfg
    R clang/test/Syntax/lr-build-basic.test
    R clang/test/Syntax/lr-build-conflicts.test
    M clang/tools/CMakeLists.txt
    R clang/tools/clang-pseudo/CMakeLists.txt
    R clang/tools/clang-pseudo/ClangPseudo.cpp
    M clang/unittests/Tooling/Syntax/CMakeLists.txt
    R clang/unittests/Tooling/Syntax/Pseudo/CMakeLists.txt
    R clang/unittests/Tooling/Syntax/Pseudo/DirectiveMapTest.cpp
    R clang/unittests/Tooling/Syntax/Pseudo/GrammarTest.cpp
    R clang/unittests/Tooling/Syntax/Pseudo/LRTableTest.cpp
    R clang/unittests/Tooling/Syntax/Pseudo/TokenTest.cpp

  Log Message:
  -----------
  [pseudo] Move pseudoparser from clang to clang-tools-extra

This should make clearer that:
 - it's not part of clang proper
 - there's no expectation to update it along with clang (beyond green tests)
 - clang should not depend on it

This is intended to be expose a library, so unlike other tools has a split
between include/ and lib/.

The main renames are:
  clang/lib/Tooling/Syntax/Pseudo/*           => clang-tools-extra/pseudo/lib/*
  clang/include/clang/Tooling/Syntax/Pseudo/* => clang-tools-extra/pseudo/include/clang-pseudo/*
  clang/tools/clang/pseudo/*                  => clang-tools-extra/pseudo/tool/*
  clang/test/Syntax/*                         => clang-tools-extra/pseudo/test/*
  clang/unittests/Tooling/Syntax/Pseudo/*     => clang-tools-extra/pseudo/unittests/*
  #include "clang/Tooling/Syntax/Pseudo/*"    => #include "clang-pseudo/*"
  namespace clang::syntax::pseudo             => namespace clang::pseudo
  check-clang                                 => check-clang-pseudo
  clangToolingSyntaxPseudo                    => clangPseudo
The clang-pseudo and ClangPseudoTests binaries are not renamed.

See discussion around:
https://discourse.llvm.org/t/rfc-a-c-pseudo-parser-for-tooling/59217/50

Differential Revision: https://reviews.llvm.org/D121233




More information about the All-commits mailing list