Skip to content

Commit e85b64f

Browse files
committed
[HLSL][NFC] Fix static analyzer concerns
Class BuiltinTypeMethodBuilder has a user-defined destructor so likely compiler generated special functions may behave incorrectly. Delete explicitly copy constructor and copy assignment operator to avoid potential errors.
1 parent 3ad2399 commit e85b64f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/Sema/HLSLExternalSemaSource.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,9 @@ struct BuiltinTypeMethodBuilder {
546546
public:
547547
~BuiltinTypeMethodBuilder() { finalizeMethod(); }
548548

549+
BuiltinTypeMethodBuilder(BuiltinTypeMethodBuilder &Other) = delete;
550+
BuiltinTypeMethodBuilder &operator=(BuiltinTypeMethodBuilder &Other) = delete;
551+
549552
Expr *getResourceHandleExpr() {
550553
// The first statement added to a method or access to 'this' creates the
551554
// declaration.

0 commit comments

Comments
 (0)