summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/enable_if.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/enable_if.cpp')
-rw-r--r--clang/test/SemaCXX/enable_if.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/enable_if.cpp b/clang/test/SemaCXX/enable_if.cpp
index 81308136c48..e265b410ac8 100644
--- a/clang/test/SemaCXX/enable_if.cpp
+++ b/clang/test/SemaCXX/enable_if.cpp
@@ -440,3 +440,13 @@ void testFoo() {
foo(1, 0, m, 3); // expected-error{{no matching}}
}
}
+
+// Tests that we emit errors at the point of the method call, rather than the
+// beginning of the expression that happens to be a member call.
+namespace member_loc {
+ struct Foo { void bar() __attribute__((enable_if(0, ""))); }; // expected-note{{disabled}}
+ void testFoo() {
+ Foo()
+ .bar(); // expected-error{{no matching member function}}
+ }
+}
OpenPOWER on IntegriCloud