[Openmp-commits] [PATCH] D57113: [clang-tidy] openmp-use-default-none - a new check

Aaron Ballman via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 22 07:19:04 PDT 2019


aaron.ballman added inline comments.


================
Comment at: clang-tidy/openmp/UseDefaultNoneCheck.cpp:47-48
+    diag(Directive->getBeginLoc(),
+         "OpenMP directive '%0' specifies 'default(%1)' clause. Consider using "
+         "'default(none)' clause instead.")
+        << getOpenMPDirectiveName(Directive->getDirectiveKind())
----------------
Make the diagnostic ungrammatical.


================
Comment at: clang-tidy/openmp/UseDefaultNoneCheck.cpp:52
+                                         Clause->getDefaultKind());
+    diag(Clause->getBeginLoc(), "Existing 'default' clause is specified here.",
+         DiagnosticIDs::Note);
----------------
Same with notes.


================
Comment at: clang-tidy/openmp/UseDefaultNoneCheck.cpp:58-59
+  diag(Directive->getBeginLoc(),
+       "OpenMP directive '%0' does not specify 'default' clause. Consider "
+       "specifying 'default(none)' clause.")
+      << getOpenMPDirectiveName(Directive->getDirectiveKind());
----------------
Here too.


================
Comment at: docs/clang-tidy/checks/openmp-use-default-none.rst:19
+
+.. code-block:: c++
+
----------------
This is a *lot* of example text -- are you sure all of it adds value, or can some of it be removed?


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57113/new/

https://reviews.llvm.org/D57113





More information about the Openmp-commits mailing list