This revision puts the Style.Lanauge==LK_???? behind convenience functions to begin to avoid potential issues regarding the use of Style.isCpp()
It's unclear in a number of places what people really mean when using isCpp() as such I have introduced a isCppOnly() to help identify those places where people where not checking both languages
Ideally I'd make isCpp() mean only C/C++ and use isCpp() || isObjectiveC() but so many of those places overlap I can see why we'd have one function, but perhaps a better name for isCpp() is isCStyleLanguages() then let isCppOnly() be renamed to isCpp() but I'm not comfortable doing that in one go.
Regardless I feel introducing isObjectiveC(),isJava(),JavaScript(),isProtoBuf(),isTextProtoBuf and isTableGen() helps the code read a little better
Just my 2c - I find the current meaning of isCpp easier to understand, and would prefer isObjectiveC to mean objective-C/C++. h if it exists.
Reasons:
Clang uses the term "C family languages", and this includes C, C++, ObjC, ObjC++.
If you really want to avoid the conflict between C++ the boolean language option and C++ the precise language mode, I'd suggest isPlusPlus() and isObjective(). But I think consistency with LangOptions is worth more.