summaryrefslogtreecommitdiff
path: root/test/Parser
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-05-25 16:24:49 +0000
committerErich Keane <erich.keane@intel.com>2017-05-25 16:24:49 +0000
commit4fe5879deb4ef56ce23998800eb2a31493f40473 (patch)
treedd73ba9193d03ce185fc4de7a5c05a59d23efecc /test/Parser
parent945fecf7c719e4fa1615123272cfee4b7c610c65 (diff)
Revert MSVC CXXOperatorNames patch due to issues with Chromium
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser')
-rw-r--r--test/Parser/MicrosoftExtensions.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/Parser/MicrosoftExtensions.cpp b/test/Parser/MicrosoftExtensions.cpp
index aabf3bf15a..74f4bb3268 100644
--- a/test/Parser/MicrosoftExtensions.cpp
+++ b/test/Parser/MicrosoftExtensions.cpp
@@ -261,8 +261,9 @@ int __identifier(else} = __identifier(for); // expected-error {{missing ')' afte
#define identifier_weird(x) __identifier(x
int k = identifier_weird(if)); // expected-error {{use of undeclared identifier 'if'}}
-// 'and' is not an operator name with Microsoft compatibility.
-extern int __identifier(and) r; // expected-error {{expected ';' after top level declarator}}
+// This is a bit weird, but the alternative tokens aren't keywords, and this
+// behavior matches MSVC. FIXME: Consider supporting this anyway.
+extern int __identifier(and) r; // expected-error {{cannot convert '&&' token to an identifier}}
void f() {
__identifier(() // expected-error {{cannot convert '(' token to an identifier}}
@@ -354,6 +355,7 @@ void TestProperty() {
++sp.V11;
}
+//expected-warning@+1 {{C++ operator 'and' (aka '&&') used as a macro name}}
#define and foo
struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) __declspec(novtable) IUnknown {};