Implemented delayed processing of 'unavailable' checking, just like with 'deprecated'.
Fixes <rdar://problem/15584219> and <rdar://problem/12241361>. This change looks large, but all it does is reuse and consolidate the delayed diagnostic logic for deprecation warnings with unavailability warnings. By doing so, it showed various inconsistencies between the diagnostics, which were close, but not consistent. It also revealed some missing "note:"'s in the deprecated diagnostics that were showing up in the unavailable diagnostics, etc. This change also changes the wording of the core deprecation diagnostics. Instead of saying "function has been explicitly marked deprecated" we now saw "'X' has been been explicitly marked deprecated". It turns out providing a bit more context is useful, and often we got the actual term wrong or it was not very precise (e.g., "function" instead of "destructor"). By just saying the name of the thing that is deprecated/deleted/unavailable we define this issue away. This diagnostic can likely be further wordsmithed to be shorter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197627 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/DiagnosticSemaKinds.td 2 additions, 2 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- include/clang/Sema/DelayedDiagnostic.h 12 additions, 8 deletionsinclude/clang/Sema/DelayedDiagnostic.h
- include/clang/Sema/Sema.h 8 additions, 5 deletionsinclude/clang/Sema/Sema.h
- lib/Sema/DelayedDiagnostic.cpp 11 additions, 2 deletionslib/Sema/DelayedDiagnostic.cpp
- lib/Sema/SemaDeclAttr.cpp 109 additions, 44 deletionslib/Sema/SemaDeclAttr.cpp
- lib/Sema/SemaExpr.cpp 9 additions, 25 deletionslib/Sema/SemaExpr.cpp
- test/ARCMT/checking.m 3 additions, 3 deletionstest/ARCMT/checking.m
- test/Analysis/retain-release.m 1 addition, 1 deletiontest/Analysis/retain-release.m
- test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp 7 additions, 7 deletionstest/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp
- test/CXX/special/class.copy/p33-0x.cpp 1 addition, 1 deletiontest/CXX/special/class.copy/p33-0x.cpp
- test/CXX/special/class.inhctor/p4.cpp 2 additions, 2 deletionstest/CXX/special/class.inhctor/p4.cpp
- test/CXX/special/class.temporary/p1.cpp 1 addition, 1 deletiontest/CXX/special/class.temporary/p1.cpp
- test/Headers/ms-intrin.cpp 3 additions, 3 deletionstest/Headers/ms-intrin.cpp
- test/Parser/MicrosoftExtensions.c 3 additions, 3 deletionstest/Parser/MicrosoftExtensions.c
- test/Sema/MicrosoftExtensions.c 3 additions, 3 deletionstest/Sema/MicrosoftExtensions.c
- test/Sema/attr-availability-ios.c 4 additions, 4 deletionstest/Sema/attr-availability-ios.c
- test/Sema/attr-availability-macosx.c 2 additions, 2 deletionstest/Sema/attr-availability-macosx.c
- test/Sema/attr-availability.c 2 additions, 2 deletionstest/Sema/attr-availability.c
- test/Sema/attr-cleanup.c 1 addition, 1 deletiontest/Sema/attr-cleanup.c
- test/Sema/attr-deprecated-message.c 4 additions, 4 deletionstest/Sema/attr-deprecated-message.c
Loading
Please register or sign in to comment