@@ -74,25 +74,19 @@ SourcePosition OpenMPCounterVisitor::getLocation(const OpenMPConstruct &c) {
7474 // the directive field.
7575 [&](const auto &c) -> SourcePosition {
7676 const CharBlock &source{std::get<0 >(c.t ).source };
77- return ( parsing->allCooked ().GetSourcePositionRange (source) )->first ;
77+ return parsing->allCooked ().GetSourcePositionRange (source)->first ;
7878 },
7979 [&](const OpenMPAtomicConstruct &c) -> SourcePosition {
80- return std::visit (
81- [&](const auto &o) -> SourcePosition {
82- const CharBlock &source{std::get<Verbatim>(o.t ).source };
83- return parsing->allCooked ()
84- .GetSourcePositionRange (source)
85- ->first ;
86- },
87- c.u );
80+ const CharBlock &source{c.source };
81+ return parsing->allCooked ().GetSourcePositionRange (source)->first ;
8882 },
8983 [&](const OpenMPSectionConstruct &c) -> SourcePosition {
9084 const CharBlock &source{c.source };
91- return ( parsing->allCooked ().GetSourcePositionRange (source) )->first ;
85+ return parsing->allCooked ().GetSourcePositionRange (source)->first ;
9286 },
9387 [&](const OpenMPUtilityConstruct &c) -> SourcePosition {
9488 const CharBlock &source{c.source };
95- return ( parsing->allCooked ().GetSourcePositionRange (source) )->first ;
89+ return parsing->allCooked ().GetSourcePositionRange (source)->first ;
9690 },
9791 },
9892 c.u );
@@ -157,14 +151,8 @@ std::string OpenMPCounterVisitor::getName(const OpenMPConstruct &c) {
157151 return normalize_construct_name (source.ToString ());
158152 },
159153 [&](const OpenMPAtomicConstruct &c) -> std::string {
160- return std::visit (
161- [&](const auto &c) {
162- // Get source from the verbatim fields
163- const CharBlock &source{std::get<Verbatim>(c.t ).source };
164- return " atomic-" +
165- normalize_construct_name (source.ToString ());
166- },
167- c.u );
154+ const CharBlock &source{c.source };
155+ return normalize_construct_name (source.ToString ());
168156 },
169157 [&](const OpenMPUtilityConstruct &c) -> std::string {
170158 const CharBlock &source{c.source };
0 commit comments