llvm-project/clang/test/Index/complete-module-undef.m
Ben Langmuir c28ce3aba6 Avoid a crash after loading an #undef'd macro in code completion
In code-completion, don't assume there is a MacroInfo for everything,
since we aren't serializing the def corresponding to a later #undef in
the same module.  Also setup the HadMacro bit correctly for undefs to
avoid an assertion failure.

rdar://18416901

llvm-svn: 218694
2014-09-30 20:00:18 +00:00

9 lines
358 B
Matlab

// RUN: rm -rf %t
// RUN: env CINDEXTEST_COMPLETION_CACHING=1 \
// RUN: c-index-test -test-load-source-reparse 2 local %s -fmodules -fmodules-cache-path=%t -I %S/Inputs \
// RUN: | FileCheck %s
// rdar://18416901 (used to crash)
// CHECK: complete-module-undef.m:8:1: ModuleImport=ModuleUndef:8:1 (Definition) Extent=[8:1 - 8:20]
@import ModuleUndef;