http://llvm.org/bugs/show_bug.cgi?id=15435

            Bug ID: 15435
           Summary: -Wshadow does not warn about catch handler exception
                    shadowing local variable
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

At least with any of Clang 3.1 (as packaged for Fedora 18), 3.2, or recent
trunk, running "clang++ -Wshadow -c test.cc" on

> #include <new>
> int * f() {
>     int * e;
>     try {
>         e = new int();
>     } catch (std::bad_alloc & e) {
>         throw e;
>     }
>     return e;
> }

does not warn about the "std::bad_alloc & e" exception declaration in the catch
handler shadowing the local variable declaration "int * e".

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to