[clang-tidy] misc-macro-parentheses: fix fp when using object member pointers

Fixes http://llvm.org/PR25208.

llvm-svn: 252608
This commit is contained in:
Daniel Marjamaki 2015-11-10 14:32:25 +00:00
parent 262538435f
commit 1e9ef81187
2 changed files with 4 additions and 1 deletions

View File

@ -148,7 +148,8 @@ void MacroParenthesesPPCallbacks::argument(const Token &MacroNameTok,
continue;
// Argument is a struct member.
if (Prev.isOneOf(tok::period, tok::arrow, tok::coloncolon))
if (Prev.isOneOf(tok::period, tok::arrow, tok::coloncolon, tok::arrowstar,
tok::periodstar))
continue;
// Argument is a namespace or class.

View File

@ -34,6 +34,8 @@
#define GOOD23(type) (type::Field)
#define GOOD24(t) std::set<t> s
#define GOOD25(t) std::set<t,t,t> s
#define GOOD26(x) (a->*x)
#define GOOD27(x) (a.*x)
// These are allowed for now..
#define MAYBE1 *12.34