@@ -133,9 +133,8 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseEmptyTest) {
133
133
TrivialModuleLoader ModLoader;
134
134
auto PP = createPP (Source, ModLoader);
135
135
136
- hlsl::RootSignatureLexer Lexer (Source);
137
136
SmallVector<RootElement> Elements;
138
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
137
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
139
138
140
139
// Test no diagnostics produced
141
140
Consumer->setNoDiag ();
@@ -169,9 +168,8 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseDTClausesTest) {
169
168
TrivialModuleLoader ModLoader;
170
169
auto PP = createPP (Source, ModLoader);
171
170
172
- hlsl::RootSignatureLexer Lexer (Source);
173
171
SmallVector<RootElement> Elements;
174
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
172
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
175
173
176
174
// Test no diagnostics produced
177
175
Consumer->setNoDiag ();
@@ -274,9 +272,8 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseStaticSamplerTest) {
274
272
TrivialModuleLoader ModLoader;
275
273
auto PP = createPP (Source, ModLoader);
276
274
277
- hlsl::RootSignatureLexer Lexer (Source);
278
275
SmallVector<RootElement> Elements;
279
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
276
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
280
277
281
278
// Test no diagnostics produced
282
279
Consumer->setNoDiag ();
@@ -361,9 +358,8 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseFloatsTest) {
361
358
TrivialModuleLoader ModLoader;
362
359
auto PP = createPP (Source, ModLoader);
363
360
364
- hlsl::RootSignatureLexer Lexer (Source);
365
361
SmallVector<RootElement> Elements;
366
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
362
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
367
363
368
364
// Test no diagnostics produced
369
365
Consumer->setNoDiag ();
@@ -438,9 +434,8 @@ TEST_F(ParseHLSLRootSignatureTest, ValidSamplerFlagsTest) {
438
434
TrivialModuleLoader ModLoader;
439
435
auto PP = createPP (Source, ModLoader);
440
436
441
- hlsl::RootSignatureLexer Lexer (Source);
442
437
SmallVector<RootElement> Elements;
443
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
438
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
444
439
445
440
// Test no diagnostics produced
446
441
Consumer->setNoDiag ();
@@ -471,9 +466,8 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseRootConsantsTest) {
471
466
TrivialModuleLoader ModLoader;
472
467
auto PP = createPP (Source, ModLoader);
473
468
474
- hlsl::RootSignatureLexer Lexer (Source);
475
469
SmallVector<RootElement> Elements;
476
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
470
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
477
471
478
472
// Test no diagnostics produced
479
473
Consumer->setNoDiag ();
@@ -530,9 +524,8 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseRootFlagsTest) {
530
524
TrivialModuleLoader ModLoader;
531
525
auto PP = createPP (Source, ModLoader);
532
526
533
- hlsl::RootSignatureLexer Lexer (Source);
534
527
SmallVector<RootElement> Elements;
535
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
528
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
536
529
537
530
// Test no diagnostics produced
538
531
Consumer->setNoDiag ();
@@ -585,9 +578,8 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseRootDescriptorsTest) {
585
578
TrivialModuleLoader ModLoader;
586
579
auto PP = createPP (Source, ModLoader);
587
580
588
- hlsl::RootSignatureLexer Lexer (Source);
589
581
SmallVector<RootElement> Elements;
590
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
582
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
591
583
592
584
// Test no diagnostics produced
593
585
Consumer->setNoDiag ();
@@ -661,9 +653,8 @@ TEST_F(ParseHLSLRootSignatureTest, ValidTrailingCommaTest) {
661
653
TrivialModuleLoader ModLoader;
662
654
auto PP = createPP (Source, ModLoader);
663
655
664
- hlsl::RootSignatureLexer Lexer (Source);
665
656
SmallVector<RootElement> Elements;
666
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
657
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
667
658
668
659
// Test no diagnostics produced
669
660
Consumer->setNoDiag ();
@@ -687,9 +678,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidParseUnexpectedTokenTest) {
687
678
TrivialModuleLoader ModLoader;
688
679
auto PP = createPP (Source, ModLoader);
689
680
690
- hlsl::RootSignatureLexer Lexer (Source);
691
681
SmallVector<RootElement> Elements;
692
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
682
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
693
683
694
684
// Test correct diagnostic produced
695
685
Consumer->setExpected (diag::err_hlsl_unexpected_end_of_params);
@@ -709,9 +699,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidParseInvalidTokenTest) {
709
699
TrivialModuleLoader ModLoader;
710
700
auto PP = createPP (Source, ModLoader);
711
701
712
- hlsl::RootSignatureLexer Lexer (Source);
713
702
SmallVector<RootElement> Elements;
714
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
703
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
715
704
716
705
// Test correct diagnostic produced - invalid token
717
706
Consumer->setExpected (diag::err_hlsl_unexpected_end_of_params);
@@ -731,9 +720,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidParseUnexpectedEndOfStreamTest) {
731
720
TrivialModuleLoader ModLoader;
732
721
auto PP = createPP (Source, ModLoader);
733
722
734
- hlsl::RootSignatureLexer Lexer (Source);
735
723
SmallVector<RootElement> Elements;
736
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
724
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
737
725
738
726
// Test correct diagnostic produced - end of stream
739
727
Consumer->setExpected (diag::err_expected_after);
@@ -758,9 +746,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidMissingDTParameterTest) {
758
746
TrivialModuleLoader ModLoader;
759
747
auto PP = createPP (Source, ModLoader);
760
748
761
- hlsl::RootSignatureLexer Lexer (Source);
762
749
SmallVector<RootElement> Elements;
763
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
750
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
764
751
765
752
// Test correct diagnostic produced
766
753
Consumer->setExpected (diag::err_hlsl_rootsig_missing_param);
@@ -782,9 +769,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidMissingRDParameterTest) {
782
769
TrivialModuleLoader ModLoader;
783
770
auto PP = createPP (Source, ModLoader);
784
771
785
- hlsl::RootSignatureLexer Lexer (Source);
786
772
SmallVector<RootElement> Elements;
787
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
773
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
788
774
789
775
// Test correct diagnostic produced
790
776
Consumer->setExpected (diag::err_hlsl_rootsig_missing_param);
@@ -806,9 +792,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidMissingRCParameterTest) {
806
792
TrivialModuleLoader ModLoader;
807
793
auto PP = createPP (Source, ModLoader);
808
794
809
- hlsl::RootSignatureLexer Lexer (Source);
810
795
SmallVector<RootElement> Elements;
811
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
796
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
812
797
813
798
// Test correct diagnostic produced
814
799
Consumer->setExpected (diag::err_hlsl_rootsig_missing_param);
@@ -832,9 +817,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidRepeatedMandatoryDTParameterTest) {
832
817
TrivialModuleLoader ModLoader;
833
818
auto PP = createPP (Source, ModLoader);
834
819
835
- hlsl::RootSignatureLexer Lexer (Source);
836
820
SmallVector<RootElement> Elements;
837
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
821
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
838
822
839
823
// Test correct diagnostic produced
840
824
Consumer->setExpected (diag::err_hlsl_rootsig_repeat_param);
@@ -856,9 +840,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidRepeatedMandatoryRCParameterTest) {
856
840
TrivialModuleLoader ModLoader;
857
841
auto PP = createPP (Source, ModLoader);
858
842
859
- hlsl::RootSignatureLexer Lexer (Source);
860
843
SmallVector<RootElement> Elements;
861
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
844
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
862
845
863
846
// Test correct diagnostic produced
864
847
Consumer->setExpected (diag::err_hlsl_rootsig_repeat_param);
@@ -882,9 +865,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidRepeatedOptionalDTParameterTest) {
882
865
TrivialModuleLoader ModLoader;
883
866
auto PP = createPP (Source, ModLoader);
884
867
885
- hlsl::RootSignatureLexer Lexer (Source);
886
868
SmallVector<RootElement> Elements;
887
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
869
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
888
870
889
871
// Test correct diagnostic produced
890
872
Consumer->setExpected (diag::err_hlsl_rootsig_repeat_param);
@@ -910,9 +892,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidRepeatedOptionalRCParameterTest) {
910
892
TrivialModuleLoader ModLoader;
911
893
auto PP = createPP (Source, ModLoader);
912
894
913
- hlsl::RootSignatureLexer Lexer (Source);
914
895
SmallVector<RootElement> Elements;
915
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
896
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
916
897
917
898
// Test correct diagnostic produced
918
899
Consumer->setExpected (diag::err_hlsl_rootsig_repeat_param);
@@ -935,9 +916,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidLexOverflowedNumberTest) {
935
916
TrivialModuleLoader ModLoader;
936
917
auto PP = createPP (Source, ModLoader);
937
918
938
- hlsl::RootSignatureLexer Lexer (Source);
939
919
SmallVector<RootElement> Elements;
940
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
920
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
941
921
942
922
// Test correct diagnostic produced
943
923
Consumer->setExpected (diag::err_hlsl_number_literal_overflow);
@@ -959,9 +939,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidParseOverflowedNegativeNumberTest) {
959
939
TrivialModuleLoader ModLoader;
960
940
auto PP = createPP (Source, ModLoader);
961
941
962
- hlsl::RootSignatureLexer Lexer (Source);
963
942
SmallVector<RootElement> Elements;
964
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
943
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
965
944
966
945
// Test correct diagnostic produced
967
946
Consumer->setExpected (diag::err_hlsl_number_literal_overflow);
@@ -982,9 +961,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidLexOverflowedFloatTest) {
982
961
TrivialModuleLoader ModLoader;
983
962
auto PP = createPP (Source, ModLoader);
984
963
985
- hlsl::RootSignatureLexer Lexer (Source);
986
964
SmallVector<RootElement> Elements;
987
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
965
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
988
966
989
967
// Test correct diagnostic produced
990
968
Consumer->setExpected (diag::err_hlsl_number_literal_overflow);
@@ -1005,9 +983,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidLexNegOverflowedFloatTest) {
1005
983
TrivialModuleLoader ModLoader;
1006
984
auto PP = createPP (Source, ModLoader);
1007
985
1008
- hlsl::RootSignatureLexer Lexer (Source);
1009
986
SmallVector<RootElement> Elements;
1010
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
987
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
1011
988
1012
989
// Test correct diagnostic produced
1013
990
Consumer->setExpected (diag::err_hlsl_number_literal_overflow);
@@ -1028,9 +1005,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidLexOverflowedDoubleTest) {
1028
1005
TrivialModuleLoader ModLoader;
1029
1006
auto PP = createPP (Source, ModLoader);
1030
1007
1031
- hlsl::RootSignatureLexer Lexer (Source);
1032
1008
SmallVector<RootElement> Elements;
1033
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
1009
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
1034
1010
1035
1011
// Test correct diagnostic produced
1036
1012
Consumer->setExpected (diag::err_hlsl_number_literal_overflow);
@@ -1051,9 +1027,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidLexUnderflowFloatTest) {
1051
1027
TrivialModuleLoader ModLoader;
1052
1028
auto PP = createPP (Source, ModLoader);
1053
1029
1054
- hlsl::RootSignatureLexer Lexer (Source);
1055
1030
SmallVector<RootElement> Elements;
1056
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
1031
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
1057
1032
1058
1033
// Test correct diagnostic produced
1059
1034
Consumer->setExpected (diag::err_hlsl_number_literal_underflow);
@@ -1077,9 +1052,8 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidNonZeroFlagsTest) {
1077
1052
TrivialModuleLoader ModLoader;
1078
1053
auto PP = createPP (Source, ModLoader);
1079
1054
1080
- hlsl::RootSignatureLexer Lexer (Source);
1081
1055
SmallVector<RootElement> Elements;
1082
- hlsl::RootSignatureParser Parser (Elements, Lexer, Signature, *PP);
1056
+ hlsl::RootSignatureParser Parser (Elements, Signature, *PP);
1083
1057
1084
1058
// Test correct diagnostic produced
1085
1059
Consumer->setExpected (diag::err_hlsl_rootsig_non_zero_flag);
0 commit comments