[LLVMbugs] [Bug 14441] New: Warn about unnecessarily nontrivial types

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Nov 26 16:41:22 PST 2012


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

             Bug #: 14441
           Summary: Warn about unnecessarily nontrivial types
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: googler
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dblaikie at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


See changes such as r168211 removing unnecessary explicit default ctors that
cause types to lose implicit move semantics. 

We could try to warn on types that do this in a number of ways:

1) warn whenever a type trait is tested that would have a different result if
some explicitly defined members (that are equivalent to their implicit
definitions) were implicitly defined

2) warn whenever a type has its move members implicitly removed due to an
unnecessary explicit member definition

(note that (1) only works if those explicit definitions are inline so we can
see that they are just like the implicit definition - and might need to be
adjusted to reduce spam from every single trait test. (2) could be implemented
even for non-inline definitions but might fire for types that are never used in
a context where they would be moved)

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list