summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp4
-rw-r--r--clang/test/Driver/unknown-std.S2
2 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 3001a2dda46..2ef96398c0d 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -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;
}
diff --git a/clang/test/Driver/unknown-std.S b/clang/test/Driver/unknown-std.S
new file mode 100644
index 00000000000..ecb6a9e92fa
--- /dev/null
+++ b/clang/test/Driver/unknown-std.S
@@ -0,0 +1,2 @@
+// RUN: %clang -std=c++11 %s -E -o /dev/null 2>&1 | FileCheck %s --allow-empty
+// CHECK-NOT: error
OpenPOWER on IntegriCloud