This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Emit warning message about undefined number of evaluation for atomic update/capture
Changes PlannedPublic

Authored by cchen on Dec 10 2019, 11:54 AM.

Details

Reviewers
ABataev
jdoerfert
Summary

The total number of evaluation of X is undefined for atomic construct,
therefore, we emit warning message for them. BTW, Clang is always
evaluate X once.

Event Timeline

cchen created this revision.Dec 10 2019, 11:54 AM
Herald added a project: Restricted Project. · View Herald Transcript

I don't think this kind of analysis must be here. clang has a special analysis phase, maybe better to implement it there? Currently, it may produce false-positive warnings. Also, why only check for array accesses? Are they the only constructs that may lead to undefined behavior?

clang/include/clang/Basic/DiagnosticSemaKinds.td
9269

Hmm, the message does not say anything about the real problem.

cchen planned changes to this revision.Dec 10 2019, 12:14 PM

Don't know there is an analysis phase in Clang, I'll investigate later, thanks.