summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-10-15 21:43:24 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-10-15 21:43:24 +0000
commitc60d6e7af03607c97d2900c1fde5589f6b099463 (patch)
treebfebc1729683a5e9dfeb6874b9da18ee54f7d981 /clang/test
parent8c2f519b8bd3b0f9cf3a0240988e50e251343e52 (diff)
downloadbcm5719-llvm-c60d6e7af03607c97d2900c1fde5589f6b099463.tar.gz
bcm5719-llvm-c60d6e7af03607c97d2900c1fde5589f6b099463.zip
Report the location of the syntax error inside a macro. Fixes PR7944.
llvm-svn: 116624
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/PR7944.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/PR7944.cpp b/clang/test/SemaCXX/PR7944.cpp
new file mode 100644
index 00000000000..fc52d101e87
--- /dev/null
+++ b/clang/test/SemaCXX/PR7944.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// PR7944
+
+#define MACRO(x) x
+
+struct B { int f() { return 0; } };
+struct A { B* b() { return new B; } };
+
+void g() {
+ A a;
+ MACRO(a.b->f()); // expected-error{{base of member reference has function type}}
+}
OpenPOWER on IntegriCloud