llvm-project/clang/lib/Lex
Duncan P. N. Exon Smith ec599a906b SemaCXX: Support templates in availability attributes
If the availability context is `FunctionTemplateDecl`, we should look
through it to the `FunctionDecl`.  This prevents a diagnostic in the
following case:

    class C __attribute__((unavailable));
    template <class T> void foo(C&) __attribute__((unavailable));

This adds tests for availability in templates in many other cases, but
that was the only case that failed before this patch.

I added a feature `__has_feature(attribute_availability_in_templates)`
so users can test for this.

rdar://problem/24561029

llvm-svn: 262050
2016-02-26 19:27:00 +00:00
..
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
HeaderMap.cpp Lex: Return "" when HeaderMap::lookupFilename fails 2016-02-23 00:48:16 +00:00
HeaderSearch.cpp Move LocInfoType from Sema to AST. 2016-02-01 17:42:01 +00:00
Lexer.cpp Remove use of builtin comma operator. 2016-02-18 22:34:54 +00:00
LiteralSupport.cpp [OpenCL] Added half type literal with suffix h. 2016-02-17 11:34:37 +00:00
MacroArgs.cpp [modules] Stop trying to fake up a linear MacroDirective history. 2015-04-29 23:20:19 +00:00
MacroInfo.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 19:38:18 +00:00
ModuleMap.cpp [modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single 2016-02-19 22:25:36 +00:00
PPCaching.cpp [Parser] Update CachedTokens while parsing ObjectiveC template argument list 2016-01-31 00:47:51 +00:00
PPCallbacks.cpp
PPConditionalDirectiveRecord.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
PPDirectives.cpp Revert "Don't convert a char to a const char *" 2016-02-24 22:07:26 +00:00
PPExpressions.cpp Remove use of builtin comma operator. 2016-02-18 22:34:54 +00:00
PPLexerChange.cpp PR24667: fix quadratic runtime if textually-included modular headers define large numbers of macros. 2016-02-23 23:20:51 +00:00
PPMacroExpansion.cpp SemaCXX: Support templates in availability attributes 2016-02-26 19:27:00 +00:00
PTHLexer.cpp Roll-back r250822. 2015-10-20 13:23:58 +00:00
Pragma.cpp Fix use after free. 2016-02-13 13:42:41 +00:00
PreprocessingRecord.cpp Roll-back r250822. 2015-10-20 13:23:58 +00:00
Preprocessor.cpp [modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single 2016-02-19 22:25:36 +00:00
PreprocessorLexer.cpp Make Preprocessor::Lex non-recursive. 2013-09-19 00:41:32 +00:00
ScratchBuffer.cpp MSan told me that we actually dump the entire scratch buffer into PCH files, initialize it. 2015-04-06 20:01:49 +00:00
TokenConcatenation.cpp [clang] Refactoring of conditions so they use isOneOf() instead of multiple is(). 2015-06-18 10:59:26 +00:00
TokenLexer.cpp Fix remaining Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-12 22:53:10 +00:00
UnicodeCharSets.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00