llvm-project/clang/lib/Lex
Douglas Gregor 261a89b0f7 Introduce type nullability specifiers for C/C++.
Introduces the type specifiers __nonnull, __nullable, and
__null_unspecified that describe the nullability of the pointer type
to which the specifier appertains. Nullability type specifiers improve
on the existing nonnull attributes in a few ways:
  - They apply to types, so one can represent a pointer to a non-null
    pointer, use them in function pointer types, etc.
  - As type specifiers, they are syntactically more lightweight than
    __attribute__s or [[attribute]]s.
  - They can express both the notion of 'should never be null' and
  also 'it makes sense for this to be null', and therefore can more
  easily catch errors of omission where one forgot to annotate the
  nullability of a particular pointer (this will come in a subsequent
  patch).

Nullability type specifiers are maintained as type sugar, and
therefore have no effect on mangling, encoding, overloading,
etc. Nonetheless, they will be used for warnings about, e.g., passing
'null' to a method that does not accept it.

This is the C/C++ part of rdar://problem/18868820.

llvm-svn: 240146
2015-06-19 17:51:05 +00:00
..
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
HeaderMap.cpp Make VFS and FileManager match the current MemoryBuffer API. 2014-10-26 22:44:13 +00:00
HeaderSearch.cpp [modules] Simplify -cc1 interface for enabling implicit module maps. 2015-06-16 00:08:24 +00:00
Lexer.cpp Replace a few std::string& with StringRef. NFC. 2015-06-01 20:00:16 +00:00
LiteralSupport.cpp [lex] Don't read past the end of the buffer 2015-03-29 14:11: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 [modules] Add a mechanism to dump information about a macro. 2015-04-30 23:10:40 +00:00
Makefile
ModuleMap.cpp [modules] Simplify -cc1 interface for enabling implicit module maps. 2015-06-16 00:08:24 +00:00
PPCaching.cpp Fix the build break introduced by r195799 by restoring two close 2013-11-27 01:40:12 +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 [clang] Refactoring of conditions so they use isOneOf() instead of multiple is(). 2015-06-18 10:59:26 +00:00
PPExpressions.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
PPLexerChange.cpp Avoid using a C++11 library feature not present in libstdc++4.7. 2015-05-21 01:26:53 +00:00
PPMacroExpansion.cpp Introduce type nullability specifiers for C/C++. 2015-06-19 17:51:05 +00:00
PTHLexer.cpp Replace a few std::string& with StringRef. NFC. 2015-06-01 20:00:16 +00:00
Pragma.cpp Bug fix for PR23577 (https://llvm.org/bugs/show_bug.cgi?id=23577#c0). 2015-05-25 11:21:20 +00:00
PreprocessingRecord.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
Preprocessor.cpp [modules] If we re-enter a submodule from within itself (when submodule 2015-05-21 01:20:10 +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 [clang] Refactoring of conditions so they use isOneOf() instead of multiple is(). 2015-06-18 10:59:26 +00:00
UnicodeCharSets.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00