summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2015-07-07 06:20:22 +0000
committerDouglas Gregor <dgregor@apple.com>2015-07-07 06:20:22 +0000
commit4c850f3a64d6c5aee4997c3cdaf630c197f08224 (patch)
treecf1137c01c08dd7f72ee35e7be3fc98b2d11b81f /clang/lib/Sema/SemaCodeComplete.cpp
parentc3425b1ff9b9b2027447fc004a1e4b530d19d3cf (diff)
downloadbcm5719-llvm-4c850f3a64d6c5aee4997c3cdaf630c197f08224.tar.gz
bcm5719-llvm-4c850f3a64d6c5aee4997c3cdaf630c197f08224.zip
[libclang] Fix code-completion of block parameters that are marked with nullability specifier.
rdar://20755276 llvm-svn: 241558
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 61e244601fb..7d898d8ac1a 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -2204,6 +2204,11 @@ static std::string FormatFunctionParameter(const PrintingPolicy &Policy,
TL = QualifiedTL.getUnqualifiedLoc();
continue;
}
+
+ if (AttributedTypeLoc AttrTL = TL.getAs<AttributedTypeLoc>()) {
+ TL = AttrTL.getModifiedLoc();
+ continue;
+ }
}
// Try to get the function prototype behind the block pointer type,
OpenPOWER on IntegriCloud