[PATCH] D59394: [Sema] De-duplicate some availability checking logic

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 14 16:08:09 PDT 2019


erik.pilkington created this revision.
erik.pilkington added reviewers: rsmith, aaron.ballman, ldionne, dexonsmith.
Herald added subscribers: jdoerfert, jkorous.
Herald added a project: clang.

Right now, we emit unavailable errors for calls to functions during overload resolution, and for references to all other declarations in DiagnoseUseOfDecl. The early checks during overload resolution aren't as good as the DiagnoseAvailabilityOfDecl based checks, as they error on the code from PR40991. Fix this by removing the early checking.

llvm.org/PR40991
rdar://48564179

Thanks for taking a look!
Erik


Repository:
  rC Clang

https://reviews.llvm.org/D59394

Files:
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaExprCXX.cpp
  clang/lib/Sema/SemaInit.cpp
  clang/lib/Sema/SemaOverload.cpp
  clang/test/Sema/enable_if.c
  clang/test/Sema/overloadable.c
  clang/test/SemaCXX/attr-unavailable.cpp
  clang/test/SemaCXX/coroutines.cpp
  clang/test/SemaObjCXX/overload.mm
  clang/test/SemaTemplate/instantiate-expr-4.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59394.190747.patch
Type: text/x-patch
Size: 27978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190314/957367d3/attachment-0001.bin>


More information about the cfe-commits mailing list