ast/module: Additional documentation for type methods

Bug: tint:337
Change-Id: I60dae81baba3c5c85efa277e772f4a1f12589e11
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33786
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
Ben Clayton 2020-11-24 15:11:06 +00:00 committed by Commit Bot service account
parent 8282262304
commit c489875ff0
1 changed files with 8 additions and 2 deletions

View File

@ -101,8 +101,13 @@ class Module {
/// Creates a new `ast::Type` owned by the Module.
/// When the Module is destructed, owned Module and the returned
/// `ast::Type` will also be destructed.
/// Types are unique (de-aliased), and so `create()` for the same `T` and
/// arguments will return the same pointer.
/// Types are unique (de-aliased), and so calling create() for the same `T`
/// and arguments will return the same pointer.
/// @warning Use this method to acquire a type only if all of its type
/// information is provided in the constructor arguments `args`.<br>
/// If the type requires additional configuration after construction that
/// affect its fundamental type, build the type with `std::make_unique`, make
/// any necessary alterations and then call unique_type() instead.
/// @param args the arguments to pass to the type constructor
/// @returns the de-aliased type pointer
template <typename T, typename... ARGS>
@ -116,6 +121,7 @@ class Module {
/// (de-aliased) type.
/// When the Module is destructed, the returned `ast::Type` will also be
/// destructed.
/// @see create()
/// @param ty the type to add to the module
/// @returns the de-aliased type pointer
template <typename T>