Skip to content

Commit 5ac24b6

Browse files
committed
Updates for review comments:
- Added '{' and '}' to else with single statement per coding standards. - BalancedDelimiterTracker() definition moved to where it's used.
1 parent 0959f99 commit 5ac24b6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clang/lib/AST/OpenMPClause.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2255,8 +2255,9 @@ void OMPClausePrinter::VisitOMPAllocateClause(OMPAllocateClause *Node) {
22552255
OS << "(";
22562256
Allocator->printPretty(OS, nullptr, Policy, 0);
22572257
OS << ")";
2258-
} else
2258+
} else {
22592259
Allocator->printPretty(OS, nullptr, Policy, 0);
2260+
}
22602261
OS << ":";
22612262
VisitOMPClauseList(Node, ' ');
22622263
} else {

clang/lib/Parse/ParseOpenMP.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4539,8 +4539,6 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
45394539
bool NeedRParenForLinear = false;
45404540
BalancedDelimiterTracker LinearT(*this, tok::l_paren,
45414541
tok::annot_pragma_openmp_end);
4542-
BalancedDelimiterTracker AllocateT(*this, tok::l_paren,
4543-
tok::annot_pragma_openmp_end);
45444542
// Handle reduction-identifier for reduction clause.
45454543
if (Kind == OMPC_reduction || Kind == OMPC_task_reduction ||
45464544
Kind == OMPC_in_reduction) {
@@ -4807,6 +4805,8 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
48074805
if (Modifier == OMPC_ALLOCATE_allocator) {
48084806
Data.AllocClauseModifier = Modifier;
48094807
ConsumeToken();
4808+
BalancedDelimiterTracker AllocateT(*this, tok::l_paren,
4809+
tok::annot_pragma_openmp_end);
48104810
if (Tok.is(tok::l_paren)) {
48114811
AllocateT.consumeOpen();
48124812
Tail = ParseAssignmentExpression();

0 commit comments

Comments
 (0)