Stop asserting when a meaningless -std= flag is passed for a non-compilation

input kind; go back to silently ignoring the flag.

llvm-svn: 295122
This commit is contained in:
Richard Smith 2017-02-14 23:41:38 +00:00
parent 35723f09bb
commit 222b30b9d3
2 changed files with 4 additions and 2 deletions

View File

@ -1702,8 +1702,8 @@ static bool IsInputCompatibleWithStandard(InputKind IK,
return true;
break;
default:
llvm_unreachable("Cannot decide whether language standard and "
"input file kind are compatible!");
// For other inputs, accept (and ignore) all -std= values.
return true;
}
return false;
}

View File

@ -0,0 +1,2 @@
// RUN: %clang -std=c++11 %s -E -o /dev/null 2>&1 | FileCheck %s --allow-empty
// CHECK-NOT: error