forked from OSchip/llvm-project
17f8c458de
Currently, there are many instances where `SourceLocation` objects are converted to raw representation to be stored in structs that are used as fields of tagged unions. This is done to make the corresponding structs trivial. Triviality allows avoiding undefined behavior when implicitly changing the active member of the union. However, in most cases, we can explicitly construct an active member using placement new. This patch adds the required active member selections and replaces `SourceLocation`-s represented as `unsigned int` with proper `SourceLocation`-s. One notable exception is `DeclarationNameLoc`: the objects of this class are often not properly initialized (so the code currently relies on its default constructor which uses memset). This class will be fixed in a separate patch. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D94237 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
ParseAST.cpp | ||
ParseCXXInlineMethods.cpp | ||
ParseDecl.cpp | ||
ParseDeclCXX.cpp | ||
ParseExpr.cpp | ||
ParseExprCXX.cpp | ||
ParseInit.cpp | ||
ParseObjc.cpp | ||
ParseOpenMP.cpp | ||
ParsePragma.cpp | ||
ParseStmt.cpp | ||
ParseStmtAsm.cpp | ||
ParseTemplate.cpp | ||
ParseTentative.cpp | ||
Parser.cpp |