This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Add checks for requires and target directives.
ClosedPublic

Authored by gtbercea on Apr 18 2019, 9:26 AM.

Diff Detail

Event Timeline

gtbercea created this revision.Apr 18 2019, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 18 2019, 9:26 AM
ABataev added inline comments.Apr 18 2019, 9:31 AM
include/clang/Basic/DiagnosticSemaKinds.td
9136

Enclose %0 in single quotes for better reading

lib/Sema/SemaOpenMP.cpp
2440

Better to check for TargetLocations.empty() before the loop

4208

Better to check for the dependent context at first, only after that check for the clause

test/OpenMP/requires_target_messages.cpp
12

Add the checks for all the clauses that may cause this error

gtbercea updated this revision to Diff 195762.Apr 18 2019, 9:31 AM
Fix test,
gtbercea updated this revision to Diff 195768.Apr 18 2019, 9:47 AM
gtbercea marked an inline comment as done.
  • Fix test.
ABataev added inline comments.Apr 18 2019, 9:50 AM
lib/Sema/SemaOpenMP.cpp
4208

Better to check for the dependent context at first, only after that check for the clause

test/OpenMP/requires_target_messages.cpp
6

Just expected-note 4 {{

gtbercea updated this revision to Diff 195770.Apr 18 2019, 9:51 AM
gtbercea marked an inline comment as done.
  • Fix.
gtbercea marked 4 inline comments as done.Apr 18 2019, 9:54 AM
ABataev added inline comments.Apr 18 2019, 9:59 AM
include/clang/Basic/DiagnosticSemaKinds.td
9136

The messages must start from lower letter. Other messages must be fixed too in separate patches.

gtbercea updated this revision to Diff 195793.Apr 18 2019, 11:40 AM
  • Lower case.
gtbercea marked an inline comment as done.Apr 18 2019, 11:59 AM
This revision is now accepted and ready to land.Apr 18 2019, 12:03 PM
This revision was automatically updated to reflect the committed changes.