forked from OSchip/llvm-project
Make sure that we have File IDs for all of the unsaved files before we
deserialize diagnostics. llvm-svn: 99426
This commit is contained in:
parent
9b37b1d6bb
commit
023da0d43a
|
|
@ -1 +1,6 @@
|
|||
void f0() { }
|
||||
int f0(int *pointer1, float *pointer2) {
|
||||
return pointer2 - pointer1;
|
||||
}
|
||||
|
||||
void g() {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
// RUN: c-index-test -code-completion-at=%s:1:12 -remap-file="%s;%S/Inputs/remap-complete-to.c" %s | FileCheck %s
|
||||
// RUN: c-index-test -code-completion-at=%s:6:2 -remap-file="%s;%S/Inputs/remap-complete-to.c" %s 2> %t.err | FileCheck %s
|
||||
// RUN: FileCheck -check-prefix=CHECK-DIAGS %s < %t.err
|
||||
// XFAIL: win32
|
||||
|
||||
// CHECK: FunctionDecl:{ResultType void}{TypedText f0}{LeftParen (}{RightParen )}
|
||||
// CHECK: FunctionDecl:{ResultType int}{TypedText f0}{LeftParen (}
|
||||
void f() { }
|
||||
|
||||
// CHECK-DIAGS: remap-complete.c:2:19
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ void clang::LoadSerializedDiagnostics(const llvm::sys::Path &DiagnosticsPath,
|
|||
}
|
||||
|
||||
SourceMgr.overrideFileContents(File, Buffer);
|
||||
SourceMgr.createFileID(File, SourceLocation(), SrcMgr::C_User);
|
||||
}
|
||||
|
||||
// Parse the diagnostics, emitting them one by one until we've
|
||||
|
|
|
|||
Loading…
Reference in New Issue