Slightly easier to read, uses slightly less stack space, and makes it
impossible to mix up the order of all those bools.
No behavior change.
| Paths 
 |  Differential  D61788  
Make getObjCEncodingForTypeImpl() take a bitmask instead of 8 bools ClosedPublic Authored by thakis on May 10 2019, 8:16 AM. 
Details 
 Summary Slightly easier to read, uses slightly less stack space, and makes it No behavior change. 
Diff Detail Event Timeline
 
 thakis marked 4 inline comments as done.Comment Actions comments 
 Closed by commit rL360668: Make getObjCEncodingForTypeImpl() take a bitmask instead of 8 bools (authored by nico).  ·  Explain Why This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
Diff 199056 clang/include/clang/AST/ASTContext.h
 clang/lib/AST/ASTContext.cpp
 
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I like the idea of doing this, but can you add some boilerplate? :) I think it'd be better if this were a struct with some nice accessors, factories, transformations, and so on.
This example isn't from Clang, but something like this (without the templating, of course): https://github.com/apple/swift/blob/14a20eea03e9115e2c5cf91bccc86e6cd5334df9/include/swift/ABI/MetadataValues.h#L118