[PATCH] D92409: [AST][NFC] Silence GCC warning about multiline comments

Thomas Preud'homme via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 1 10:26:42 PST 2020


thopre created this revision.
thopre added reviewers: ABataev, rjmccall, rsmith.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
thopre requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

GCC's -Wcomment warning is emitted on OMPDeclareReductionDecl heading
comment due to the continuation mark in the code example. This commit
changes the comment style to javadoc to avoid the warning and allow
building with -Werror.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92409

Files:
  clang/include/clang/AST/DeclOpenMP.h


Index: clang/include/clang/AST/DeclOpenMP.h
===================================================================
--- clang/include/clang/AST/DeclOpenMP.h
+++ clang/include/clang/AST/DeclOpenMP.h
@@ -158,16 +158,18 @@
   static bool classofKind(Kind K) { return K == OMPThreadPrivate; }
 };
 
-/// This represents '#pragma omp declare reduction ...' directive.
-/// For example, in the following, declared reduction 'foo' for types 'int' and
-/// 'float':
-///
-/// \code
-/// #pragma omp declare reduction (foo : int,float : omp_out += omp_in) \
-///                     initializer (omp_priv = 0)
-/// \endcode
-///
-/// Here 'omp_out += omp_in' is a combiner and 'omp_priv = 0' is an initializer.
+/**
+ * This represents '#pragma omp declare reduction ...' directive.
+ * For example, in the following, declared reduction 'foo' for types 'int' and
+ * 'float':
+ *
+ * \code
+ * #pragma omp declare reduction (foo : int,float : omp_out += omp_in) \
+ *                     initializer (omp_priv = 0)
+ * \endcode
+ *
+ * Here 'omp_out += omp_in' is a combiner and 'omp_priv = 0' is an initializer.
+ */
 class OMPDeclareReductionDecl final : public ValueDecl, public DeclContext {
   // This class stores some data in DeclContext::OMPDeclareReductionDeclBits
   // to save some space. Use the provided accessors to access it.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92409.308707.patch
Type: text/x-patch
Size: 1328 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201201/1bbc9081/attachment.bin>


More information about the cfe-commits mailing list