[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 31 10:17:18 PST 2018


ABataev added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:9702
 
+static bool RejectConstNotMutableType(Sema &SemaRef, ValueDecl *D,
+                                      OpenMPClauseKind CKind,
----------------
Functions must start from the small letters.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:9716
+                      RD->hasDefinition() && RD->hasMutableFields())) {
+    SemaRef.Diag(ELoc, SemaRef.getLangOpts().CPlusPlus
+                           ? diag::err_omp_const_not_mutable_variable
----------------
I would check here for `RD` rather than `CPlusPlus`. `int` types cannot have mutable fields, for example.


Repository:
  rC Clang

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

https://reviews.llvm.org/D56113





More information about the cfe-commits mailing list