|
@@ -243,18 +243,21 @@ public:
|
|
/// \brief Hook called whenever an \#if is seen.
|
|
/// \brief Hook called whenever an \#if is seen.
|
|
/// \param Loc the source location of the directive.
|
|
/// \param Loc the source location of the directive.
|
|
/// \param ConditionRange The SourceRange of the expression being tested.
|
|
/// \param ConditionRange The SourceRange of the expression being tested.
|
|
|
|
+ /// \param ConditionValue The evaluated value of the condition.
|
|
///
|
|
///
|
|
// FIXME: better to pass in a list (or tree!) of Tokens.
|
|
// FIXME: better to pass in a list (or tree!) of Tokens.
|
|
- virtual void If(SourceLocation Loc, SourceRange ConditionRange) {
|
|
|
|
|
|
+ virtual void If(SourceLocation Loc, SourceRange ConditionRange,
|
|
|
|
+ bool ConditionValue) {
|
|
}
|
|
}
|
|
|
|
|
|
/// \brief Hook called whenever an \#elif is seen.
|
|
/// \brief Hook called whenever an \#elif is seen.
|
|
/// \param Loc the source location of the directive.
|
|
/// \param Loc the source location of the directive.
|
|
/// \param ConditionRange The SourceRange of the expression being tested.
|
|
/// \param ConditionRange The SourceRange of the expression being tested.
|
|
|
|
+ /// \param ConditionValue The evaluated value of the condition.
|
|
/// \param IfLoc the source location of the \#if/\#ifdef/\#ifndef directive.
|
|
/// \param IfLoc the source location of the \#if/\#ifdef/\#ifndef directive.
|
|
// FIXME: better to pass in a list (or tree!) of Tokens.
|
|
// FIXME: better to pass in a list (or tree!) of Tokens.
|
|
virtual void Elif(SourceLocation Loc, SourceRange ConditionRange,
|
|
virtual void Elif(SourceLocation Loc, SourceRange ConditionRange,
|
|
- SourceLocation IfLoc) {
|
|
|
|
|
|
+ bool ConditionValue, SourceLocation IfLoc) {
|
|
}
|
|
}
|
|
|
|
|
|
/// \brief Hook called whenever an \#ifdef is seen.
|
|
/// \brief Hook called whenever an \#ifdef is seen.
|
|
@@ -418,16 +421,17 @@ public:
|
|
}
|
|
}
|
|
|
|
|
|
/// \brief Hook called whenever an \#if is seen.
|
|
/// \brief Hook called whenever an \#if is seen.
|
|
- virtual void If(SourceLocation Loc, SourceRange ConditionRange) {
|
|
|
|
- First->If(Loc, ConditionRange);
|
|
|
|
- Second->If(Loc, ConditionRange);
|
|
|
|
|
|
+ virtual void If(SourceLocation Loc, SourceRange ConditionRange,
|
|
|
|
+ bool ConditionValue) {
|
|
|
|
+ First->If(Loc, ConditionRange, ConditionValue);
|
|
|
|
+ Second->If(Loc, ConditionRange, ConditionValue);
|
|
}
|
|
}
|
|
|
|
|
|
- /// \brief Hook called whenever an \#if is seen.
|
|
|
|
|
|
+ /// \brief Hook called whenever an \#elif is seen.
|
|
virtual void Elif(SourceLocation Loc, SourceRange ConditionRange,
|
|
virtual void Elif(SourceLocation Loc, SourceRange ConditionRange,
|
|
- SourceLocation IfLoc) {
|
|
|
|
- First->Elif(Loc, ConditionRange, IfLoc);
|
|
|
|
- Second->Elif(Loc, ConditionRange, IfLoc);
|
|
|
|
|
|
+ bool ConditionValue, SourceLocation IfLoc) {
|
|
|
|
+ First->Elif(Loc, ConditionRange, ConditionValue, IfLoc);
|
|
|
|
+ Second->Elif(Loc, ConditionRange, ConditionValue, IfLoc);
|
|
}
|
|
}
|
|
|
|
|
|
/// \brief Hook called whenever an \#ifdef is seen.
|
|
/// \brief Hook called whenever an \#ifdef is seen.
|