diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp index 4f56df0b4ff7..a6f6ca4c1abd 100644 --- a/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp +++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp @@ -47,6 +47,8 @@ public: return; StringRef MacroName = MacroNameTok.getIdentifierInfo()->getName(); + if (MacroName == "__GCC_HAVE_DWARF2_CFI_ASM") + return; if (!CheckCapsOnly && !RegExp.match(MacroName)) Check->warnMacro(MD, MacroName); diff --git a/clang-tools-extra/test/pp-trace/pp-trace-include.cpp b/clang-tools-extra/test/pp-trace/pp-trace-include.cpp index ba6ad112dfa4..d5578cf16f59 100644 --- a/clang-tools-extra/test/pp-trace/pp-trace-include.cpp +++ b/clang-tools-extra/test/pp-trace/pp-trace-include.cpp @@ -39,7 +39,8 @@ // CHECK-NEXT: Reason: EnterFile // CHECK-NEXT: FileType: C_User // CHECK-NEXT: PrevFID: (invalid) -// CHECK-NEXT: - Callback: FileChanged +// CHECK: - Callback: MacroDefined +// CHECK: - Callback: FileChanged // CHECK-NEXT: Loc: ":1:1" // CHECK-NEXT: Reason: ExitFile // CHECK-NEXT: FileType: C_User diff --git a/clang-tools-extra/test/pp-trace/pp-trace-macro.cpp b/clang-tools-extra/test/pp-trace/pp-trace-macro.cpp index 47f9e1c4ff6a..1d85607e86b7 100644 --- a/clang-tools-extra/test/pp-trace/pp-trace-macro.cpp +++ b/clang-tools-extra/test/pp-trace/pp-trace-macro.cpp @@ -31,6 +31,7 @@ X // CHECK: MacroNameTok: __STDC_UTF_32__ // CHECK-NEXT: MacroDirective: MD_Define // CHECK: - Callback: MacroDefined +// CHECK: - Callback: MacroDefined // CHECK-NEXT: MacroNameTok: MACRO // CHECK-NEXT: MacroDirective: MD_Define // CHECK-NEXT: - Callback: MacroExpands