mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

This adds to the ObjC language guesser a few more common macros used in ObjC headers. These can help distinguish ObjC headers which otherwise lack ObjC types from C++ headers. Contributed by danblakemore. Tested: New tests included. Ran unit tests with: ``` % cmake -S llvm -B build -G Ninja && \ ninja -C build FormatTests && \ ./build/tools/clang/unittests/Format/FormatTests --gtest_filter="*FormatTestObjC*" (snip) [----------] 24 tests from FormatTestObjC (265 ms total) [----------] Global test environment tear-down [==========] 26 tests from 2 test suites ran. (270 ms total) [ PASSED ] 26 tests. ``` Reviewed By: MyDeveloperDay Differential Revision: https://reviews.llvm.org/D151578
9 lines
159 B
C
9 lines
159 B
C
// RUN: clang-format -dump-config %s | FileCheck %s
|
|
|
|
// CHECK: Language: ObjC
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
FOUNDATION_EXTERN int kConstant;
|
|
|
|
NS_ASSUME_NONNULL_END
|