[PATCH] D118532: Fix -Wreserved-identifier in presence of system macro

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 29 05:34:20 PST 2022


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM with a minor nit



================
Comment at: clang/lib/Sema/SemaDecl.cpp:5720
   if (Status != ReservedIdentifierStatus::NotReserved &&
-      !Context.getSourceManager().isInSystemHeader(D->getLocation()))
+      !(isFromSystemHeader(Context.getSourceManager(), D))) {
     Diag(D->getLocation(), diag::warn_reserved_extern_symbol)
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118532



More information about the cfe-commits mailing list