Skip to content

Commit b46c4c0

Browse files
committed
use logical not rather than bitwise
1 parent 48ea30c commit b46c4c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/Sema/HLSLExternalSemaSource.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ static Expr *constructStructuredBufferConstraintExpr(Sema &S,
897897

898898
// negate IsIntangibleExpr
899899
UnaryOperator *NotIntangibleExpr = UnaryOperator::Create(
900-
Context, IsIntangibleExpr, UO_Not, BoolTy, VK_LValue, OK_Ordinary,
900+
Context, IsIntangibleExpr, UO_LNot, BoolTy, VK_LValue, OK_Ordinary,
901901
NameLoc, false, FPOptionsOverride());
902902

903903
// element types also may not be of 0 size

clang/test/AST/HLSL/is_structured_resource_element_compatible_concept.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// CHECK: ConceptDecl 0x{{[0-9a-f]+}} <<invalid sloc>> <invalid sloc> __is_structured_resource_element_compatible
44
// CHECK: |-TemplateTypeParmDecl 0x{{[0-9a-f]+}} <<invalid sloc>> <invalid sloc> referenced typename depth 0 index 0 element_type
55
// CHECK: `-BinaryOperator 0x{{[0-9a-f]+}} <<invalid sloc>> 'bool' lvalue '&&'
6-
// CHECK: |-UnaryOperator 0x{{[0-9a-f]+}} <<invalid sloc>> 'bool' lvalue prefix '~' cannot overflow
6+
// CHECK: |-UnaryOperator 0x{{[0-9a-f]+}} <<invalid sloc>> 'bool' lvalue prefix '!' cannot overflow
77
// CHECK: | `-TypeTraitExpr 0x{{[0-9a-f]+}} <<invalid sloc>> 'bool' __builtin_hlsl_is_intangible
88
// CHECK: | `-TemplateTypeParmType 0x{{[0-9a-f]+}} 'element_type' dependent depth 0 index 0
99
// CHECK: | `-TemplateTypeParm 0x{{[0-9a-f]+}} 'element_type'

0 commit comments

Comments
 (0)