Skip to content

Commit fbbf1be

Browse files
authored
[HLSL][NFC] Fix static analyzer concerns (llvm#120090)
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 f176388 commit fbbf1be

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/Sema/HLSLExternalSemaSource.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,10 @@ struct BuiltinTypeMethodBuilder {
559559
public:
560560
~BuiltinTypeMethodBuilder() { finalizeMethod(); }
561561

562+
BuiltinTypeMethodBuilder(const BuiltinTypeMethodBuilder &Other) = delete;
563+
BuiltinTypeMethodBuilder &
564+
operator=(const BuiltinTypeMethodBuilder &Other) = delete;
565+
562566
Expr *getResourceHandleExpr() {
563567
// The first statement added to a method or access to 'this' creates the
564568
// declaration.

0 commit comments

Comments
 (0)