Merging r277796, r277797, r277866, r277889 and r277900:
------------------------------------------------------------------------ r277796 | rtrieu | 2016-08-04 19:39:30 -0700 (Thu, 04 Aug 2016) | 6 lines Allow -1 to assign max value to unsigned bitfields. Silence the -Wbitfield-constant-conversion warning for when -1 or other negative values are assigned to unsigned bitfields, provided that the bitfield is wider than the minimum number of bits needed to encode the negative value. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r277797 | rtrieu | 2016-08-04 20:16:36 -0700 (Thu, 04 Aug 2016) | 7 lines Fix crash in template type diffing. When the type being diffed is a type alias, and the orginal type is not a templated type, then there will be no unsugared TemplateSpecializationType. When this happens, exit early from the constructor. Also add assertions to the other iterator accessor to prevent the iterator from being used. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r277866 | rtrieu | 2016-08-05 14:02:34 -0700 (Fri, 05 Aug 2016) | 12 lines Fix false positive in -Wunsequenced and templates. For builtin logical operators, there is a well-defined ordering of argument evaluation. For overloaded operator of the same type, there is no argument evaluation order, similar to other function calls. When both are present, uninstantiated templates with an operator&& is treated as an unresolved function call. Unresolved function calls are treated as normal function calls, and may result in false positives when the builtin logical operator is used. Have the unsequenced checker ignore dependent expressions to avoid this false positive. The check also happens in template instantiations to catch when the overloaded operator is used. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r277889 | rtrieu | 2016-08-05 16:24:47 -0700 (Fri, 05 Aug 2016) | 9 lines Fix two false positives in -Wreturn-stack-address If the return type is a pointer and the function returns the reference to a pointer, don't warn since only the value is returned, not the reference. If a reference function parameter appears in the reference chain, don't warn since binding happens at the caller scope, so addresses returned are not to local stack. This includes default arguments as well. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r277900 | rtrieu | 2016-08-05 18:44:06 -0700 (Fri, 05 Aug 2016) | 2 lines Fix typos from r277797 and unused variable from r277889. ------------------------------------------------------------------------ llvm-svn: 278020
parent
4192c1db
Please register or sign in to comment