Skip to content

Commit 728f906

Browse files
committed
Fix Clang warning
Created using spr 1.3.5-bogner
2 parents 0591c2d + 5cd1aa0 commit 728f906

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/include/llvm/Passes/PassPlugin.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ class PassPlugin {
114114
};
115115
}
116116

117+
// The function returns a struct with default initializers.
118+
#ifdef __clang__
119+
#pragma clang diagnostic push
120+
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
121+
#endif
117122
/// The public entry point for a pass plugin.
118123
///
119124
/// When a plugin is loaded by the driver, it will call this entry point to
@@ -130,5 +135,8 @@ class PassPlugin {
130135
/// ```
131136
extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK
132137
llvmGetPassPluginInfo();
138+
#ifdef __clang__
139+
#pragma clang diagnostic pop
140+
#endif
133141

134142
#endif /* LLVM_PASSES_PASSPLUGIN_H */

0 commit comments

Comments
 (0)