KyleFromKitware updated this revision to Diff 491747. KyleFromKitware retitled this revision from "[pp-trace] Print HashLoc parameter" to "[pp-trace] Print HashLoc/Introducer parameter". KyleFromKitware added a comment.
Printed Introducer parameter in Pragma methods. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142030/new/ https://reviews.llvm.org/D142030 Files: clang-tools-extra/docs/pp-trace.rst clang-tools-extra/pp-trace/PPCallbacksTracker.cpp clang-tools-extra/test/pp-trace/pp-trace-conditional.cpp clang-tools-extra/test/pp-trace/pp-trace-ident.cpp clang-tools-extra/test/pp-trace/pp-trace-include.cpp clang-tools-extra/test/pp-trace/pp-trace-macro.cpp clang-tools-extra/test/pp-trace/pp-trace-pragma-general.cpp clang-tools-extra/test/pp-trace/pp-trace-pragma-ms.cpp clang-tools-extra/test/pp-trace/pp-trace-pragma-opencl.cpp
Index: clang-tools-extra/test/pp-trace/pp-trace-pragma-opencl.cpp =================================================================== --- clang-tools-extra/test/pp-trace/pp-trace-pragma-opencl.cpp +++ clang-tools-extra/test/pp-trace/pp-trace-pragma-opencl.cpp @@ -8,6 +8,7 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:3:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaOpenCLExtension +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:3:1", Kind: PIK_HashPragma} // CHECK-NEXT: NameLoc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:3:26" // CHECK-NEXT: Name: all // CHECK-NEXT: StateLoc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:3:32" @@ -15,6 +16,7 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:4:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaOpenCLExtension +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:4:1", Kind: PIK_HashPragma} // CHECK-NEXT: NameLoc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:4:26" // CHECK-NEXT: Name: cl_khr_int64_base_atomics // CHECK-NEXT: StateLoc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:4:54" @@ -22,6 +24,7 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:5:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaOpenCLExtension +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:5:1", Kind: PIK_HashPragma} // CHECK-NEXT: NameLoc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:5:26" // CHECK-NEXT: Name: cl_khr_int64_base_atomics // CHECK-NEXT: StateLoc: "{{.*}}{{[/\\]}}pp-trace-pragma-opencl.cpp:5:54" Index: clang-tools-extra/test/pp-trace/pp-trace-pragma-ms.cpp =================================================================== --- clang-tools-extra/test/pp-trace/pp-trace-pragma-ms.cpp +++ clang-tools-extra/test/pp-trace/pp-trace-pragma-ms.cpp @@ -20,36 +20,42 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:3:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaComment +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:3:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:3:9" // CHECK-NEXT: Kind: compiler // CHECK-NEXT: Str: compiler comment // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:4:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaComment +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:4:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:4:9" // CHECK-NEXT: Kind: exestr // CHECK-NEXT: Str: exestr comment // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:5:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaComment +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:5:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:5:9" // CHECK-NEXT: Kind: lib // CHECK-NEXT: Str: lib comment // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:6:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaComment +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:6:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:6:9" // CHECK-NEXT: Kind: linker // CHECK-NEXT: Str: linker comment // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:7:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaComment +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:7:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:7:9" // CHECK-NEXT: Kind: user // CHECK-NEXT: Str: user comment // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:9:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDetectMismatch +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:9:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:9:9" // CHECK-NEXT: Name: name argument // CHECK-NEXT: Value: value argument @@ -58,6 +64,7 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:13:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaMessage +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:13:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:13:9" // CHECK-NEXT: Namespace: // CHECK-NEXT: Kind: PMK_Message @@ -65,23 +72,28 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:15:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaWarningPush +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:15:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:15:9" // CHECK-NEXT: Level: 1 // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:16:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaWarningPop +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:16:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:16:9" // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:17:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaWarning +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:17:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:17:9" // CHECK-NEXT: WarningSpec: PWS_Disable // CHECK-NEXT: Ids: [1, 2, 3] // CHECK-NEXT: - Callback: PragmaWarning +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:17:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:17:9" // CHECK-NEXT: WarningSpec: PWS_Error // CHECK-NEXT: Ids: [4, 5, 6] // CHECK-NEXT: - Callback: PragmaWarning +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:17:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:17:9" // CHECK-NEXT: WarningSpec: PWS_Suppress // CHECK-NEXT: Ids: [7, 8, 9] Index: clang-tools-extra/test/pp-trace/pp-trace-pragma-general.cpp =================================================================== --- clang-tools-extra/test/pp-trace/pp-trace-pragma-general.cpp +++ clang-tools-extra/test/pp-trace/pp-trace-pragma-general.cpp @@ -23,16 +23,19 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:3:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnosticPush +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:3:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:3:15" // CHECK-NEXT: Namespace: clang // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:4:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnosticPop +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:4:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:4:15" // CHECK-NEXT: Namespace: clang // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:5:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnostic +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:5:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:5:15" // CHECK-NEXT: Namespace: clang // CHECK-NEXT: Mapping: MAP_IGNORE @@ -40,6 +43,7 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:6:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnostic +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:6:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:6:15" // CHECK-NEXT: Namespace: clang // CHECK-NEXT: Mapping: MAP_WARNING @@ -47,6 +51,7 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:7:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnostic +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:7:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:7:15" // CHECK-NEXT: Namespace: clang // CHECK-NEXT: Mapping: MAP_ERROR @@ -54,6 +59,7 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:8:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnostic +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:8:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:8:15" // CHECK-NEXT: Namespace: clang // CHECK-NEXT: Mapping: MAP_FATAL @@ -61,16 +67,19 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:10:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnosticPush +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:10:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:10:13" // CHECK-NEXT: Namespace: GCC // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:11:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnosticPop +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:11:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:11:13" // CHECK-NEXT: Namespace: GCC // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:12:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnostic +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:12:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:12:13" // CHECK-NEXT: Namespace: GCC // CHECK-NEXT: Mapping: MAP_IGNORE @@ -78,6 +87,7 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:13:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnostic +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:13:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:13:13" // CHECK-NEXT: Namespace: GCC // CHECK-NEXT: Mapping: MAP_WARNING @@ -85,6 +95,7 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:14:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnostic +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:14:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:14:13" // CHECK-NEXT: Namespace: GCC // CHECK-NEXT: Mapping: MAP_ERROR @@ -92,6 +103,7 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:15:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDiagnostic +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:15:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:15:13" // CHECK-NEXT: Namespace: GCC // CHECK-NEXT: Mapping: MAP_FATAL @@ -99,6 +111,7 @@ // CHECK-NEXT: - Callback: PragmaDirective // CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:18:1", Kind: PIK_HashPragma} // CHECK-NEXT: - Callback: PragmaDebug +// CHECK-NEXT: Introducer: {Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:18:1", Kind: PIK_HashPragma} // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-general.cpp:18:23" // CHECK-NEXT: DebugType: captured // CHECK-NEXT: - Callback: EndOfMainFile Index: clang-tools-extra/test/pp-trace/pp-trace-macro.cpp =================================================================== --- clang-tools-extra/test/pp-trace/pp-trace-macro.cpp +++ clang-tools-extra/test/pp-trace/pp-trace-macro.cpp @@ -32,6 +32,7 @@ // CHECK-NEXT: MacroDirective: MD_Define // CHECK: - Callback: MacroDefined // CHECK: - Callback: MacroDefined +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:3:1" // CHECK-NEXT: MacroNameTok: MACRO // CHECK-NEXT: MacroDirective: MD_Define // CHECK-NEXT: - Callback: MacroExpands @@ -44,13 +45,16 @@ // CHECK-NEXT: MacroDefinition: [(local)] // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-macro.cpp:5:5", "{{.*}}{{[/\\]}}pp-trace-macro.cpp:5:19"] // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:5:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:5:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-macro.cpp:5:5", "{{.*}}{{[/\\]}}pp-trace-macro.cpp:5:19"] // CHECK-NEXT: ConditionValue: CVK_True // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:6:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:6:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:5:2" // CHECK-NEXT: - Callback: MacroUndefined +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:7:1" // CHECK-NEXT: MacroNameTok: MACRO // CHECK-NEXT: MacroDefinition: [(local)] // CHECK-NEXT: - Callback: Defined @@ -58,15 +62,18 @@ // CHECK-NEXT: MacroDefinition: [] // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-macro.cpp:8:5", "{{.*}}{{[/\\]}}pp-trace-macro.cpp:8:19"] // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:8:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:8:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-macro.cpp:8:5", "{{.*}}{{[/\\]}}pp-trace-macro.cpp:8:19"] // CHECK-NEXT: ConditionValue: CVK_False // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:9:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:9:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:8:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-macro.cpp:8:1", "{{.*}}{{[/\\]}}pp-trace-macro.cpp:9:2"] // CHECK-NEXT: - Callback: MacroDefined +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:10:1" // CHECK-NEXT: MacroNameTok: FUNCMACRO // CHECK-NEXT: MacroDirective: MD_Define // CHECK-NEXT: - Callback: MacroExpands @@ -75,12 +82,15 @@ // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-macro.cpp:11:9", "{{.*}}{{[/\\]}}pp-trace-macro.cpp:11:20"] // CHECK-NEXT: Args: [1] // CHECK-NEXT: - Callback: MacroDefined +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:12:1" // CHECK-NEXT: MacroNameTok: X // CHECK-NEXT: MacroDirective: MD_Define // CHECK-NEXT: - Callback: MacroDefined +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:13:1" // CHECK-NEXT: MacroNameTok: X_IMPL // CHECK-NEXT: MacroDirective: MD_Define // CHECK-NEXT: - Callback: MacroDefined +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:14:1" // CHECK-NEXT: MacroNameTok: X_IMPL2 // CHECK-NEXT: MacroDirective: MD_Define // CHECK-NEXT: - Callback: MacroExpands Index: clang-tools-extra/test/pp-trace/pp-trace-include.cpp =================================================================== --- clang-tools-extra/test/pp-trace/pp-trace-include.cpp +++ clang-tools-extra/test/pp-trace/pp-trace-include.cpp @@ -81,6 +81,7 @@ // CHECK-NEXT: FileType: C_User // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level1A.h" // CHECK-NEXT: - Callback: MacroDefined +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}Inputs/Level2A.h:1:1" // CHECK-NEXT: MacroNameTok: MACRO_2A // CHECK-NEXT: MacroDirective: MD_Define // CHECK-NEXT: - Callback: FileChanged @@ -89,6 +90,7 @@ // CHECK-NEXT: FileType: C_User // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level2A.h" // CHECK-NEXT: - Callback: MacroDefined +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}Inputs/Level1A.h:2:1" // CHECK-NEXT: MacroNameTok: MACRO_1A // CHECK-NEXT: MacroDirective: MD_Define // CHECK-NEXT: - Callback: FileChanged @@ -127,6 +129,7 @@ // CHECK-NEXT: FileType: C_User // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level1B.h" // CHECK-NEXT: - Callback: MacroDefined +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}Inputs/Level2B.h:1:1" // CHECK-NEXT: MacroNameTok: MACRO_2B // CHECK-NEXT: MacroDirective: MD_Define // CHECK-NEXT: - Callback: FileChanged @@ -135,6 +138,7 @@ // CHECK-NEXT: FileType: C_User // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level2B.h" // CHECK-NEXT: - Callback: MacroDefined +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}Inputs/Level1B.h:2:1" // CHECK-NEXT: MacroNameTok: MACRO_1B // CHECK-NEXT: MacroDirective: MD_Define // CHECK-NEXT: - Callback: FileChanged Index: clang-tools-extra/test/pp-trace/pp-trace-ident.cpp =================================================================== --- clang-tools-extra/test/pp-trace/pp-trace-ident.cpp +++ clang-tools-extra/test/pp-trace/pp-trace-ident.cpp @@ -4,6 +4,7 @@ // CHECK: --- // CHECK-NEXT: - Callback: Ident +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-ident.cpp:3:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-ident.cpp:3:2" // CHECK-NEXT: Str: "$Id$" // CHECK-NEXT: - Callback: EndOfMainFile Index: clang-tools-extra/test/pp-trace/pp-trace-conditional.cpp =================================================================== --- clang-tools-extra/test/pp-trace/pp-trace-conditional.cpp +++ clang-tools-extra/test/pp-trace/pp-trace-conditional.cpp @@ -78,78 +78,96 @@ // CHECK: MacroNameTok: __STDC_UTF_32__ // CHECK-NEXT: MacroDirective: MD_Define // CHECK: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:3:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:3:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:3:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:3:5"] // CHECK-NEXT: ConditionValue: CVK_True // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:4:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:4:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:3:2" // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:6:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:6:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:6:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:6:5"] // CHECK-NEXT: ConditionValue: CVK_False // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:7:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:7:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:6:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:6:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:7:2"] // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:9:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:9:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:9:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:9:5"] // CHECK-NEXT: ConditionValue: CVK_True // CHECK-NEXT: - Callback: Else +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:10:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:10:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:9:2" // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:11:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:11:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:9:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:10:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:11:2"] // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:13:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:13:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:13:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:13:5"] // CHECK-NEXT: ConditionValue: CVK_False // CHECK-NEXT: - Callback: Else +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:14:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:14:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:13:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:13:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:14:2"] // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:15:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:15:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:13:2" // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:17:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:17:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:17:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:17:5"] // CHECK-NEXT: ConditionValue: CVK_True // CHECK-NEXT: - Callback: Elif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:18:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:18:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:18:7", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:18:8"] // CHECK-NEXT: ConditionValue: CVK_NotEvaluated // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:17:2" // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:19:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:19:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:17:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:18:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:19:2"] // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:20:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:20:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:20:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:20:5"] // CHECK-NEXT: ConditionValue: CVK_True // CHECK-NEXT: - Callback: Elif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:21:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:21:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:21:7", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:21:8"] // CHECK-NEXT: ConditionValue: CVK_NotEvaluated // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:20:2" // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:22:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:22:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:20:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:21:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:22:2"] // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:24:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:24:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:24:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:24:5"] // CHECK-NEXT: ConditionValue: CVK_False // CHECK-NEXT: - Callback: Elif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:25:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:25:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:25:7", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:25:7"] // CHECK-NEXT: ConditionValue: CVK_True @@ -157,55 +175,67 @@ // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:24:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:25:2"] // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:26:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:26:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:24:2" // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:27:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:27:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:27:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:27:5"] // CHECK-NEXT: ConditionValue: CVK_False // CHECK-NEXT: - Callback: Elif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:28:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:28:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:28:7", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:28:7"] // CHECK-NEXT: ConditionValue: CVK_False // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:27:2" // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:29:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:29:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:27:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:27:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:29:2"] // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:30:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:30:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:30:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:30:5"] // CHECK-NEXT: ConditionValue: CVK_True // CHECK-NEXT: - Callback: Elif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:31:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:31:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:31:7", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:31:8"] // CHECK-NEXT: ConditionValue: CVK_NotEvaluated // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:30:2" // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:32:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:32:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:30:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:31:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:32:2"] // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:33:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:33:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:33:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:33:5"] // CHECK-NEXT: ConditionValue: CVK_True // CHECK-NEXT: - Callback: Elif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:34:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:34:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:34:7", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:34:8"] // CHECK-NEXT: ConditionValue: CVK_NotEvaluated // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:33:2" // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:35:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:35:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:33:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:34:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:35:2"] // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:37:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:37:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:37:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:37:5"] // CHECK-NEXT: ConditionValue: CVK_False // CHECK-NEXT: - Callback: Elif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:38:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:38:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:38:7", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:38:7"] // CHECK-NEXT: ConditionValue: CVK_True @@ -213,91 +243,112 @@ // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:37:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:38:2"] // CHECK-NEXT: - Callback: Else +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:39:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:39:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:37:2" // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:40:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:40:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:37:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:39:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:40:2"] // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:41:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:41:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:41:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:41:5"] // CHECK-NEXT: ConditionValue: CVK_False // CHECK-NEXT: - Callback: Elif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:42:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:42:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:42:7", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:42:7"] // CHECK-NEXT: ConditionValue: CVK_False // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:41:2" // CHECK-NEXT: - Callback: Else +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:43:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:43:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:41:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:41:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:43:2"] // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:44:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:44:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:41:2" // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:45:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:45:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:45:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:45:5"] // CHECK-NEXT: ConditionValue: CVK_True // CHECK-NEXT: - Callback: Elif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:46:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:46:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:46:7", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:46:8"] // CHECK-NEXT: ConditionValue: CVK_NotEvaluated // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:45:2" // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:48:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:48:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:45:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:46:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:48:2"] // CHECK-NEXT: - Callback: If +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:49:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:49:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:49:5", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:49:5"] // CHECK-NEXT: ConditionValue: CVK_True // CHECK-NEXT: - Callback: Elif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:50:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:50:2" // CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:50:7", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:50:8"] // CHECK-NEXT: ConditionValue: CVK_NotEvaluated // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:49:2" // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:52:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:52:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:49:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:50:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:52:2"] // CHECK-NEXT: - Callback: MacroDefined +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:54:1" // CHECK-NEXT: MacroNameTok: MACRO // CHECK-NEXT: MacroDirective: MD_Define // CHECK-NEXT: - Callback: Ifdef +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:55:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:55:2" // CHECK-NEXT: MacroNameTok: MACRO // CHECK-NEXT: MacroDefinition: [(local)] // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:56:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:56:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:55:2" // CHECK-NEXT: - Callback: Ifdef +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:57:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:57:2" // CHECK-NEXT: MacroNameTok: NO_MACRO // CHECK-NEXT: MacroDefinition: [] // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:58:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:58:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:57:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:57:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:58:2"] // CHECK-NEXT: - Callback: Ifndef +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:59:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:59:2" // CHECK-NEXT: MacroNameTok: MACRO // CHECK-NEXT: MacroDefinition: [(local)] // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:60:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:60:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:59:2" // CHECK-NEXT: - Callback: SourceRangeSkipped // CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:59:1", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:60:2"] // CHECK-NEXT: - Callback: Ifndef +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:61:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:61:2" // CHECK-NEXT: MacroNameTok: NO_MACRO // CHECK-NEXT: MacroDefinition: [] // CHECK-NEXT: - Callback: Endif +// CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:62:1" // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:62:2" // CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:61:2" // CHECK-NEXT: - Callback: EndOfMainFile Index: clang-tools-extra/pp-trace/PPCallbacksTracker.cpp =================================================================== --- clang-tools-extra/pp-trace/PPCallbacksTracker.cpp +++ clang-tools-extra/pp-trace/PPCallbacksTracker.cpp @@ -167,6 +167,7 @@ void PPCallbacksTracker::Ident(SourceLocation HashLoc, SourceLocation Loc, llvm::StringRef Str) { beginCallback("Ident"); + appendArgument("HashLoc", HashLoc); appendArgument("Loc", Loc); appendArgument("Str", Str); } @@ -183,6 +184,7 @@ const IdentifierInfo *Kind, llvm::StringRef Str) { beginCallback("PragmaComment"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); appendArgument("Kind", Kind); appendArgument("Str", Str); @@ -195,6 +197,7 @@ llvm::StringRef Name, llvm::StringRef Value) { beginCallback("PragmaDetectMismatch"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); appendArgument("Name", Name); appendArgument("Value", Value); @@ -205,6 +208,7 @@ SourceLocation Loc, llvm::StringRef DebugType) { beginCallback("PragmaDebug"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); appendArgument("DebugType", DebugType); } @@ -216,6 +220,7 @@ PPCallbacks::PragmaMessageKind Kind, llvm::StringRef Str) { beginCallback("PragmaMessage"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); appendArgument("Namespace", Namespace); appendArgument("Kind", Kind, PragmaMessageKindStrings); @@ -228,6 +233,7 @@ SourceLocation Loc, llvm::StringRef Namespace) { beginCallback("PragmaDiagnosticPush"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); appendArgument("Namespace", Namespace); } @@ -238,6 +244,7 @@ SourceLocation Loc, llvm::StringRef Namespace) { beginCallback("PragmaDiagnosticPop"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); appendArgument("Namespace", Namespace); } @@ -249,6 +256,7 @@ diag::Severity Mapping, llvm::StringRef Str) { beginCallback("PragmaDiagnostic"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); appendArgument("Namespace", Namespace); appendArgument("Mapping", (unsigned)Mapping, MappingStrings); @@ -263,6 +271,7 @@ SourceLocation StateLoc, unsigned State) { beginCallback("PragmaOpenCLExtension"); + appendArgument("Introducer", Introducer); appendArgument("NameLoc", NameLoc); appendArgument("Name", Name); appendArgument("StateLoc", StateLoc); @@ -275,6 +284,7 @@ PragmaWarningSpecifier WarningSpec, llvm::ArrayRef<int> Ids) { beginCallback("PragmaWarning"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); appendArgument("WarningSpec", WarningSpec, PragmaWarningSpecifierStrings); @@ -294,6 +304,7 @@ void PPCallbacksTracker::PragmaWarningPush(PragmaIntroducer Introducer, SourceLocation Loc, int Level) { beginCallback("PragmaWarningPush"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); appendArgument("Level", Level); } @@ -302,6 +313,7 @@ void PPCallbacksTracker::PragmaWarningPop(PragmaIntroducer Introducer, SourceLocation Loc) { beginCallback("PragmaWarningPop"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); } @@ -311,6 +323,7 @@ SourceLocation Loc, StringRef Str) { beginCallback("PragmaExecCharsetPush"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); appendArgument("Charset", Str); } @@ -320,6 +333,7 @@ void PPCallbacksTracker::PragmaExecCharsetPop(PragmaIntroducer Introducer, SourceLocation Loc) { beginCallback("PragmaExecCharsetPop"); + appendArgument("Introducer", Introducer); appendArgument("Loc", Loc); } @@ -341,6 +355,7 @@ const Token &MacroNameTok, const MacroDirective *MacroDirective) { beginCallback("MacroDefined"); + appendArgument("HashLoc", HashLoc); appendArgument("MacroNameTok", MacroNameTok); appendArgument("MacroDirective", MacroDirective); } @@ -351,6 +366,7 @@ const MacroDefinition &MacroDefinition, const MacroDirective *Undef) { beginCallback("MacroUndefined"); + appendArgument("HashLoc", HashLoc); appendArgument("MacroNameTok", MacroNameTok); appendArgument("MacroDefinition", MacroDefinition); } @@ -377,6 +393,7 @@ SourceRange ConditionRange, ConditionValueKind ConditionValue) { beginCallback("If"); + appendArgument("HashLoc", HashLoc); appendArgument("Loc", Loc); appendArgument("ConditionRange", ConditionRange); appendArgument("ConditionValue", ConditionValue, ConditionValueKindStrings); @@ -388,6 +405,7 @@ ConditionValueKind ConditionValue, SourceLocation IfLoc) { beginCallback("Elif"); + appendArgument("HashLoc", HashLoc); appendArgument("Loc", Loc); appendArgument("ConditionRange", ConditionRange); appendArgument("ConditionValue", ConditionValue, ConditionValueKindStrings); @@ -399,6 +417,7 @@ const Token &MacroNameTok, const MacroDefinition &MacroDefinition) { beginCallback("Ifdef"); + appendArgument("HashLoc", HashLoc); appendArgument("Loc", Loc); appendArgument("MacroNameTok", MacroNameTok); appendArgument("MacroDefinition", MacroDefinition); @@ -409,6 +428,7 @@ const Token &MacroNameTok, const MacroDefinition &MacroDefinition) { beginCallback("Ifndef"); + appendArgument("HashLoc", HashLoc); appendArgument("Loc", Loc); appendArgument("MacroNameTok", MacroNameTok); appendArgument("MacroDefinition", MacroDefinition); @@ -418,6 +438,7 @@ void PPCallbacksTracker::Else(SourceLocation HashLoc, SourceLocation Loc, SourceLocation IfLoc) { beginCallback("Else"); + appendArgument("HashLoc", HashLoc); appendArgument("Loc", Loc); appendArgument("IfLoc", IfLoc); } @@ -426,6 +447,7 @@ void PPCallbacksTracker::Endif(SourceLocation HashLoc, SourceLocation Loc, SourceLocation IfLoc) { beginCallback("Endif"); + appendArgument("HashLoc", HashLoc); appendArgument("Loc", Loc); appendArgument("IfLoc", IfLoc); } Index: clang-tools-extra/docs/pp-trace.rst =================================================================== --- clang-tools-extra/docs/pp-trace.rst +++ clang-tools-extra/docs/pp-trace.rst @@ -279,12 +279,13 @@ Argument descriptions: -============== ================================================== ============================== ============================== +============== ================================================== ============================== ================================================== Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ============================== +============== ================================================== ============================== ================================================== +HashLoc "(file):(line):(col)" SourceLocation The location of the '#' that starts the directive. Loc "(file):(line):(col)" SourceLocation The location of the directive. str (name) const std::string The text of the directive. -============== ================================================== ============================== ============================== +============== ================================================== ============================== ================================================== Example::: @@ -318,13 +319,14 @@ Argument descriptions: -============== ================================================== ============================== ============================== -Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ============================== -Loc "(file):(line):(col)" SourceLocation The location of the directive. -Kind ((name)|(null)) const IdentifierInfo The comment kind symbol. -Str (message directive) const std::string The comment message directive. -============== ================================================== ============================== ============================== +============== ============================================================================= ============================== =============================================== +Argument Name Argument Value Syntax Clang C++ Type Description +============== ============================================================================= ============================== =============================================== +Introducer {Loc: "(file):(line):(col)", Kind: (PIK_HashPragma|PIK__Pragma|PIK___pragma)} PragmaIntroducer The location and kind of the pragma introducer. +Loc "(file):(line):(col)" SourceLocation The location of the directive. +Kind ((name)|(null)) const IdentifierInfo The comment kind symbol. +Str (message directive) const std::string The comment message directive. +============== ============================================================================= ============================== =============================================== Example::: @@ -340,13 +342,14 @@ Argument descriptions: -============== ================================================== ============================== ============================== -Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ============================== -Loc "(file):(line):(col)" SourceLocation The location of the directive. -Name "(name)" const std::string The name. -Value (string) const std::string The value. -============== ================================================== ============================== ============================== +============== ============================================================================= ============================== =============================================== +Argument Name Argument Value Syntax Clang C++ Type Description +============== ============================================================================= ============================== =============================================== +Introducer {Loc: "(file):(line):(col)", Kind: (PIK_HashPragma|PIK__Pragma|PIK___pragma)} PragmaIntroducer The location and kind of the pragma introducer. +Loc "(file):(line):(col)" SourceLocation The location of the directive. +Name "(name)" const std::string The name. +Value (string) const std::string The value. +============== ============================================================================= ============================== =============================================== Example::: @@ -362,12 +365,13 @@ Argument descriptions: -============== ================================================== ============================== ================================ -Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ================================ -Loc "(file):(line):(col)" SourceLocation The location of the directive. -DebugType (string) StringRef Indicates type of debug message. -============== ================================================== ============================== ================================ +============== ============================================================================= ============================== =============================================== +Argument Name Argument Value Syntax Clang C++ Type Description +============== ============================================================================= ============================== =============================================== +Introducer {Loc: "(file):(line):(col)", Kind: (PIK_HashPragma|PIK__Pragma|PIK___pragma)} PragmaIntroducer The location and kind of the pragma introducer. +Loc "(file):(line):(col)" SourceLocation The location of the directive. +DebugType (string) StringRef Indicates type of debug message. +============== ============================================================================= ============================== =============================================== Example::: @@ -382,14 +386,15 @@ Argument descriptions: -============== ================================================== ============================== ======================================= +============== ============================================================================= ============================== =============================================== Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ======================================= -Loc "(file):(line):(col)" SourceLocation The location of the directive. -Namespace (name) StringRef The namespace of the message directive. -Kind (PMK_Message|PMK_Warning|PMK_Error) PPCallbacks::PragmaMessageKind The type of the message directive. -Str (string) StringRef The text of the message directive. -============== ================================================== ============================== ======================================= +============== ============================================================================= ============================== =============================================== +Introducer {Loc: "(file):(line):(col)", Kind: (PIK_HashPragma|PIK__Pragma|PIK___pragma)} PragmaIntroducer The location and kind of the pragma introducer. +Loc "(file):(line):(col)" SourceLocation The location of the directive. +Namespace (name) StringRef The namespace of the message directive. +Kind (PMK_Message|PMK_Warning|PMK_Error) PPCallbacks::PragmaMessageKind The type of the message directive. +Str (string) StringRef The text of the message directive. +============== ============================================================================= ============================== =============================================== Example::: @@ -406,12 +411,13 @@ Argument descriptions: -============== ================================================== ============================== ============================== -Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ============================== -Loc "(file):(line):(col)" SourceLocation The location of the directive. -Namespace (name) StringRef Namespace name. -============== ================================================== ============================== ============================== +============== ============================================================================= ============================== =============================================== +Argument Name Argument Value Syntax Clang C++ Type Description +============== ============================================================================= ============================== =============================================== +Introducer {Loc: "(file):(line):(col)", Kind: (PIK_HashPragma|PIK__Pragma|PIK___pragma)} PragmaIntroducer The location and kind of the pragma introducer. +Loc "(file):(line):(col)" SourceLocation The location of the directive. +Namespace (name) StringRef Namespace name. +============== ============================================================================= ============================== =============================================== Example::: @@ -426,12 +432,13 @@ Argument descriptions: -============== ================================================== ============================== ============================== -Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ============================== -Loc "(file):(line):(col)" SourceLocation The location of the directive. -Namespace (name) StringRef Namespace name. -============== ================================================== ============================== ============================== +============== ============================================================================= ============================== =============================================== +Argument Name Argument Value Syntax Clang C++ Type Description +============== ============================================================================= ============================== =============================================== +Introducer {Loc: "(file):(line):(col)", Kind: (PIK_HashPragma|PIK__Pragma|PIK___pragma)} PragmaIntroducer The location and kind of the pragma introducer. +Loc "(file):(line):(col)" SourceLocation The location of the directive. +Namespace (name) StringRef Namespace name. +============== ============================================================================= ============================== =============================================== Example::: @@ -446,14 +453,15 @@ Argument descriptions: -============== ================================================== ============================== ============================== -Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ============================== -Loc "(file):(line):(col)" SourceLocation The location of the directive. -Namespace (name) StringRef Namespace name. -mapping (0|MAP_IGNORE|MAP_WARNING|MAP_ERROR|MAP_FATAL) diag::Severity Mapping type. -Str (string) StringRef Warning/error name. -============== ================================================== ============================== ============================== +============== ============================================================================= ============================== =============================================== +Argument Name Argument Value Syntax Clang C++ Type Description +============== ============================================================================= ============================== =============================================== +Introducer {Loc: "(file):(line):(col)", Kind: (PIK_HashPragma|PIK__Pragma|PIK___pragma)} PragmaIntroducer The location and kind of the pragma introducer. +Loc "(file):(line):(col)" SourceLocation The location of the directive. +Namespace (name) StringRef Namespace name. +mapping (0|MAP_IGNORE|MAP_WARNING|MAP_ERROR|MAP_FATAL) diag::Severity Mapping type. +Str (string) StringRef Warning/error name. +============== ============================================================================= ============================== =============================================== Example::: @@ -470,14 +478,15 @@ Argument descriptions: -============== ================================================== ============================== ========================== -Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ========================== -NameLoc "(file):(line):(col)" SourceLocation The location of the name. -Name (name) const IdentifierInfo Name symbol. -StateLoc "(file):(line):(col)" SourceLocation The location of the state. -State (1|0) unsigned Enabled/disabled state. -============== ================================================== ============================== ========================== +============== ============================================================================= ============================== =============================================== +Argument Name Argument Value Syntax Clang C++ Type Description +============== ============================================================================= ============================== =============================================== +Introducer {Loc: "(file):(line):(col)", Kind: (PIK_HashPragma|PIK__Pragma|PIK___pragma)} PragmaIntroducer The location and kind of the pragma introducer. +NameLoc "(file):(line):(col)" SourceLocation The location of the name. +Name (name) const IdentifierInfo Name symbol. +StateLoc "(file):(line):(col)" SourceLocation The location of the state. +State (1|0) unsigned Enabled/disabled state. +============== ============================================================================= ============================== =============================================== Example::: @@ -494,13 +503,14 @@ Argument descriptions: -============== ================================================== ============================== ============================== -Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ============================== -Loc "(file):(line):(col)" SourceLocation The location of the directive. -WarningSpec (string) StringRef The warning specifier. -Ids [(number)[, ...]] ArrayRef<int> The warning numbers. -============== ================================================== ============================== ============================== +============== ============================================================================= ============================== =============================================== +Argument Name Argument Value Syntax Clang C++ Type Description +============== ============================================================================= ============================== =============================================== +Introducer {Loc: "(file):(line):(col)", Kind: (PIK_HashPragma|PIK__Pragma|PIK___pragma)} PragmaIntroducer The location and kind of the pragma introducer. +Loc "(file):(line):(col)" SourceLocation The location of the directive. +WarningSpec (string) StringRef The warning specifier. +Ids [(number)[, ...]] ArrayRef<int> The warning numbers. +============== ============================================================================= ============================== =============================================== Example::: @@ -516,12 +526,13 @@ Argument descriptions: -============== ================================================== ============================== ============================== -Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ============================== -Loc "(file):(line):(col)" SourceLocation The location of the directive. -Level (number) int Warning level. -============== ================================================== ============================== ============================== +============== ============================================================================= ============================== =============================================== +Argument Name Argument Value Syntax Clang C++ Type Description +============== ============================================================================= ============================== =============================================== +Introducer {Loc: "(file):(line):(col)", Kind: (PIK_HashPragma|PIK__Pragma|PIK___pragma)} PragmaIntroducer The location and kind of the pragma introducer. +Loc "(file):(line):(col)" SourceLocation The location of the directive. +Level (number) int Warning level. +============== ============================================================================= ============================== =============================================== Example::: @@ -536,11 +547,12 @@ Argument descriptions: -============== ================================================== ============================== ============================== -Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ============================== -Loc "(file):(line):(col)" SourceLocation The location of the directive. -============== ================================================== ============================== ============================== +============== ============================================================================= ============================== =============================================== +Argument Name Argument Value Syntax Clang C++ Type Description +============== ============================================================================= ============================== =============================================== +Introducer {Loc: "(file):(line):(col)", Kind: (PIK_HashPragma|PIK__Pragma|PIK___pragma)} PragmaIntroducer The location and kind of the pragma introducer. +Loc "(file):(line):(col)" SourceLocation The location of the directive. +============== ============================================================================= ============================== =============================================== Example::: @@ -581,6 +593,7 @@ ============== ================================================== ============================== ============================================================== Argument Name Argument Value Syntax Clang C++ Type Description ============== ================================================== ============================== ============================================================== +HashLoc "(file):(line):(col)" SourceLocation The location of the '#' that starts the directive. MacroNameTok (token) const Token The macro name token. MacroDirective (MD_Define|MD_Undefine|MD_Visibility) const MacroDirective The kind of macro directive from the MacroDirective structure. ============== ================================================== ============================== ============================================================== @@ -601,6 +614,7 @@ ============== ================================================== ============================== ============================================================== Argument Name Argument Value Syntax Clang C++ Type Description ============== ================================================== ============================== ============================================================== +HashLoc "(file):(line):(col)" SourceLocation The location of the '#' that starts the directive. MacroNameTok (token) const Token The macro name token. MacroDirective (MD_Define|MD_Undefine|MD_Visibility) const MacroDirective The kind of macro directive from the MacroDirective structure. ============== ================================================== ============================== ============================================================== @@ -658,13 +672,14 @@ Argument descriptions: -============== ================================================== ============================== =================================== +============== ================================================== ============================== ================================================== Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== =================================== +============== ================================================== ============================== ================================================== +HashLoc "(file):(line):(col)" SourceLocation The location of the '#' that starts the directive. Loc "(file):(line):(col)" SourceLocation The location of the directive. ConditionRange ["(file):(line):(col)", "(file):(line):(col)"] SourceRange The source range for the condition. ConditionValue (true|false) bool The condition value. -============== ================================================== ============================== =================================== +============== ================================================== ============================== ================================================== Example::: @@ -680,14 +695,15 @@ Argument descriptions: -============== ================================================== ============================== =================================== +============== ================================================== ============================== ================================================== Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== =================================== +============== ================================================== ============================== ================================================== +HashLoc "(file):(line):(col)" SourceLocation The location of the '#' that starts the directive. Loc "(file):(line):(col)" SourceLocation The location of the directive. ConditionRange ["(file):(line):(col)", "(file):(line):(col)"] SourceRange The source range for the condition. ConditionValue (true|false) bool The condition value. IfLoc "(file):(line):(col)" SourceLocation The location of the directive. -============== ================================================== ============================== =================================== +============== ================================================== ============================== ================================================== Example::: @@ -707,6 +723,7 @@ ============== ================================================== ============================== ============================================================== Argument Name Argument Value Syntax Clang C++ Type Description ============== ================================================== ============================== ============================================================== +HashLoc "(file):(line):(col)" SourceLocation The location of the '#' that starts the directive. Loc "(file):(line):(col)" SourceLocation The location of the directive. MacroNameTok (token) const Token The macro name token. MacroDirective (MD_Define|MD_Undefine|MD_Visibility) const MacroDirective The kind of macro directive from the MacroDirective structure. @@ -729,6 +746,7 @@ ============== ================================================== ============================== ============================================================== Argument Name Argument Value Syntax Clang C++ Type Description ============== ================================================== ============================== ============================================================== +HashLoc "(file):(line):(col)" SourceLocation The location of the '#' that starts the directive. Loc "(file):(line):(col)" SourceLocation The location of the directive. MacroNameTok (token) const Token The macro name token. MacroDirective (MD_Define|MD_Undefine|MD_Visibility) const MacroDirective The kind of macro directive from the MacroDirective structure. @@ -748,12 +766,13 @@ Argument descriptions: -============== ================================================== ============================== =================================== +============== ================================================== ============================== ================================================== Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== =================================== +============== ================================================== ============================== ================================================== +HashLoc "(file):(line):(col)" SourceLocation The location of the '#' that starts the directive. Loc "(file):(line):(col)" SourceLocation The location of the else directive. IfLoc "(file):(line):(col)" SourceLocation The location of the if directive. -============== ================================================== ============================== =================================== +============== ================================================== ============================== ================================================== Example::: @@ -768,12 +787,13 @@ Argument descriptions: -============== ================================================== ============================== ==================================== +============== ================================================== ============================== ================================================== Argument Name Argument Value Syntax Clang C++ Type Description -============== ================================================== ============================== ==================================== +============== ================================================== ============================== ================================================== +HashLoc "(file):(line):(col)" SourceLocation The location of the '#' that starts the directive. Loc "(file):(line):(col)" SourceLocation The location of the endif directive. IfLoc "(file):(line):(col)" SourceLocation The location of the if directive. -============== ================================================== ============================== ==================================== +============== ================================================== ============================== ================================================== Example:::
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits