@@ -1442,11 +1442,15 @@ class OmpVisitor : public virtual DeclarationVisitor {
1442
1442
static bool NeedsScope(const parser::OpenMPBlockConstruct &);
1443
1443
static bool NeedsScope(const parser::OmpClause &);
1444
1444
1445
- bool Pre(const parser::OmpMetadirectiveDirective &) {
1445
+ bool Pre(const parser::OmpMetadirectiveDirective &x) { //
1446
+ metaDirective_ = &x;
1446
1447
++metaLevel_;
1447
1448
return true;
1448
1449
}
1449
- void Post(const parser::OmpMetadirectiveDirective &) { --metaLevel_; }
1450
+ void Post(const parser::OmpMetadirectiveDirective &) { //
1451
+ metaDirective_ = nullptr;
1452
+ --metaLevel_;
1453
+ }
1450
1454
1451
1455
bool Pre(const parser::OpenMPRequiresConstruct &x) {
1452
1456
AddOmpSourceRange(x.source);
@@ -1655,14 +1659,6 @@ class OmpVisitor : public virtual DeclarationVisitor {
1655
1659
EndDeclTypeSpec();
1656
1660
}
1657
1661
1658
- bool Pre(const parser::OmpMetadirectiveDirective &x) { //
1659
- metaDirective_ = &x;
1660
- return true;
1661
- }
1662
- void Post(const parser::OmpMetadirectiveDirective &) { //
1663
- metaDirective_ = nullptr;
1664
- }
1665
-
1666
1662
private:
1667
1663
void ProcessMapperSpecifier(const parser::OmpMapperSpecifier &spec,
1668
1664
const parser::OmpClauseList &clauses);
@@ -1793,7 +1789,7 @@ parser::CharBlock MakeNameFromOperator(
1793
1789
}
1794
1790
}
1795
1791
1796
- parser::CharBlock MangleSpecialFunctions(const parser::CharBlock name) {
1792
+ parser::CharBlock MangleSpecialFunctions(const parser::CharBlock & name) {
1797
1793
return llvm::StringSwitch<parser::CharBlock>(name.ToString())
1798
1794
.Case("max", {"op.max", 6})
1799
1795
.Case("min", {"op.min", 6})
@@ -1888,7 +1884,7 @@ void OmpVisitor::ProcessReductionSpecifier(
1888
1884
// Only process types we can find. There will be an error later on when
1889
1885
// a type isn't found.
1890
1886
if (const DeclTypeSpec * typeSpec{GetDeclTypeSpec()}) {
1891
- reductionDetails->AddType(typeSpec);
1887
+ reductionDetails->AddType(* typeSpec);
1892
1888
1893
1889
for (auto &nm : ompVarNames) {
1894
1890
ObjectEntityDetails details{};
0 commit comments