Page MenuHomePhabricator

[Syntax] Build nodes for template declarations.
AcceptedPublic

Authored by ilya-biryukov on Jan 7 2020, 7:16 AM.

Details

Reviewers
gribozavr2
Summary

Handles template declaration of all kinds.

Also builds template declaration nodes for specializations and explicit
instantiations of classes.

Some missing things will be addressed in the follow-up patches:

  • specializations of functions and variables,
  • template parameters.

Diff Detail

Event Timeline

ilya-biryukov created this revision.Jan 7 2020, 7:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 7 2020, 7:16 AM

Unit tests: unknown.

clang-tidy: unknown.

clang-format: unknown.

Build artifacts: diff.json, console-log.txt

Unit tests: unknown.

clang-tidy: unknown.

clang-format: unknown.

Build artifacts: diff.json, console-log.txt

Unit tests: pass. 61849 tests passed, 0 failed and 781 were skipped.

clang-tidy: unknown.

clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

gribozavr2 accepted this revision.Jan 15 2020, 12:20 PM
gribozavr2 added inline comments.
clang/lib/Tooling/Syntax/BuildTree.cpp
190

Three slashes for docs.

clang/unittests/Tooling/Syntax/TreeTest.cpp
738

Could you also add an out-of-line definition of X::foo? It will have two template parameter lists, which is a special case.

This revision is now accepted and ready to land.Jan 15 2020, 12:20 PM
gribozavr2 added inline comments.Jan 15 2020, 12:21 PM
clang/lib/Tooling/Syntax/BuildTree.cpp
930

Why is this range maybe-delayed?