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

            Bug ID: 44591
           Summary: ParmVarDecl source range incorrect for unnamed east
                    const (incl *const)
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: l...@alex.lanin.de
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
                    neeil...@live.com, richard-l...@metafoo.co.uk

The parmVarDecl matcher doesnt behave as expected. At least not what I
expected.


Code:

void ok1(const int);
         ^~~~~~~~~       << as expected

void ok2(int const foo);
         ^~~~~~~~~~~~~   << as expected

void bugged1(int const);
             ^~~~~~~~~   << expected
             ^~~         << actually

void ok2(const int* const foo);
         ^~~~~~~~~~~~~~~~~~~~   << as expected

void bugged2(const int* const);
             ^~~~~~~~~~~~~~~~   << expected
             ^~~~~~~~~~         << actually


Easily reproducible with clang-query:
set print-matcher true
m parmVarDecl()

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to