[PATCH] D71827: [clang] avoid strict aliasing violation in assert

2020-01-09 Thread Ryan Libby via Phabricator via cfe-commits
rlibby added a comment. I am no expert here so I will defer, but I believe those suggestions are weaker assertions. I believe it's really trying to assert that the NamedDecl type is the first template type in the point union, and is represented by a 0 bit in the addr, and that the pointer was

[PATCH] D71827: [clang] avoid strict aliasing violation in assert

2020-01-09 Thread Dimitry Andric via Phabricator via cfe-commits
dim added inline comments. Comment at: clang/include/clang/AST/DeclContextInternals.h:102 // at getLookupResult. -assert(*(NamedDecl **)&Data == ND && +assert(Data.getAddrOfPtr1() && *Data.getAddrOfPtr1() == ND && "PointerUnion mangles the NamedDecl point

[PATCH] D71827: [clang] avoid strict aliasing violation in assert

2019-12-22 Thread Ryan Libby via Phabricator via cfe-commits
rlibby created this revision. rlibby added reviewers: akyrtzi, rsmith. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. StoredDeclsList::setOnlyValue wants to assert that the binary value actually stored in the member PointerUnion Data is the same as the raw NamedD