diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2018-07-30 15:19:05 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2018-07-30 15:19:05 +0000 |
commit | 1b2dafb41e63b904e18ef700ad103be513100a66 (patch) | |
tree | c25d039f59a77c7071b2a303a878b0527a424cf8 /test/Index | |
parent | 149f92fc41c347021159ddd56ef3b72342487a44 (diff) |
[CodeComplete] Fix the crash in code completion on access checking
Started crashing in r337453. See the added test case for the crash repro.
The fix reverts part of r337453 that causes the crash and does
not actually break anything when reverted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index')
-rw-r--r-- | test/Index/complete-access-checks-crash.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Index/complete-access-checks-crash.cpp b/test/Index/complete-access-checks-crash.cpp new file mode 100644 index 0000000000..c7ac4d6563 --- /dev/null +++ b/test/Index/complete-access-checks-crash.cpp @@ -0,0 +1,13 @@ +struct Base { +protected: + bool bar(); +}; +struct Derived : Base { +}; + +struct X { + int foo() { + Derived(). // RUN: c-index-test -code-completion-at=%s:10:15 %s | FileCheck %s + // CHECK: bar{{.*}}(inaccessible) + } +}; |