OpenCilk / opencilk-project

Monorepo for the OpenCilk compiler. Forked from llvm/llvm-project and based on Tapir/LLVM.
Other
93 stars 29 forks source link

_Cilk_for shows up in error message instead of cilk_for #195

Open wheatman opened 1 year ago

wheatman commented 1 year ago

Describe the bug

When misusing cilk_for the error message uses _Cilk_for instead of cilk_for

The following code

#include <cilk/cilk.h>

int main() {
  cilk_for(int i = 0; i < 10; i++) { return 0; }
}

gives the error of

del.cpp:4:38: error: cannot return from within a '_Cilk_for' loop

I would expect it to give an error of

del.cpp:4:38: error: cannot return from within a 'cilk_for' loop

clang version 16.0.6 (https://github.com/OpenCilk/opencilk-project aa4f4c0c6a59a9e42c3ef8cc8ef715f5ed8b7553)