[clang-tools-extra] r196648 - Changed ConditionValue argument to PPCallbacks If and Elif callbacks to be a 3-state enum.
John Thompson
John.Thompson.JTSoftware at gmail.com
Sat Dec 7 00:41:16 PST 2013
Author: jtsoftware
Date: Sat Dec 7 02:41:15 2013
New Revision: 196648
URL: http://llvm.org/viewvc/llvm-project?rev=196648&view=rev
Log:
Changed ConditionValue argument to PPCallbacks If and Elif callbacks to be a 3-state enum.
Modified:
clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp
clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.h
clang-tools-extra/trunk/test/pp-trace/pp-trace-conditional.cpp
clang-tools-extra/trunk/test/pp-trace/pp-trace-macro.cpp
Modified: clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp?rev=196648&r1=196647&r2=196648&view=diff
==============================================================================
--- clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp (original)
+++ clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp Sat Dec 7 02:41:15 2013
@@ -529,6 +529,12 @@ std::string getExpandedString(clang::Pre
return Expanded;
}
+// ConditionValueKind strings.
+const char *
+ConditionValueKindStrings[] = {
+ "(not evaluated)", "false", "true"
+};
+
// We need some operator overloads for string handles.
bool operator==(const StringHandle &H1, const StringHandle &H2) {
const char *S1 = (H1 ? *H1 : "");
@@ -728,7 +734,7 @@ public:
// for use in telling the user the nested include path to the header.
class ConditionalExpansionInstance {
public:
- ConditionalExpansionInstance(bool ConditionValue, InclusionPathHandle H)
+ ConditionalExpansionInstance(clang::PPCallbacks::ConditionValueKind ConditionValue, InclusionPathHandle H)
: ConditionValue(ConditionValue) {
InclusionPathHandles.push_back(H);
}
@@ -753,7 +759,7 @@ public:
}
// A flag representing the evaluated condition value.
- bool ConditionValue;
+ clang::PPCallbacks::ConditionValueKind ConditionValue;
// The header inclusion path handles for all the instances.
std::vector<InclusionPathHandle> InclusionPathHandles;
};
@@ -768,7 +774,8 @@ public:
class ConditionalTracker {
public:
ConditionalTracker(clang::tok::PPKeywordKind DirectiveKind,
- bool ConditionValue, StringHandle ConditionUnexpanded,
+ clang::PPCallbacks::ConditionValueKind ConditionValue,
+ StringHandle ConditionUnexpanded,
InclusionPathHandle InclusionPathHandle)
: DirectiveKind(DirectiveKind), ConditionUnexpanded(ConditionUnexpanded) {
addConditionalExpansionInstance(ConditionValue, InclusionPathHandle);
@@ -777,7 +784,7 @@ public:
// Find a matching condition expansion instance.
ConditionalExpansionInstance *
- findConditionalExpansionInstance(bool ConditionValue) {
+ findConditionalExpansionInstance(clang::PPCallbacks::ConditionValueKind ConditionValue) {
for (std::vector<ConditionalExpansionInstance>::iterator
I = ConditionalExpansionInstances.begin(),
E = ConditionalExpansionInstances.end();
@@ -791,7 +798,7 @@ public:
// Add a conditional expansion instance.
void
- addConditionalExpansionInstance(bool ConditionValue,
+ addConditionalExpansionInstance(clang::PPCallbacks::ConditionValueKind ConditionValue,
InclusionPathHandle InclusionPathHandle) {
ConditionalExpansionInstances.push_back(
ConditionalExpansionInstance(ConditionValue, InclusionPathHandle));
@@ -842,9 +849,9 @@ public:
void Defined(const clang::Token &MacroNameTok,
const clang::MacroDirective *MD, clang::SourceRange Range);
void If(clang::SourceLocation Loc, clang::SourceRange ConditionRange,
- bool ConditionResult);
+ clang::PPCallbacks::ConditionValueKind ConditionResult);
void Elif(clang::SourceLocation Loc, clang::SourceRange ConditionRange,
- bool ConditionResult, clang::SourceLocation IfLoc);
+ clang::PPCallbacks::ConditionValueKind ConditionResult, clang::SourceLocation IfLoc);
void Ifdef(clang::SourceLocation Loc, const clang::Token &MacroNameTok,
const clang::MacroDirective *MD);
void Ifndef(clang::SourceLocation Loc, const clang::Token &MacroNameTok,
@@ -1138,7 +1145,7 @@ public:
addConditionalExpansionInstance(clang::Preprocessor &PP, HeaderHandle H,
clang::SourceLocation InstanceLoc,
clang::tok::PPKeywordKind DirectiveKind,
- bool ConditionValue,
+ clang::PPCallbacks::ConditionValueKind ConditionValue,
llvm::StringRef ConditionUnexpanded,
InclusionPathHandle InclusionPathHandle) {
// Ignore header guards, assuming the header guard is the only conditional.
@@ -1264,7 +1271,7 @@ public:
IMT != EMT; ++IMT) {
ConditionalExpansionInstance &MacroInfo = *IMT;
OS << " '" << *CondTracker.ConditionUnexpanded << "' expanded to: '"
- << (MacroInfo.ConditionValue ? "true" : "false")
+ << ConditionValueKindStrings[MacroInfo.ConditionValue]
<< "' with respect to these inclusion paths:\n";
// Walk all the inclusion path hierarchies.
for (std::vector<InclusionPathHandle>::iterator
@@ -1394,7 +1401,7 @@ void PreprocessorCallbacks::Defined(cons
void PreprocessorCallbacks::If(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
- bool ConditionResult) {
+ clang::PPCallbacks::ConditionValueKind ConditionResult) {
std::string Unexpanded(getSourceString(PP, ConditionRange));
PPTracker.addConditionalExpansionInstance(
PP, PPTracker.getCurrentHeaderHandle(), Loc, clang::tok::pp_if,
@@ -1403,7 +1410,7 @@ void PreprocessorCallbacks::If(clang::So
void PreprocessorCallbacks::Elif(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
- bool ConditionResult,
+ clang::PPCallbacks::ConditionValueKind ConditionResult,
clang::SourceLocation IfLoc) {
std::string Unexpanded(getSourceString(PP, ConditionRange));
PPTracker.addConditionalExpansionInstance(
@@ -1414,7 +1421,8 @@ void PreprocessorCallbacks::Elif(clang::
void PreprocessorCallbacks::Ifdef(clang::SourceLocation Loc,
const clang::Token &MacroNameTok,
const clang::MacroDirective *MD) {
- bool IsDefined = (MD != 0);
+ clang::PPCallbacks::ConditionValueKind IsDefined =
+ (MD != 0 ? clang::PPCallbacks::CVK_True : clang::PPCallbacks::CVK_False );
PPTracker.addConditionalExpansionInstance(
PP, PPTracker.getCurrentHeaderHandle(), Loc, clang::tok::pp_ifdef,
IsDefined, PP.getSpelling(MacroNameTok),
@@ -1424,7 +1432,8 @@ void PreprocessorCallbacks::Ifdef(clang:
void PreprocessorCallbacks::Ifndef(clang::SourceLocation Loc,
const clang::Token &MacroNameTok,
const clang::MacroDirective *MD) {
- bool IsNotDefined = (MD == 0);
+ clang::PPCallbacks::ConditionValueKind IsNotDefined =
+ (MD == 0 ? clang::PPCallbacks::CVK_True : clang::PPCallbacks::CVK_False );
PPTracker.addConditionalExpansionInstance(
PP, PPTracker.getCurrentHeaderHandle(), Loc, clang::tok::pp_ifndef,
IsNotDefined, PP.getSpelling(MacroNameTok),
Modified: clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp?rev=196648&r1=196647&r2=196648&view=diff
==============================================================================
--- clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp (original)
+++ clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp Sat Dec 7 02:41:15 2013
@@ -77,6 +77,12 @@ static const char *PragmaIntroducerKindS
static const char *PragmaMessageKindStrings[] = { "PMK_Message", "PMK_Warning",
"PMK_Error" };
+// ConditionValueKind strings.
+const char *
+ConditionValueKindStrings[] = {
+ "CVK_NotEvaluated", "CVK_False", "CVK_True"
+};
+
// Mapping strings.
static const char *MappingStrings[] = { "0", "MAP_IGNORE",
"MAP_WARNING", "MAP_ERROR",
@@ -345,22 +351,22 @@ void PPCallbacksTracker::SourceRangeSkip
// Hook called whenever an #if is seen.
void PPCallbacksTracker::If(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
- bool ConditionValue) {
+ ConditionValueKind ConditionValue) {
beginCallback("If");
appendArgument("Loc", Loc);
appendArgument("ConditionRange", ConditionRange);
- appendArgument("ConditionValue", ConditionValue);
+ appendArgument("ConditionValue", ConditionValue, ConditionValueKindStrings);
}
// Hook called whenever an #elif is seen.
void PPCallbacksTracker::Elif(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
- bool ConditionValue,
+ ConditionValueKind ConditionValue,
clang::SourceLocation IfLoc) {
beginCallback("Elif");
appendArgument("Loc", Loc);
appendArgument("ConditionRange", ConditionRange);
- appendArgument("ConditionValue", ConditionValue);
+ appendArgument("ConditionValue", ConditionValue, ConditionValueKindStrings);
appendArgument("IfLoc", IfLoc);
}
Modified: clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.h?rev=196648&r1=196647&r2=196648&view=diff
==============================================================================
--- clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.h (original)
+++ clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.h Sat Dec 7 02:41:15 2013
@@ -140,9 +140,9 @@ public:
clang::SourceRange Range) LLVM_OVERRIDE;
void SourceRangeSkipped(clang::SourceRange Range) LLVM_OVERRIDE;
void If(clang::SourceLocation Loc, clang::SourceRange ConditionRange,
- bool ConditionValue) LLVM_OVERRIDE;
+ ConditionValueKind ConditionValue) LLVM_OVERRIDE;
void Elif(clang::SourceLocation Loc, clang::SourceRange ConditionRange,
- bool ConditionValue, clang::SourceLocation IfLoc) LLVM_OVERRIDE;
+ ConditionValueKind ConditionValue, clang::SourceLocation IfLoc) LLVM_OVERRIDE;
void Ifdef(clang::SourceLocation Loc, const clang::Token &MacroNameTok,
const clang::MacroDirective *MD) LLVM_OVERRIDE;
void Ifndef(clang::SourceLocation Loc, const clang::Token &MacroNameTok,
Modified: clang-tools-extra/trunk/test/pp-trace/pp-trace-conditional.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-trace/pp-trace-conditional.cpp?rev=196648&r1=196647&r2=196648&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/pp-trace/pp-trace-conditional.cpp (original)
+++ clang-tools-extra/trunk/test/pp-trace/pp-trace-conditional.cpp Sat Dec 7 02:41:15 2013
@@ -80,14 +80,14 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:3:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:3:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:4:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_True
// CHECK-NEXT: - Callback: Endif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:4:2"
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:3:2"
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:6:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:6:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:7:1"]
-// CHECK-NEXT: ConditionValue: false
+// CHECK-NEXT: ConditionValue: CVK_False
// CHECK-NEXT: - Callback: Endif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:7:2"
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:6:2"
@@ -96,7 +96,7 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:9:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:9:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:10:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_True
// CHECK-NEXT: - Callback: Else
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:10:2"
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:9:2"
@@ -108,7 +108,7 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:13:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:13:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:14:1"]
-// CHECK-NEXT: ConditionValue: false
+// CHECK-NEXT: ConditionValue: CVK_False
// CHECK-NEXT: - Callback: Else
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:14:2"
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:13:2"
@@ -120,11 +120,11 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:17:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:17:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:18:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_True
// CHECK-NEXT: - Callback: Elif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:18:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:18:6", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:19:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_NotEvaluated
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:17:2"
// CHECK-NEXT: - Callback: Endif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:19:2"
@@ -134,11 +134,11 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:20:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:20:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:21:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_True
// CHECK-NEXT: - Callback: Elif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:21:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:21:6", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:22:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_NotEvaluated
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:20:2"
// CHECK-NEXT: - Callback: Endif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:22:2"
@@ -148,11 +148,11 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:24:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:24:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:25:1"]
-// CHECK-NEXT: ConditionValue: false
+// CHECK-NEXT: ConditionValue: CVK_False
// CHECK-NEXT: - Callback: Elif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:25:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:25:6", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:26:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_True
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:24:2"
// CHECK-NEXT: - Callback: SourceRangeSkipped
// CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:24:2", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:25:2"]
@@ -162,11 +162,11 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:27:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:27:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:28:1"]
-// CHECK-NEXT: ConditionValue: false
+// CHECK-NEXT: ConditionValue: CVK_False
// CHECK-NEXT: - Callback: Elif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:28:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:28:6", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:29:1"]
-// CHECK-NEXT: ConditionValue: false
+// CHECK-NEXT: ConditionValue: CVK_False
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:27:2"
// CHECK-NEXT: - Callback: Endif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:29:2"
@@ -176,11 +176,11 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:30:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:30:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:31:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_True
// CHECK-NEXT: - Callback: Elif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:31:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:31:6", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:32:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_NotEvaluated
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:30:2"
// CHECK-NEXT: - Callback: Endif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:32:2"
@@ -190,11 +190,11 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:33:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:33:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:34:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_True
// CHECK-NEXT: - Callback: Elif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:34:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:34:6", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:35:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_NotEvaluated
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:33:2"
// CHECK-NEXT: - Callback: Endif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:35:2"
@@ -204,11 +204,11 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:37:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:37:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:38:1"]
-// CHECK-NEXT: ConditionValue: false
+// CHECK-NEXT: ConditionValue: CVK_False
// CHECK-NEXT: - Callback: Elif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:38:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:38:6", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:39:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_True
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:37:2"
// CHECK-NEXT: - Callback: SourceRangeSkipped
// CHECK-NEXT: Range: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:37:2", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:38:2"]
@@ -223,11 +223,11 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:41:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:41:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:42:1"]
-// CHECK-NEXT: ConditionValue: false
+// CHECK-NEXT: ConditionValue: CVK_False
// CHECK-NEXT: - Callback: Elif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:42:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:42:6", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:43:1"]
-// CHECK-NEXT: ConditionValue: false
+// CHECK-NEXT: ConditionValue: CVK_False
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:41:2"
// CHECK-NEXT: - Callback: Else
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:43:2"
@@ -240,11 +240,11 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:45:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:45:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:46:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_True
// CHECK-NEXT: - Callback: Elif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:46:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:46:6", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:47:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_NotEvaluated
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:45:2"
// CHECK-NEXT: - Callback: Endif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:48:2"
@@ -254,11 +254,11 @@
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:49:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:49:4", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:50:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_True
// CHECK-NEXT: - Callback: Elif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:50:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-conditional.cpp:50:6", "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:51:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_NotEvaluated
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:49:2"
// CHECK-NEXT: - Callback: Endif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-conditional.cpp:52:2"
Modified: clang-tools-extra/trunk/test/pp-trace/pp-trace-macro.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-trace/pp-trace-macro.cpp?rev=196648&r1=196647&r2=196648&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/pp-trace/pp-trace-macro.cpp (original)
+++ clang-tools-extra/trunk/test/pp-trace/pp-trace-macro.cpp Sat Dec 7 02:41:15 2013
@@ -13,7 +13,7 @@ int j = FUNCMACRO(1);
#define X_IMPL(p1,p2)
#define X_IMPL2(p1)
X
-
+
// CHECK: ---
// CHECK-NEXT: - Callback: MacroDefined
// CHECK-NEXT: MacroNameTok: __STDC__
@@ -45,7 +45,7 @@ X
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:5:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-macro.cpp:5:4", "{{.*}}{{[/\\]}}pp-trace-macro.cpp:6:1"]
-// CHECK-NEXT: ConditionValue: true
+// CHECK-NEXT: ConditionValue: CVK_True
// CHECK-NEXT: - Callback: Endif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:6:2"
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:5:2"
@@ -59,7 +59,7 @@ X
// CHECK-NEXT: - Callback: If
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:8:2"
// CHECK-NEXT: ConditionRange: ["{{.*}}{{[/\\]}}pp-trace-macro.cpp:8:4", "{{.*}}{{[/\\]}}pp-trace-macro.cpp:9:1"]
-// CHECK-NEXT: ConditionValue: false
+// CHECK-NEXT: ConditionValue: CVK_False
// CHECK-NEXT: - Callback: Endif
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:9:2"
// CHECK-NEXT: IfLoc: "{{.*}}{{[/\\]}}pp-trace-macro.cpp:8:2"
More information about the cfe-commits
mailing list