[clang] fc654d4 - [Clang][OpenMP][NFC] Remove unnecessary LParentLoc in clause classes (#206386)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 29 17:49:12 PDT 2026
Author: Kevin Sala Penades
Date: 2026-06-29T17:49:08-07:00
New Revision: fc654d498ebdf49a5634a43f45cc82004975acf0
URL: https://github.com/llvm/llvm-project/commit/fc654d498ebdf49a5634a43f45cc82004975acf0
DIFF: https://github.com/llvm/llvm-project/commit/fc654d498ebdf49a5634a43f45cc82004975acf0.diff
LOG: [Clang][OpenMP][NFC] Remove unnecessary LParentLoc in clause classes (#206386)
The LParentLoc is already a data member of the OMPVarListClause class.
The OMPThreadLimitClause and OMPNumTeamsClause classes inherit from
OMPVarListClause and should not need to have their own LParentLoc.
Added:
Modified:
clang/include/clang/AST/OpenMPClause.h
Removed:
################################################################################
diff --git a/clang/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h
index bae396d883dc8..12959fe0c2ff0 100644
--- a/clang/include/clang/AST/OpenMPClause.h
+++ b/clang/include/clang/AST/OpenMPClause.h
@@ -6995,9 +6995,6 @@ class OMPNumTeamsClause final
friend OMPVarListClause;
friend TrailingObjects;
- /// Location of '('.
- SourceLocation LParenLoc;
-
/// Modifier that was specified.
OpenMPNumTeamsClauseModifier Modifier = OMPC_NUMTEAMS_unknown;
@@ -7041,12 +7038,6 @@ class OMPNumTeamsClause final
/// \param N The number of variables.
static OMPNumTeamsClause *CreateEmpty(const ASTContext &C, unsigned N);
- /// Sets the location of '('.
- void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
-
- /// Returns the location of '('.
- SourceLocation getLParenLoc() const { return LParenLoc; }
-
/// Return NumTeams expressions.
ArrayRef<Expr *> getNumTeams() { return getVarRefs(); }
@@ -7119,9 +7110,6 @@ class OMPThreadLimitClause final
friend OMPVarListClause;
friend TrailingObjects;
- /// Location of '('.
- SourceLocation LParenLoc;
-
OMPThreadLimitClause(const ASTContext &C, SourceLocation StartLoc,
SourceLocation LParenLoc, SourceLocation EndLoc,
unsigned N)
@@ -7155,12 +7143,6 @@ class OMPThreadLimitClause final
/// \param N The number of variables.
static OMPThreadLimitClause *CreateEmpty(const ASTContext &C, unsigned N);
- /// Sets the location of '('.
- void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
-
- /// Returns the location of '('.
- SourceLocation getLParenLoc() const { return LParenLoc; }
-
/// Return ThreadLimit expressions.
ArrayRef<Expr *> getThreadLimit() { return getVarRefs(); }
More information about the cfe-commits
mailing list