Skip to content

Commit 3acd63c

Browse files
committed
Add default value for ExplicitModuleInfo isFramework
If the json file doesn't contain a value for this, this was never set, which results in UB. Unfortunately clang doesn't warn about this but gcc does https://godbolt.org/z/M3sdE73zs
1 parent e032b31 commit 3acd63c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/Frontend/ModuleInterfaceLoader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ struct ExplicitModuleInfo {
182182
// Path of the .swiftsourceinfo file.
183183
std::string moduleSourceInfoPath;
184184
// A flag that indicates whether this module is a framework
185-
bool isFramework;
185+
bool isFramework = false;
186186
// A flag that indicates whether this module is a system module
187187
// Set the default to be false.
188188
bool isSystem = false;

0 commit comments

Comments
 (0)