-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[clang] Introduce SemaHLSL
#87912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang] Introduce SemaHLSL
#87912
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//===----- SemaHLSL.h ----- Semantic Analysis for HLSL constructs ---------===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
/// \file | ||
/// This file declares semantic analysis for HLSL constructs. | ||
/// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef LLVM_CLANG_SEMA_SEMAHLSL_H | ||
#define LLVM_CLANG_SEMA_SEMAHLSL_H | ||
|
||
#include "clang/AST/DeclBase.h" | ||
#include "clang/AST/Expr.h" | ||
#include "clang/Basic/IdentifierTable.h" | ||
#include "clang/Basic/SourceLocation.h" | ||
#include "clang/Sema/Scope.h" | ||
#include "clang/Sema/SemaBase.h" | ||
|
||
namespace clang { | ||
|
||
class SemaHLSL : public SemaBase { | ||
public: | ||
SemaHLSL(Sema &S); | ||
|
||
Decl *ActOnStartHLSLBuffer(Scope *BufferScope, bool CBuffer, | ||
SourceLocation KwLoc, IdentifierInfo *Ident, | ||
SourceLocation IdentLoc, SourceLocation LBrace); | ||
void ActOnFinishHLSLBuffer(Decl *Dcl, SourceLocation RBrace); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Since we're moving these into a class that has HLSL in the name which is accessed through a method named There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While |
||
}; | ||
|
||
} // namespace clang | ||
|
||
#endif // LLVM_CLANG_SEMA_SEMAHLSL_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be moved to SemaHLSL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried, but it depends on a lot of static functions inside
SemaChecking.cpp
, so I decided to leave it for later.