[PATCH] D83261: [OPENMP]Redesign of OMPExecutableDirective representation.

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 3 09:52:20 PDT 2020


riccibruno added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:345
     Diag(Loc, diag::err_omp_declare_mapper_wrong_var)
-        << DMD->getVarName().getAsString();
+        << getOpenMPDeclareMapperVarName();
     Diag(D->getLocation(), diag::note_entity_declared_at) << D;
----------------
I'd like to point out that in general there is no need to pass a string to a diagnostic instead of a `NamedDecl *`. Doing so will bypass the customisation points `NamedDecl::getNameForDiagnostic` and `NamedDecl::printName`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83261/new/

https://reviews.llvm.org/D83261



More information about the cfe-commits mailing list