llvm-project/clang/test/Index/preamble-with-implicit-import.m
Ben Langmuir 6d25fdc41b [Modules] Don't infinite recurse on implicit import of circular modules in preamble
Update the Preprocessor's VisibleModuleSet when typo-correction creates
an implicit module import so that we won't accidentally write an invalid
SourceLocation into the preamble AST.  This would later lead to infinite
recursion when loading the preamble AST because we use the value in
ImportLocs to prevent visiting a module twice.

rdar://problem/24440990

llvm-svn: 260543
2016-02-11 17:04:42 +00:00

7 lines
340 B
Objective-C

// RUN: rm -rf %t
// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 2 none %s -I %S/Inputs -fmodules -fmodules-cache-path=%t -fspell-checking 2>&1 | FileCheck %s
// CHECK: error: declaration of 'Typo' must be imported
// CHECK: error: declaration of 'Typo' must be imported
#include "preamble-with-implicit-import.h"