[clang-tools-extra] 46bf25a - [test] Update tests
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 9 22:32:35 PST 2021
Author: Fangrui Song
Date: 2021-03-09T22:32:28-08:00
New Revision: 46bf25a7c5d3d648093edf6aab99004c053abcd4
URL: https://github.com/llvm/llvm-project/commit/46bf25a7c5d3d648093edf6aab99004c053abcd4
DIFF: https://github.com/llvm/llvm-project/commit/46bf25a7c5d3d648093edf6aab99004c053abcd4.diff
LOG: [test] Update tests
Added:
Modified:
clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp
clang-tools-extra/test/pp-trace/pp-trace-include.cpp
clang-tools-extra/test/pp-trace/pp-trace-macro.cpp
Removed:
################################################################################
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 @@ class MacroUsageCallbacks : public PPCallbacks {
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: "<built-in>: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
More information about the cfe-commits
mailing list