aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/CXX/class/class.local/p1.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/CXX/class/class.local/p1.cpp b/test/CXX/class/class.local/p1.cpp
index 565ddb8588..8a84f5dbed 100644
--- a/test/CXX/class/class.local/p1.cpp
+++ b/test/CXX/class/class.local/p1.cpp
@@ -8,10 +8,7 @@ void f()
extern int g();
struct local {
- int g() {
- return x; // expected-error{{reference to local variable 'x' declared in enclosed function 'f'}}
- return 1;
- }
+ int g() { return x; } // expected-error{{reference to local variable 'x' declared in enclosed function 'f'}}
int h() { return s; }
int k() { return :: x; }
int l() { return g(); }