[all-commits] [llvm/llvm-project] d4ef65: Rename APIs in unittests/AST/Language.h in prepara...

Dmitri Gribenko via All-commits all-commits at lists.llvm.org
Fri May 29 05:28:03 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d4ef654673a921878ba5aedb9725b2ac32681f01
      https://github.com/llvm/llvm-project/commit/d4ef654673a921878ba5aedb9725b2ac32681f01
  Author: Dmitri Gribenko <gribozavr at gmail.com>
  Date:   2020-05-29 (Fri, 29 May 2020)

  Changed paths:
    M clang/unittests/AST/ASTImporterFixtures.cpp
    M clang/unittests/AST/ASTImporterFixtures.h
    M clang/unittests/AST/ASTImporterODRStrategiesTest.cpp
    M clang/unittests/AST/ASTImporterTest.cpp
    M clang/unittests/AST/ASTImporterVisibilityTest.cpp
    M clang/unittests/AST/Language.cpp
    M clang/unittests/AST/Language.h
    M clang/unittests/AST/MatchVerifier.h
    M clang/unittests/AST/StructuralEquivalenceTest.cpp

  Log Message:
  -----------
  Rename APIs in unittests/AST/Language.h in preparation to share them

Summary:
Declaring these helpers in the ast_matcher namespace in the clangAST
unit test seems inappropriate -- neither these helpers, nor clangAST have
anything to do with AST matchers. Therefore, I moved these helpers to
the clang namespace.

Declaring another typedef called "ArgVector" is not a good idea -- we
already have both "ArgVector", "ArgsVector", and "ArgList". I expanded
it into the underlying type.

Declaring another enum called "Language" is not a good idea because we
arleady have the "clang::Language" enum. I renamed it to
"TestLanguage".

Similarly, I renamed "getBasicRunOptionsForLanguage" to
"getCommandLineArgsForTesting" to explain the semantics better (what are
"run options"?) and not repeat types in the function name
("ForLanguage").

Reviewers: shafik, rengolin, sammccall

Reviewed By: sammccall

Subscribers: gribozavr2, sammccall, martong, cfe-commits

Tags: #clang

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




More information about the All-commits mailing list