[PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

Matthias Gehre via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 23 15:19:36 PDT 2016


mgehre added inline comments.


================
Comment at: include/clang/Basic/AttrDocs.td:2509
+to suppress specific clang-tidy warnings. They can be attached to a scope,
+statement or type. The ``[[gsl::suppress]]`` is an alias of ``[[clang::suppress]]``
+which is intended to be used for suppressing rules of the C++ Core Guidelines_
----------------
aaron.ballman wrote:
> This statement does not match the test cases -- it does not appear to be possible to attach the attribute to a type.
It is true that you cannot attach the attribute to an existing type during declaration of a variable,
but the attribute can be attached when declaring a new type. (See line 22 of the test case, where the attribute is attached to the union type U)
I would propose to says "type declaration" instead of "type", ok?



https://reviews.llvm.org/D24886





More information about the cfe-commits mailing list