Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

bugprone-macro-parentheses + r-value references #36495

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR37522
Status NEW
Importance P normal
Reported by Tatyana Krasnukha (Tatyana.Krasnukha@synopsys.com)
Reported on 2018-05-18 10:05:24 -0700
Last modified on 2018-05-22 09:31:01 -0700
Version unspecified
Hardware PC Linux
CC alexfh@google.com, daniel.marjamaki@evidente.se, djasper@google.com, eugene.zelenko@gmail.com, klimek@google.com, Tatyana.Krasnukha@synopsys.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
#define DisallowMoveCtor(TypeName)             \
  TypeName(TypeName &&) = delete

causes the error

macro argument should be enclosed in parentheses [bugprone-macro-parentheses,-
warnings-as-errors]
  void operator=(TypeName &&) = delete
                 ^~~~~~~~
                 ()
Quuxplusone commented 6 years ago
I mistakenly put here error message for macro with operator=. For
DisallowMoveCtor it is same:

macro argument should be enclosed in parentheses [bugprone-macro-parentheses,-
warnings-as-errors]
  TypeName(TypeName &&) = delete
           ^~~~~~~~
           ()