Skip to content

Commit 6860788

Browse files
chore: autopublish 2025-12-15T21:36:31Z
1 parent 826f1c0 commit 6860788

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

tools/clang/include/clang/AST/ASTContext.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,9 +2407,9 @@ class ASTContext : public RefCountedBase<ASTContext> {
24072407
/// This routine may only be invoked once for a given ASTContext object.
24082408
/// It is normally invoked after ASTContext construction.
24092409
///
2410-
/// \param Target The target
2410+
/// \param Target The target
24112411
void InitBuiltinTypes(const TargetInfo &Target, bool ignoreHLSLIntrinsics);
2412-
2412+
24132413
private:
24142414
void InitBuiltinType(CanQualType &R, BuiltinType::Kind K);
24152415

tools/clang/lib/AST/ASTContext.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,8 @@ void ASTContext::InitBuiltinType(CanQualType &R, BuiltinType::Kind K) {
958958
Types.push_back(Ty);
959959
}
960960

961-
void ASTContext::InitBuiltinTypes(const TargetInfo &Target, bool ignoreHLSLIntrinsics) {
961+
void ASTContext::InitBuiltinTypes(const TargetInfo &Target,
962+
bool ignoreHLSLIntrinsics) {
962963
assert((!this->Target || this->Target == &Target) &&
963964
"Incorrect target reinitialization");
964965
assert(VoidTy.isNull() && "Context reinitialized?");
@@ -1108,7 +1109,9 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target, bool ignoreHLSLIntri
11081109

11091110
HLSLStringTy = this->getPointerType(CharTy);
11101111

1111-
hlsl::InitializeASTContextForHLSL(*this, ignoreHLSLIntrinsics); // Previously in constructor, guarded by !DelayInitialization
1112+
hlsl::InitializeASTContextForHLSL(
1113+
*this, ignoreHLSLIntrinsics); // Previously in constructor, guarded by
1114+
// !DelayInitialization
11121115
}
11131116
// HLSL Change Ends
11141117
}

tools/clang/lib/Frontend/FrontendAction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
444444
setCurrentInput(FrontendInputFile());
445445
setCompilerInstance(nullptr);
446446
return false;
447-
}
447+
}
448448

449449
bool FrontendAction::Execute() {
450450
CompilerInstance &CI = getCompilerInstance();

tools/clang/lib/Sema/SemaHLSL.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2994,8 +2994,7 @@ static TypedefDecl *CreateGlobalTypedef(ASTContext *context, const char *ident,
29942994

29952995
class HLSLExternalSource : public ExternalSemaSource {
29962996
private:
2997-
2998-
const bool m_disableHLSLIntrinsics;
2997+
const bool m_disableHLSLIntrinsics;
29992998

30002999
// Inner types.
30013000
struct FindStructBasicTypeResult {
@@ -5135,8 +5134,7 @@ class HLSLExternalSource : public ExternalSemaSource {
51355134
bool IsValidObjectElement(LPCSTR tableName, IntrinsicOp op,
51365135
QualType objectElement);
51375136

5138-
bool checkIfIntrinsicIsAllowed(StringRef intrinsicNameIdentifier)
5139-
{
5137+
bool checkIfIntrinsicIsAllowed(StringRef intrinsicNameIdentifier) {
51405138
if (!m_disableHLSLIntrinsics)
51415139
return true;
51425140

@@ -5225,8 +5223,7 @@ class HLSLExternalSource : public ExternalSemaSource {
52255223
"TraceRay",
52265224
"TraceRayInline",
52275225
"WorldRayDirection",
5228-
"WorldRayOrigin"
5229-
};
5226+
"WorldRayOrigin"};
52305227

52315228
auto it = allowedHLSLIntrinsics.find(std::string(intrinsicNameIdentifier));
52325229
return it != allowedHLSLIntrinsics.end();
@@ -5239,8 +5236,7 @@ class HLSLExternalSource : public ExternalSemaSource {
52395236
StringRef nameIdentifier,
52405237
size_t argumentCount) {
52415238
// TODO: only check if the flag "devsh-disable-hlsl-intrinsics" is enabled
5242-
if (!checkIfIntrinsicIsAllowed(nameIdentifier))
5243-
{
5239+
if (!checkIfIntrinsicIsAllowed(nameIdentifier)) {
52445240
return IntrinsicDefIter::CreateStart(
52455241
table, tableSize, table + tableSize,
52465242
IntrinsicTableDefIter::CreateStart(m_intrinsicTables, typeName,
@@ -13562,7 +13558,8 @@ hlsl::TrySubscriptIndexInitialization(clang::Sema *self, clang::Expr *SrcExpr,
1356213558

1356313559
/// <summary>Performs HLSL-specific initialization on the specified
1356413560
/// context.</summary>
13565-
void hlsl::InitializeASTContextForHLSL(ASTContext &context, bool ignoreHLSLIntrinsics) {
13561+
void hlsl::InitializeASTContextForHLSL(ASTContext &context,
13562+
bool ignoreHLSLIntrinsics) {
1356613563
HLSLExternalSource *hlslSource = new HLSLExternalSource(ignoreHLSLIntrinsics);
1356713564
IntrusiveRefCntPtr<ExternalASTSource> externalSource(hlslSource);
1356813565
if (hlslSource->Initialize(context)) {

tools/clang/tools/dxcompiler/dxcompilerobj.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,8 @@ class DxcCompiler : public IDxcCompiler3,
966966
compiler.getCodeGenOpts().SpirvOptions = opts.SpirvOptions;
967967
clang::EmitSpirvAction action;
968968
FrontendInputFile file(pUtf8SourceName, IK_HLSL);
969-
action.BeginSourceFile(
970-
compiler, file, opts.SpirvOptions.disableHLSLIntrinsics);
969+
action.BeginSourceFile(compiler, file,
970+
opts.SpirvOptions.disableHLSLIntrinsics);
971971
action.Execute();
972972
action.EndSourceFile();
973973
outStream.flush();

0 commit comments

Comments
 (0)