Skip to content

Commit

Permalink
remove unused vars
Browse files Browse the repository at this point in the history
  • Loading branch information
bob80905 committed Feb 26, 2025
1 parent 9381547 commit 087ee90
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions tools/clang/lib/Sema/SemaHLSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14332,8 +14332,6 @@ bool Sema::DiagnoseHLSLDecl(Declarator &D, DeclContext *DC, Expr *BitWidth,
assert((numArgs == 1 || numArgs == 2) &&
"All ray query declarations should have one or two template "
"args");
const TemplateArgument *Args = TST->getArgs();
const TemplateArgument Arg1 = Args[0];
llvm::APSInt Arg1val = SpecDecl->getTemplateArgs()[0].getAsIntegral();
bool IsForceOMM2State =
Arg1val.getZExtValue() & (unsigned)DXIL::RayFlag::ForceOMM2State;
Expand All @@ -14346,6 +14344,7 @@ bool Sema::DiagnoseHLSLDecl(Declarator &D, DeclContext *DC, Expr *BitWidth,
else {
// ensure that if the second template argument has a non-zero value,
// the shader model is at least 6.9
const TemplateArgument *Args = TST->getArgs();
auto Arg2 = Args[1];
llvm::APSInt Arg2val =
SpecDecl->getTemplateArgs()[1].getAsIntegral();
Expand Down
3 changes: 0 additions & 3 deletions tools/clang/lib/Sema/SemaHLSLDiagnoseTU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ class HLSLCallDiagnoseVisitor
// has the RAYQUERY_FLAG_ALLOW_OPACITY_MICROMAPS
// flag set, otherwise emit a diagnostic
bool IsRayFlagForceOMM2State = false;
const CXXRecordDecl *recordDecl = methodDecl->getParent();
if (ImplicitCastExpr *RayFlagArg =
dyn_cast<ImplicitCastExpr>(callExpr->getArg(1))) {
if (DeclRefExpr *DR =
Expand Down Expand Up @@ -390,8 +389,6 @@ class HLSLCallDiagnoseVisitor
assert(DRE);
const VarDecl *VD = cast<VarDecl>(DRE->getDecl());
const QualType QT = VD->getType();
const CXXRecordDecl *rayQueryDecl = QT->getAsCXXRecordDecl();
assert(rayQueryDecl);
auto typeRecordDecl = QT->getAsCXXRecordDecl();
if (ClassTemplateSpecializationDecl *SpecDecl =
llvm::dyn_cast<ClassTemplateSpecializationDecl>(
Expand Down

0 comments on commit 087ee90

Please sign in to comment.