mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-10-10 20:09:03 +00:00
- Add resolver/call_test.cc for new unit tests, and move a couple that were in resolver/validation_test.cc to it - Fix CalculateArrayLength transform so that it passes the address of the u32 it creates to the internal function - Fix tests broken as a result of this change Bug: tint:664 Change-Id: If713f9828790cd51224d2392d42c01c0057cb652 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53920 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
50 lines
1.4 KiB
C++
50 lines
1.4 KiB
C++
// Copyright 2021 The Tint Authors.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0(the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#ifndef SRC_SEM_CALL_H_
|
|
#define SRC_SEM_CALL_H_
|
|
|
|
#include "src/sem/expression.h"
|
|
#include "src/sem/intrinsic.h"
|
|
|
|
namespace tint {
|
|
namespace sem {
|
|
|
|
/// Call is the base class for semantic nodes that hold semantic information for
|
|
/// ast::CallExpression nodes.
|
|
class Call : public Castable<Call, Expression> {
|
|
public:
|
|
/// Constructor
|
|
/// @param declaration the AST node
|
|
/// @param target the call target
|
|
/// @param statement the statement that owns this expression
|
|
Call(const ast::Expression* declaration,
|
|
const CallTarget* target,
|
|
Statement* statement);
|
|
|
|
/// Destructor
|
|
~Call() override;
|
|
|
|
/// @return the target of the call
|
|
const CallTarget* Target() const { return target_; }
|
|
|
|
private:
|
|
CallTarget const* const target_;
|
|
};
|
|
|
|
} // namespace sem
|
|
} // namespace tint
|
|
|
|
#endif // SRC_SEM_CALL_H_
|