HomePhabricator

clang-format: Add support for SEH __try / __except / __finally blocks.

Description

clang-format: Add support for SEH try / except / __finally blocks.

This lets clang-format format

__try {
} __except(0) {
}

and

__try {
} __finally {
}

correctly. try and finally are keywords if LangOpts.MicrosoftExt is set,
so this turns this on. This also enables a few other keywords, but it
shouldn't overly perturb regular clang-format operation. __except is a
context-sensitive keyword, so AdditionalKeywords needs to be passed around to
a few more places.

Fixes PR22321.

Details

Committed
nicoFeb 4 2015, 7:26 AM
Parents
rL228147: [mips] Make MipsSubtarget::hasMips*() functions consistent. NFC.
Branches
Unknown
Tags
Unknown