aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-06 11:44:10 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-06 11:44:10 +0000
commited328c6129152f66771c3bed338a2e6e13e4e230 (patch)
treedfcae614419d1d78f16b948935554cb3a68a41e9 /test
parent2d490f2d8a9a093e6e36b07b70993ae739cad803 (diff)
Diagnose the use of "inline" on block-scope function declarations in
C++, from Andrea Nall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110439 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp
index 99a4f7aec4..d7b9eff10a 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp
@@ -1,11 +1,13 @@
// RUN: %clang_cc1 -verify %s
-// XFAIL: *
-void f0(void) {
- inline void f1(); // expected-error {{'inline' is not allowed on block scope function declaration}}
+void f0a(void) {
+ inline void f1(); // expected-error {{inline declaration of 'f1' not allowed in block scope}}
+}
+
+void f0b(void) {
+ void f1();
}
// FIXME: Add test for "If the inline specifier is used in a friend declaration,
// that declaration shall be a definition or the function shall have previously
// been declared inline.
-