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

            Bug ID: 26396
           Summary: [3.8 regression] -Wreturn-stack-address false
                    positives
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: l...@bobbyperu.info
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

Since very recently we're getting false-positive -Wreturn-stack-address
warnings:

template <class T>
class QMap
{
public:
    T value(const T &t = T()) const
    {
        return t;
    }
};

struct A {};

void test()
{
    QMap<A*> map;
    map.value();
}

$ clang++ testcase.cpp  -c
testcase.cpp:7:16: warning: returning address of local temporary object
[-Wreturn-stack-address]

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

Reply via email to