summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-in-c.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-02-04 11:57:16 +0000
committerDouglas Gregor <dgregor@apple.com>2011-02-04 11:57:16 +0000
commit0fcaac9ef33996215842da516e50525071ccb68a (patch)
treee82121d2024aac5d5028293d6beb053b8aef2f89 /clang/test/Parser/cxx-in-c.c
parent05edf944c0f3c057247c50bd1e57ff8613ab0a3a (diff)
downloadbcm5719-llvm-0fcaac9ef33996215842da516e50525071ccb68a.tar.gz
bcm5719-llvm-0fcaac9ef33996215842da516e50525071ccb68a.zip
Fix a crash-on-invalid where we were trying to parse C++ constructs in
C, then hitting an assertion because C code shouldn't try to parse optional nested-name-specifiers. Fixes PR9137. llvm-svn: 124860
Diffstat (limited to 'clang/test/Parser/cxx-in-c.c')
-rw-r--r--clang/test/Parser/cxx-in-c.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-in-c.c b/clang/test/Parser/cxx-in-c.c
new file mode 100644
index 00000000000..50212ad0b31
--- /dev/null
+++ b/clang/test/Parser/cxx-in-c.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -fsyntax-only -verify
+
+// PR9137
+void f0(int x) : {};
+void f1(int x) try {};
OpenPOWER on IntegriCloud