Skip to content

Commit 923b34f

Browse files
committed
remove unnessecary clause and add comment
1 parent d3f4b9b commit 923b34f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

clang/lib/3C/ProgramInfo.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,18 @@ bool ProgramInfo::link() {
350350
}
351351
}
352352
// repeat for static functions
353+
//
354+
// Static functions that don't have a body will always cause a linking
355+
// error during compilation. They may still be useful as code is developed,
356+
// so we treat them as if they are external, and constrain parameters
357+
// to wild as appropriate.
353358
for (const auto &U :StaticFunctionFVCons) {
354359
for (const auto &V :U.second) {
355360

356361
std::string FileName = U.first;
357362
std::string FuncName = V.first;
358363
FVConstraint *G = V.second;
359-
if (!G->hasBody() && !isExternOkay(FuncName)) {
364+
if (!G->hasBody()) {
360365

361366
std::string Rsn =
362367
"Unchecked pointer in parameter or return of static function " +

0 commit comments

Comments
 (0)