Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Only add enum literals to enum types
typedef enum E { Ea, Eb } E;
: With Visual Studio 2017, the PDB description for the typedef may precede that of the enum. Thus_typeMap["E"]
will refer to a TypedefUDT object which is not safe to cast to an EnumUDT.Minor cleanup
Be careful capturing the size of a typedef: The call to setType() isn't guaranteed to set _aliasedType immediately so it's not safe to dereference it. Typedef types are omitted from the generated blob and superset files so we don't really need to capture the size of typedef types.
Explicitly construct base types and initialize all fields. The compiler ought to do the same implicitly, but there's no cost to being explicit.
Use Modifiers::addArrayDimension. This is preferable to accessing the field _arrayLengths directly.
Explicitly mark virtual destructors. If a class has a virtual destructor, then destructors of derived classes should be implicitly virtual as well. Being explicit makes the code easier to understand.
Add Type::getTypeNameKey(). Refactor the static function from Symbol_IR.cpp; it's still only used by Symbol_IR at this time. Type::getFullName() was made a 'const' method so getTypeNameKey() can be const.