mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
As noted in https://reviews.llvm.org/D86137#2460135 parsing of the clang-format parameter -Wno-error=unknown fails. This currently is done by having `-Wno-error=unknown` as an option. In this patch this is changed to make `-Wno-error=` parse an enum into a bit set. This way the parsing is fixed and also we can possibly add new options easily. Reviewed By: MyDeveloperDay Differential Revision: https://reviews.llvm.org/D93459
12 lines
466 B
C++
12 lines
466 B
C++
// RUN: clang-format %s --Wno-error=unknown --style="{UnknownKey: true}" 2>&1 | FileCheck %s -check-prefix=CHECK
|
|
// RUN: not clang-format %s --style="{UnknownKey: true}" 2>&1 | FileCheck %s -check-prefix=CHECK-FAIL
|
|
|
|
// CHECK: YAML:1:2: warning: unknown key 'UnknownKey'
|
|
// CHECK-NEXT: {UnknownKey: true}
|
|
// CHECK-NEXT: ^~~~~~~~~~
|
|
// CHECK-FAIL: YAML:1:2: error: unknown key 'UnknownKey'
|
|
// CHECK-FAIL-NEXT: {UnknownKey: true}
|
|
// CHECK-FAIL-NEXT: ^~~~~~~~~~
|
|
|
|
int i ;
|