llvm-project/clang/lib/Sema
Andrey Bokhanko 276055bb2f [GCC] Support for __final specifier
As reported in bug 28473, GCC supports "final" functionality in pre-C++11 code using the __final keyword. Clang currently supports the "final" keyword in accordance with the C++11 specification, however it ALSO supports it in pre-C++11 mode, with a warning.

This patch adds the "__final" keyword for compatibility with GCC in GCC Keywords mode (so it is enabled with existing flags), and issues a warning on its usage (suggesting switching to the C++11 keyword). This patch also adds a regression test for the functionality described. I believe this patch has minimal impact, as it simply adds a new keyword for existing behavior.

This has been validated with check-clang to avoid regressions. Patch is created in reference to revisions 276665.

Patch by Erich Keane.

Differential Revision: https://reviews.llvm.org/D22919

llvm-svn: 277134
2016-07-29 10:42:48 +00:00
..
AnalysisBasedWarnings.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
AttributeList.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
CMakeLists.txt It seems we need to add SemaExpr.cpp to the /bigobj list; I am getting consistent failures of hitting the section count limit. 2016-06-01 15:17:54 +00:00
CodeCompleteConsumer.cpp Fix unnecessary default switch warning 2016-07-27 16:41:56 +00:00
DeclSpec.cpp [GCC] Support for __final specifier 2016-07-29 10:42:48 +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 P0305R0: Semantic analysis and code generation for C++17 init-statement for 'if' and 'switch': 2016-07-14 00:11:03 +00:00
MultiplexExternalSemaSource.cpp Method Pool in modules: we make sure that if a module contains an entry for 2016-04-29 19:04:05 +00:00
Scope.cpp [Parser] Clear the TemplateParamScope bit of the current scope's flag 2016-04-29 02:24:14 +00:00
ScopeInfo.cpp Use ranges to concisely express iteration 2016-06-23 00:15:04 +00:00
Sema.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
SemaAccess.cpp P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991: 2016-06-28 19:03:57 +00:00
SemaAttr.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
SemaCUDA.cpp [CUDA] Use the multi-element remove function in EraseUnwantedCUDAMatches. 2016-07-12 23:23:13 +00:00
SemaCXXScopeSpec.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
SemaCast.cpp Reverting 275417 2016-07-14 20:05:30 +00:00
SemaChecking.cpp [X86] Block pbroadcastq instructions on 32-bit targets instead of pbroadcastb. 2016-07-24 14:58:06 +00:00
SemaCodeComplete.cpp [CodeCompletion] Allow system headers providing private symbols with a single underscore. 2016-07-01 01:17:02 +00:00
SemaConsumer.cpp
SemaCoroutine.cpp Re-commit "[Temporary] Add an ExprWithCleanups for each C++ MaterializeTemporaryExpr." 2016-06-21 20:29:17 +00:00
SemaDecl.cpp P0217R3: Parsing support and framework for AST representation of C++1z 2016-07-22 23:36:59 +00:00
SemaDeclAttr.cpp Revert "[ObjC] Consider availability of context when emitting availability warnings" 2016-07-28 22:51:11 +00:00
SemaDeclCXX.cpp P0217R3: Parsing support and framework for AST representation of C++1z 2016-07-22 23:36:59 +00:00
SemaDeclObjC.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
SemaExceptionSpec.cpp [ObjC] Implement @available in the Parser and AST 2016-07-16 00:35:23 +00:00
SemaExpr.cpp Revert "[ObjC] Consider availability of context when emitting availability warnings" 2016-07-28 22:51:11 +00:00
SemaExprCXX.cpp [Sema] Teach getCurrentThisType to reconize lambda in in-class initializer 2016-07-27 18:25:10 +00:00
SemaExprMember.cpp Add .rgba syntax extension to ext_vector_type types 2016-07-22 18:49:43 +00:00
SemaExprObjC.cpp ObjC Class Property: diagnostics when accessing a class property using instance. 2016-06-28 23:01:49 +00:00
SemaFixItUtils.cpp Wire a SourceLocation into IsDerivedFrom and move the RequireCompleteType call 2015-12-18 21:45:41 +00:00
SemaInit.cpp [OpenCL] Generate opaque type for sampler_t and function call for the initializer 2016-07-28 19:26:30 +00:00
SemaLambda.cpp [Sema] Replace mem_fn with lambdas. NFC. 2016-07-24 23:12:40 +00:00
SemaLookup.cpp [modules] Don't emit initializers for VarDecls within a module eagerly whenever 2016-07-20 19:10:16 +00:00
SemaObjCProperty.cpp [ObjC] Remove _Atomic from return type and parameter type of 2016-05-26 00:37:30 +00:00
SemaOpenMP.cpp [OpenMP] Code generation for the is_device_ptr clause 2016-07-28 14:25:09 +00:00
SemaOverload.cpp [Sema] Replace mem_fn with lambdas. NFC. 2016-07-24 23:12:40 +00:00
SemaPseudoObject.cpp arc-repeated-use-of-weak should not warn about IBOutlet properties 2016-05-25 05:41:57 +00:00
SemaStmt.cpp P0305R0: Semantic analysis and code generation for C++17 init-statement for 'if' and 'switch': 2016-07-14 00:11:03 +00:00
SemaStmtAsm.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
SemaStmtAttr.cpp Add loop pragma for Loop Distribution 2016-06-14 12:04:26 +00:00
SemaTemplate.cpp Revert r276069: MSVC bots not happy 2016-07-20 01:05:31 +00:00
SemaTemplateDeduction.cpp Revert r276069: MSVC bots not happy 2016-07-20 01:05:31 +00:00
SemaTemplateInstantiate.cpp [AST] Keep track of the left brace source location of a tag decl. 2016-07-15 18:11:33 +00:00
SemaTemplateInstantiateDecl.cpp P0217R3: Parsing support and framework for AST representation of C++1z 2016-07-22 23:36:59 +00:00
SemaTemplateVariadic.cpp Fix crash while parsing variable template with variadic template arguments 2016-05-26 12:55:34 +00:00
SemaType.cpp [OpenCL] Improved diagnostics of OpenCL types. 2016-07-11 13:46:02 +00:00
TreeTransform.h [OpenMP] Sema and parsing for 'target simd' pragma 2016-07-20 22:57:10 +00:00
TypeLocBuilder.cpp [Sema] Fix bug in TypeLocBuilder::pushImpl 2016-02-18 21:05:09 +00:00
TypeLocBuilder.h Correcting a typo in a comment; NFC. 2016-06-08 12:33:18 +00:00