forked from OSchip/llvm-project
[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:
parent
262538435f
commit
1e9ef81187
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue