forked from OSchip/llvm-project
When Driver::generateCompilationDiagnostics is filtering the list of
inputs to the preprocessor, check for invalid types first because not all linker inputs have an option value to retrieve. llvm-svn: 207454
This commit is contained in:
parent
3468d9d929
commit
f44157d6ab
|
@ -447,13 +447,14 @@ void Driver::generateCompilationDiagnostics(Compilation &C,
|
|||
bool IgnoreInput = false;
|
||||
|
||||
// Ignore input from stdin or any inputs that cannot be preprocessed.
|
||||
if (!strcmp(it->second->getValue(), "-")) {
|
||||
// Check type first as not all linker inputs have a value.
|
||||
if (types::getPreprocessedType(it->first) == types::TY_INVALID) {
|
||||
IgnoreInput = true;
|
||||
} else if (!strcmp(it->second->getValue(), "-")) {
|
||||
Diag(clang::diag::note_drv_command_failed_diag_msg)
|
||||
<< "Error generating preprocessed source(s) - ignoring input from stdin"
|
||||
".";
|
||||
IgnoreInput = true;
|
||||
} else if (types::getPreprocessedType(it->first) == types::TY_INVALID) {
|
||||
IgnoreInput = true;
|
||||
}
|
||||
|
||||
if (IgnoreInput) {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// because of the glob (*.c, *.sh)
|
||||
// REQUIRES: shell
|
||||
|
||||
// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null 2>&1 | FileCheck %s
|
||||
// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null -lstdc++ 2>&1 | FileCheck %s
|
||||
|
||||
// FIXME: Investigating. "fatal error: file 'nul' modified since it was first processed"
|
||||
// XFAIL: mingw32
|
||||
|
|
Loading…
Reference in New Issue