Skip to content

Commit 2c2af61

Browse files
committed
Handle function with extern "C" linkage
1 parent 2d75403 commit 2c2af61

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ class INOPreprocessorMatcherCallback : public MatchFinder::MatchCallback {
123123

124124
// Extract prototype from function using the pretty printer
125125
// and stopping at the first open curly brace "{"
126+
if (f->isExternC()) {
127+
rewriter.InsertTextAfter(insertionPoint, "extern \"C\" ");
128+
}
126129
string proto;
127130
raw_string_ostream o(proto);
128131
f->print(o);

0 commit comments

Comments
 (0)