]> granicus.if.org Git - clang/commit
Modules: set SystemHeader to true if we are building a system module.
authorManman Ren <manman.ren@gmail.com>
Tue, 17 May 2016 02:15:12 +0000 (02:15 +0000)
committerManman Ren <manman.ren@gmail.com>
Tue, 17 May 2016 02:15:12 +0000 (02:15 +0000)
commitc760a821c1c0ef03ab41edfa3ddfedc44a25c99d
treebf3cfc955af9231f5f3d8e6808c7da070c73143a
parent24f1d22d4499f4bee7790dfa29c885bff7892d1b
Modules: set SystemHeader to true if we are building a system module.

If we are processing a #include from a module build, we should treat it
as a system header if we're building a system module. Passing an optional
flag to HeaderSearch::LookupFile.

Before this, the testing case will crash when accessing a freed FileEntry.

rdar://26214027

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269730 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Lex/HeaderSearch.h
lib/Lex/HeaderSearch.cpp
lib/Lex/PPDirectives.cpp
test/Modules/Inputs/UseAfterFree/UseAfterFreePrivate.h [new file with mode: 0644]
test/Modules/Inputs/UseAfterFree/UseAfterFreePublic.h [new file with mode: 0644]
test/Modules/Inputs/UseAfterFree/module.map [new file with mode: 0644]
test/Modules/Inputs/UseAfterFree/module_private.map [new file with mode: 0644]
test/Modules/use-after-free.m [new file with mode: 0644]