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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to