diff options
author | Douglas Gregor <dgregor@apple.com> | 2015-07-07 06:20:31 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2015-07-07 06:20:31 +0000 |
commit | 7fa93c77303e408aa3fad7a9e3cc43849ce021ce (patch) | |
tree | 51bbfeaa035b2614a62537f6e677a862956db6a8 /clang/lib | |
parent | 9b7b3e90385cbca4af1cc6f2a3afb1da44762780 (diff) | |
download | bcm5719-llvm-7fa93c77303e408aa3fad7a9e3cc43849ce021ce.tar.gz bcm5719-llvm-7fa93c77303e408aa3fad7a9e3cc43849ce021ce.zip |
[libclang] When inferring nonnull use the contextual keyword for the code-completion results,
when appropriate.
rdar://20742295
llvm-svn: 241560
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaType.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 768efeb64a0..1360c2cf28a 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -3479,6 +3479,11 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, spliceAttrIntoList(*nullabilityAttr, attrs); + if (inferNullabilityCS) { + state.getDeclarator().getMutableDeclSpec().getObjCQualifiers() + ->setObjCDeclQualifier(ObjCDeclSpec::DQ_CSNullability); + } + if (inferNullabilityInnerOnly) inferNullabilityInnerOnlyComplete = true; return nullabilityAttr; |