llvm-project/clang/lib/Sema
Vassil Vassilev a4d7d783d0 [modules] Fix Decl's Used invariant.
The Decl::isUsed has a value for every decl. In non-module builds it is very
difficult (but possible) to break this invariant but when we walk up the redecl
chain we find the neccessary information.

When deserializing the decls from a module it is much more difficult to update
correctly this invariant. The patch centralizes the information whether a decl
is used in the canonical decl marking the entire entity as being used.

Fixes https://llvm.org/bugs/show_bug.cgi?id=27401

Patch by Cristina Cristescu and me.

Thanks to Richard Smith who helped to debug and understand the issue!

Reviewed by Richard Smith.

llvm-svn: 267691
2016-04-27 10:46:06 +00:00
..
AnalysisBasedWarnings.cpp P0188R1: add support for standard [[fallthrough]] attribute. This is almost 2016-03-08 00:32:55 +00:00
AttributeList.cpp P0188R1: add support for standard [[fallthrough]] attribute. This is almost 2016-03-08 00:32:55 +00:00
CMakeLists.txt [coroutines] Initial stub Sema functionality for handling coroutine await / yield / return. 2015-10-22 06:13:50 +00:00
CodeCompleteConsumer.cpp Silence some MSVC false positive warnings about integer zexts and falling off the end of a covered switch 2016-02-10 19:09:15 +00:00
DeclSpec.cpp Revert 266186 as it breaks anything that includes type_traits on some platforms 2016-04-15 18:04:13 +00:00
DelayedDiagnostic.cpp Addressing review comments for r261163. 2016-02-22 04:47:24 +00:00
IdentifierResolver.cpp [modules] Separately track whether an identifier's preprocessor information and 2016-02-05 19:03:40 +00:00
JumpDiagnostics.cpp Some minor ARC diagnostic improvements. 2015-10-21 18:06:38 +00:00
MultiplexExternalSemaSource.cpp Store list of undefined-but-used objects in a deterministic order to fix 2016-03-25 21:49:43 +00:00
Scope.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 19:38:18 +00:00
ScopeInfo.cpp [Objective-c] Do not set IsExact to true when the receiver is a class. 2016-03-22 05:00:21 +00:00
Sema.cpp [OpenCL] Complete image types support. 2016-04-08 13:40:33 +00:00
SemaAccess.cpp Make SemaAccess smarter about determining when a dependent class might 2016-03-23 20:39:06 +00:00
SemaAttr.cpp Implement support for [[maybe_unused]] in C++1z that is based off existing support for unused, and treat it as an extension pre-C++1z. This also means extending the existing unused attribute so that it can be placed on an enum and enumerator, in addition to the other subjects. 2016-03-09 16:48:08 +00:00
SemaCUDA.cpp [CUDA] Make unattributed constexpr functions implicitly host+device. 2016-03-30 23:30:21 +00:00
SemaCXXScopeSpec.cpp [typo-correction] Apply name specifier corrections when forming a NNS 2016-02-16 19:16:20 +00:00
SemaCast.cpp [MSVC] PR27337: allow static_cast from private base to derived for WTL 2016-04-26 09:21:17 +00:00
SemaChecking.cpp Improve diagnostic checking for va_start to also warn on other instances of undefined behavior, such as a parameter declared with the register keyword in C, or a parameter of a type that undergoes default argument promotion. 2016-04-24 13:30:21 +00:00
SemaCodeComplete.cpp Revert r266415, it broke parsing SDK headers (PR27367). 2016-04-15 14:35:06 +00:00
SemaConsumer.cpp
SemaCoroutine.cpp [coroutines] Build a CoroutineBodyStmt when finishing parsing a coroutine, and form the initial_suspend, final_suspend, and get_return_object calls. 2015-11-24 02:34:39 +00:00
SemaDecl.cpp Implement CWG 941 - explicit specializations of deleted function templates 2016-04-17 17:32:04 +00:00
SemaDeclAttr.cpp [GCC] Attribute ifunc support in clang 2016-04-11 07:48:59 +00:00
SemaDeclCXX.cpp Make sure CheckDestructor gets called on dllimported classes if the vtable is used (PR27319) 2016-04-13 20:21:15 +00:00
SemaDeclObjC.cpp Revert r266415, it broke parsing SDK headers (PR27367). 2016-04-15 14:35:06 +00:00
SemaExceptionSpec.cpp Wire a SourceLocation into IsDerivedFrom and move the RequireCompleteType call 2015-12-18 21:45:41 +00:00
SemaExpr.cpp [modules] Fix Decl's Used invariant. 2016-04-27 10:46:06 +00:00
SemaExprCXX.cpp Implement support for conditional between xvalues of reference-compatible 2016-04-25 19:30:37 +00:00
SemaExprMember.cpp [OPENMP 4.5] Codegen for data members in 'reduction' clause. 2016-03-02 04:57:40 +00:00
SemaExprObjC.cpp [ObjC kindof] Use type bound to filter out the candidate methods. 2016-04-07 19:32:24 +00:00
SemaFixItUtils.cpp Wire a SourceLocation into IsDerivedFrom and move the RequireCompleteType call 2015-12-18 21:45:41 +00:00
SemaInit.cpp [modules] Handle merged fields in designated initializers. 2016-04-08 19:57:40 +00:00
SemaLambda.cpp [Cxx1z-constexpr-lambda-P0170R1] Support parsing of constexpr specifier (and its inference) on lambda expressions 2016-03-26 16:11:37 +00:00
SemaLookup.cpp Revert 266186 as it breaks anything that includes type_traits on some platforms 2016-04-15 18:04:13 +00:00
SemaObjCProperty.cpp ObjC class properties: add diagnostics for unimplemented class properties. 2016-04-12 23:01:55 +00:00
SemaOpenMP.cpp [OpenMP] Improve mappable expressions Sema. 2016-04-26 14:54:23 +00:00
SemaOverload.cpp Warn if function or variable cannot be implicitly instantiated 2016-04-19 06:19:52 +00:00
SemaPseudoObject.cpp Class Property: class property and instance property can have the same name. 2016-01-28 18:49:28 +00:00
SemaStmt.cpp Test commit 2016-04-26 20:55:48 +00:00
SemaStmtAsm.cpp Avoid using LookupResult's implicit copy ctor and assignment operator to avoid warnings 2016-03-16 09:56:58 +00:00
SemaStmtAttr.cpp [OpenCL] Added nosvm attribute for OpenCL v2.0. 2016-03-31 11:07:22 +00:00
SemaTemplate.cpp Implement CWG 941 - explicit specializations of deleted function templates 2016-04-17 17:32:04 +00:00
SemaTemplateDeduction.cpp Refactor traversal of bases in deduction of template parameters from base 2016-04-25 19:28:08 +00:00
SemaTemplateInstantiate.cpp Make sure to perform dependent access checks when instantiating a 2016-03-23 20:07:07 +00:00
SemaTemplateInstantiateDecl.cpp Warn if function or variable cannot be implicitly instantiated 2016-04-19 06:19:52 +00:00
SemaTemplateVariadic.cpp Revert 266186 as it breaks anything that includes type_traits on some platforms 2016-04-15 18:04:13 +00:00
SemaType.cpp Block: Fix a crash when we have type attributes or qualifiers with omitted 2016-04-18 18:40:51 +00:00
TreeTransform.h [Cxx1z-constexpr-lambda-P0170R1] Support parsing of constexpr specifier (and its inference) on lambda expressions 2016-03-26 16:11:37 +00:00
TypeLocBuilder.cpp [Sema] Fix bug in TypeLocBuilder::pushImpl 2016-02-18 21:05:09 +00:00
TypeLocBuilder.h Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00