Fixes this bug: https://llvm.org/bugs/show_bug.cgi?id=22647
The following dictionary was getting formatted oddly:
NSDictionary *query = @{
    (__bridge id)kSecClass: (__bridge id)kSecClassGenericPassword,
    (__bridge id)kSecReturnData: (__bridge id)kCFBooleanTrue,
};It was turning into this:
NSDictionary *passwordQuery = @{
  (__bridge id) kSecClass : (__bridge id)kSecClassGenericPassword, (__bridge id)
  kSecReturnData : (__bridge id)kCFBooleanTrue, (__bridge id)
  kSecReturnAttributes : (__bridge id)kCFBooleanTrue,
};As far as I can tell, changes to format Proto lines correctly was turning the key (e.g. kSecClass) into a TT_SelectorName, which was then force the cast to get separated from the key. I added an extra check to see if the current context is in a dictionary literal, and if so kept the type as TT_Unknown.
Why the language check? If it is needed, can you add a test?