Fix issue with default macro arguments. Test of ?? instead of else. Added libc

This commit is contained in:
Christoffer Lerno
2021-09-20 22:15:05 +02:00
committed by Christoffer Lerno
parent e4c7dde30b
commit fb9be722bc
13 changed files with 219 additions and 23 deletions

View File

@@ -170,7 +170,7 @@ class Issues:
lines = len(self.sourcefile.content)
while self.line < lines:
line = self.sourcefile.content[self.line].strip()
if line.startswith("// #"):
if line.startswith("// #") or line.startswith("/* #"):
self.parse_header_directive(line)
self.line += 1
continue

View File

@@ -4,13 +4,14 @@ extern func int! testError();
func void test()
{
double x = (testError() + testError()) else 100;
double y = (1 << testError()) else 100;
double z = testError() >> 1 else 100;
double w = testError() * testError() else 100;
double x = (testError() + testError()) ?? 100;
double y = (1 << testError()) ?? 100;
double z = testError() >> 1 ?? 100;
double w = testError() * testError() ?? 100;
}
// #expect: else_checks.ll
/* #expect: else_checks.ll
; Function Attrs: nounwind
declare i64 @testError(i32*) #0