DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (9596d7f4a745)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
---
cpp-virtual-final:
    description: "Virtual function declarations should specify only one of
                  `virtual`, `final`, or `override`"
    level: error
    include: ['.']
    extensions: ['cc', 'cpp', 'h', 'mm']
    type: regex
    #
    # This lint warns about:
    #
    #   virtual void Bad1() final
    #   void Bad2() final override
    #   void Bad3() override final
    #
    # Caveats: This lint ...
    #
    #   * Doesn't warn about `virtual void NotBad() override` at this time
    #     because there are currently 6963 instances of this pattern.
    #
    #   * Doesn't warn about function declarations that span multiple lines
    #     because the regex can't match across line breaks.
    #
    #           virtual    )    final  |  final  override  |  override  final
    payload: ^ *virtual .+\).+\bfinal\b|\bfinal +override\b|\boverride +final\b