Thoroughly check for a pointer dereference which yields a glvalue. Look
through casts, comma operators, conditional operators, paren
expressions, etc.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/CGExprCXX.cpp | ||
---|---|---|
1618 ↗ | (On Diff #11143) | This doesn't handle ((T*)nullptr)[0] Its semantics are defined in terms of a desugaring to *((T*)nullptr + 0) ... so I suppose we should probably handle it here, but it's not entirely clear. |
1619 ↗ | (On Diff #11143) | I think this will insert a null check for T *p; typeid( (const T&)(T)*p ) ... which doesn't seem strictly necessary (though superfluous null checks here seem pretty harmless). |
lib/CodeGen/CGExprCXX.cpp | ||
---|---|---|
1622 ↗ | (On Diff #11471) | Maybe add a test for the xvalue case; something like typeid((T&&)*(T*)nullptr) ? |
1636 ↗ | (On Diff #11471) | How could this not be the case? Also, you have no test coverage for binary conditionals. |
1660 ↗ | (On Diff #11471) | Maybe extend this to say that it's not clear what this means, but we use the most generous interpretation. |