[llvm-bugs] [Bug 26614] New: recordDecl() matches same declaration twice

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Feb 14 10:19:35 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26614

            Bug ID: 26614
           Summary: recordDecl() matches same declaration twice
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: legalize at xmission.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Compare Match 3 and 4

bin/clang-query
../llvm/tools/clang/tools/extra/test/clang-tidy/readability-redundant-fwd-decl.cpp
-- -std=c++11
clang-query> match recordDecl()

Match #1:

/home/richard/dev/build/../llvm/tools/clang/tools/extra/test/clang-tidy/readability-redundant-fwd-decl.cpp:3:1:
note: "root" binds here
class Foo;
^~~~~~~~~

Match #2:

/home/richard/dev/build/../llvm/tools/clang/tools/extra/test/clang-tidy/readability-redundant-fwd-decl.cpp:4:1:
note: "root" binds here
class Foo;
^~~~~~~~~

Match #3:

/home/richard/dev/build/../llvm/tools/clang/tools/extra/test/clang-tidy/readability-redundant-fwd-decl.cpp:7:1:
note: "root" binds here
class Bar {
^~~~~~~~~~~

Match #4:

/home/richard/dev/build/../llvm/tools/clang/tools/extra/test/clang-tidy/readability-redundant-fwd-decl.cpp:7:1:
note: "root" binds here
class Bar {
^~~~~~~~~

Match #5:

/home/richard/dev/build/../llvm/tools/clang/tools/extra/test/clang-tidy/readability-redundant-fwd-decl.cpp:10:1:
note: "root" binds here
class Bar;
^~~~~~~~~
5 matches.
clang-query> ^D
~/dev/build
clanger> cat
../llvm/tools/clang/tools/extra/test/clang-tidy/readability-redundant-fwd-decl.cpp 
// RUN: %check_clang_tidy %s readability-redundant-fwd-decl %t

class Foo;
class Foo;
// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: redundant forward declaration
[readability-redundant-fwd-decl]

class Bar {
};

class Bar;
// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: redundant forward declaration

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160214/84f6ab16/attachment.html>


More information about the llvm-bugs mailing list