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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

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
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to