Support __declspec(property) (#4700)
This commit is contained in:
parent
6f222e4d1f
commit
3ccdae78ba
|
@ -9223,7 +9223,9 @@ void Tokenizer::simplifyDeclspec()
|
|||
if (tok1) {
|
||||
tok1->isDeclspecNothrow(true);
|
||||
}
|
||||
}
|
||||
} else if (tok->strAt(2) == "property")
|
||||
tok->next()->link()->insertToken("__property");
|
||||
|
||||
Token::eraseTokens(tok, tok->next()->link()->next());
|
||||
tok->deleteThis();
|
||||
}
|
||||
|
|
|
@ -7359,7 +7359,7 @@ private:
|
|||
ASSERT_EQUALS("int a ;", tokenizeAndStringify("__declspec(thread) __declspec(align(32)) int a;"));
|
||||
ASSERT_EQUALS("int i ;", tokenizeAndStringify("__declspec(allocate(\"mycode\")) int i;"));
|
||||
ASSERT_EQUALS("struct IUnknown ;", tokenizeAndStringify("struct __declspec(uuid(\"00000000-0000-0000-c000-000000000046\")) IUnknown;"));
|
||||
ASSERT_EQUALS("int x [ ] ;", tokenizeAndStringify("__declspec(property(get=GetX, put=PutX)) int x[];"));
|
||||
ASSERT_EQUALS("__property int x [ ] ;", tokenizeAndStringify("__declspec(property(get=GetX, put=PutX)) int x[];"));
|
||||
}
|
||||
|
||||
void removeattribute() {
|
||||
|
|
Loading…
Reference in New Issue