[clang] [OpenMP] Add a missing 'const' (NFC) (PR #71596)

Mike Rice via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 7 14:55:03 PST 2023


https://github.com/mikerice1969 created https://github.com/llvm/llvm-project/pull/71596

None

>From 41f147c79a0a32fa541e7fb99cb2053b8f4b7ea2 Mon Sep 17 00:00:00 2001
From: Mike Rice <michael.p.rice at intel.com>
Date: Tue, 7 Nov 2023 14:51:55 -0800
Subject: [PATCH] [OpenMP] Add a missing 'const' (NFC)

---
 clang/include/clang/AST/StmtOpenMP.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/include/clang/AST/StmtOpenMP.h b/clang/include/clang/AST/StmtOpenMP.h
index 2725747e051e728..62164339153573c 100644
--- a/clang/include/clang/AST/StmtOpenMP.h
+++ b/clang/include/clang/AST/StmtOpenMP.h
@@ -994,7 +994,7 @@ class OMPLoopTransformationDirective : public OMPLoopBasedDirective {
   unsigned getNumAssociatedLoops() const { return getLoopsNumber(); }
 
   /// Return the number of loops generated by this loop transformation.
-  unsigned getNumGeneratedLoops() { return NumGeneratedLoops; }
+  unsigned getNumGeneratedLoops() const { return NumGeneratedLoops; }
 
   /// Get the de-sugared statements after the loop transformation.
   ///



More information about the cfe-commits mailing list