#include <math_checked.h>
#define ADDX(x)\
int add##x(int* y) {\
return *y;\
}
ADDX(2)
int main(void) {
int x = 3;
return add2(&x);
}
Fails with:
cconv-standalone: /home/aeline/checkedc-clang/clang/lib/CConv/ProgramInfo.cpp:671: FVConstraint* ProgramInfo::getFuncFVConstraint(clang::FunctionDecl*, clang::ASTContext*): Assertion `!F->hasBody()' failed.
Weirdly, if the math library is not included, this assertion failure doesn't happen. Instead, no changes are made to the file.
(Both math.h and math_checked.h cause this issue).