validation: function scope variable store type must be constructible

- function scope variable store type must be constructible
- add IsConstructible() to sem::atomic

Bug: tint:1069
Change-Id: Ib0616b486ecf278dbdd99640dc4ede7f3007feb8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60120
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
Auto-Submit: Sarah Mashayekhi <sarahmashay@google.com>
This commit is contained in:
Sarah
2021-07-28 22:43:36 +00:00
committed by Tint LUCI CQ
parent 9ba6500c3f
commit 7249404827
7 changed files with 63 additions and 26 deletions

View File

@@ -46,6 +46,10 @@ uint32_t Atomic::Align() const {
return subtype_->Align();
}
bool Atomic::IsConstructible() const {
return false;
}
Atomic::Atomic(Atomic&&) = default;
Atomic::~Atomic() = default;

View File

@@ -50,6 +50,10 @@ class Atomic : public Castable<Atomic, Type> {
/// @returns the alignment in bytes of the type.
uint32_t Align() const override;
/// @returns true if constructible as per
/// https://gpuweb.github.io/gpuweb/wgsl/#constructible-typesd
bool IsConstructible() const override;
private:
sem::Type const* const subtype_;
};