@@ -651,28 +651,30 @@ void SemaHLSL::emitLogicalOperatorFixIt(Expr *LHS, Expr *RHS,
651
651
void SemaHLSL::handleRootSignatureAttr (Decl *D, const ParsedAttr &AL) {
652
652
using namespace llvm ::hlsl::root_signature;
653
653
654
- if (AL.getNumArgs () != 1 ) return ;
654
+ if (AL.getNumArgs () != 1 )
655
+ return ;
655
656
656
657
StringRef Signature;
657
658
if (!SemaRef.checkStringLiteralArgumentAttr (AL, 0 , Signature))
658
- return ;
659
+ return ;
659
660
660
661
SourceLocation Loc = AL.getArgAsExpr (0 )->getExprLoc ();
661
662
// FIXME: pass down below to lexer when fp is supported
662
663
// llvm::RoundingMode RM = SemaRef.CurFPFeatures.getRoundingMode();
663
664
SmallVector<RootSignatureToken> Tokens;
664
665
RootSignatureLexer Lexer (Signature, Loc, SemaRef.getPreprocessor ());
665
- if (Lexer.Lex (Tokens)) return ;
666
+ if (Lexer.Lex (Tokens))
667
+ return ;
666
668
667
669
SmallVector<RootElement> Elements;
668
670
RootSignatureParser Parser (Elements, Tokens);
669
- if (Parser.Parse ()) return ;
671
+ if (Parser.Parse ())
672
+ return ;
670
673
671
- auto *RootElements =
672
- ::new (getASTContext ()) ArrayRef<RootElement>(Elements);
674
+ auto *RootElements = ::new (getASTContext ()) ArrayRef<RootElement>(Elements);
673
675
674
- auto *Result =
675
- :: new ( getASTContext ()) HLSLRootSignatureAttr (getASTContext (), AL, Signature);
676
+ auto *Result = :: new ( getASTContext ())
677
+ HLSLRootSignatureAttr (getASTContext (), AL, Signature);
676
678
Result->setElements (*RootElements);
677
679
D->addAttr (Result);
678
680
}
0 commit comments